mirror of
https://github.com/raysan5/raylib.git
synced 2025-11-11 21:08:44 +00:00
RE-ADDED: swGetColorBuffer() for convenience #5312
`PLATFORM_DRM` depends on it but if there is a better approach to get the buffer, it can just be removed again and replaced by alternative.
This commit is contained in:
9
src/external/rlsw.h
vendored
9
src/external/rlsw.h
vendored
@@ -531,6 +531,7 @@ SWAPI void swClose(void);
|
||||
SWAPI bool swResizeFramebuffer(int w, int h);
|
||||
SWAPI void swCopyFramebuffer(int x, int y, int w, int h, SWformat format, SWtype type, void *pixels);
|
||||
SWAPI void swBlitFramebuffer(int xDst, int yDst, int wDst, int hDst, int xSrc, int ySrc, int wSrc, int hSrc, SWformat format, SWtype type, void *pixels);
|
||||
SWAPI void *swGetColorBuffer(int *w, int *h);
|
||||
|
||||
SWAPI void swEnable(SWstate state);
|
||||
SWAPI void swDisable(SWstate state);
|
||||
@@ -3695,6 +3696,14 @@ void swBlitFramebuffer(int xDst, int yDst, int wDst, int hDst, int xSrc, int ySr
|
||||
}
|
||||
}
|
||||
|
||||
void *swGetColorBuffer(int *w, int *h)
|
||||
{
|
||||
if (w) *w = RLSW.framebuffer.width;
|
||||
if (h) *h = RLSW.framebuffer.height;
|
||||
|
||||
return (void *)RLSW.framebuffer.pixels->color;
|
||||
}
|
||||
|
||||
void swEnable(SWstate state)
|
||||
{
|
||||
switch (state)
|
||||
|
||||
Reference in New Issue
Block a user