Browse Source

update rlgl.h

pull/4832/head
Bigfoot71 1 week ago
parent
commit
89d40510c6
1 changed files with 6 additions and 7 deletions
  1. +6
    -7
      src/rlgl.h

+ 6
- 7
src/rlgl.h View File

@ -773,7 +773,7 @@ RLAPI void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attac
RLAPI bool rlFramebufferComplete(unsigned int id); // Verify framebuffer is complete
RLAPI void rlUnloadFramebuffer(unsigned int id); // Delete framebuffer from GPU
#if defined(GRAPHICS_API_OPENGL_11_SOFTWARE)
RLAPI void* rlGetFramebuffer(int* width, int* height);
RLAPI void rlCopyFramebuffer(int x, int y, int w, int h, int format, void* pixels);
RLAPI void rlResizeFramebuffer(int width, int height);
#endif
@ -3696,17 +3696,16 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format)
}
#if defined(GRAPHICS_API_OPENGL_11_SOFTWARE)
void* rlGetFramebuffer(int* width, int* height)
void rlCopyFramebuffer(int x, int y, int w, int h, int format, void* pixels)
{
return swGetColorBuffer(&width, &height);
unsigned int glInternalFormat, glFormat, glType;
rlGetGlTextureFormats(format, &glInternalFormat, &glFormat, &glType);
swCopyFramebuffer(x, y, w, h, glFormat, glType, pixels);
}
void rlResizeFramebuffer(int width, int height)
{
swResizeFramebuffer(width, height);
}
#endif
// Read screen pixel data (color buffer)
@ -5306,4 +5305,4 @@ static Matrix rlMatrixInvert(Matrix mat)
return result;
}
#endif // RLGL_IMPLEMENTATION
#endif // RLGL_IMPLEMENTATION

Loading…
Cancel
Save