This commit is contained in:
rmn20 2021-12-18 23:10:48 +03:00
parent 19fc92a1d9
commit adc21f20a3
2 changed files with 3 additions and 3 deletions

View File

@ -1276,7 +1276,7 @@ RLAPI Texture2D LoadTexture(const char *fileName);
RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data
RLAPI TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) with RGBA pixel format and depthbuffer
RLAPI RenderTexture2D LoadRenderTextureEx(int width, int height, int format, int useDepth); // Load texture for rendering (framebuffer) with custom pixel format and optional framebuffer
RLAPI RenderTexture2D LoadRenderTextureEx(int width, int height, int format, bool useDepth); // Load texture for rendering (framebuffer) with custom pixel format and optional framebuffer
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data

View File

@ -2968,11 +2968,11 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
// NOTE: Render texture is loaded by default with RGBA color attachment and depth RenderBuffer
RenderTexture2D LoadRenderTexture(int width, int height)
{
return LoadRenderTextureEx(width, height, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, 1);
return LoadRenderTextureEx(width, height, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, true);
}
// Load texture for rendering (framebuffer)
RenderTexture2D LoadRenderTextureEx(int width, int height, int format, int useDepth)
RenderTexture2D LoadRenderTextureEx(int width, int height, int format, bool useDepth)
{
RenderTexture2D target = { 0 };