@@ -671,6 +671,7 @@ SWAPI void swClose(void);
671671SWAPI bool swResize (int w , int h );
672672SWAPI void swReadPixels (int x , int y , int w , int h , SWformat format , SWtype type , void * pixels );
673673SWAPI void swBlitPixels (int xDst , int yDst , int wDst , int hDst , int xSrc , int ySrc , int wSrc , int hSrc , SWformat format , SWtype type , void * pixels );
674+ SWAPI void * swGetColorBuffer (int * width , int * height ); // Restored for ESP-IDF compatibility
674675
675676SWAPI void swEnable (SWstate state );
676677SWAPI void swDisable (SWstate state );
@@ -689,7 +690,6 @@ SWAPI void swClear(uint32_t bitmask);
689690SWAPI void swBlendFunc (SWfactor sfactor , SWfactor dfactor );
690691SWAPI void swPolygonMode (SWpoly mode );
691692SWAPI void swCullFace (SWface face );
692- SWAPI void * swGetColorBuffer (int * width , int * height ); // Restored for ESP-IDF compatibility
693693
694694SWAPI void swPointSize (float size );
695695SWAPI void swLineWidth (float width );
@@ -3952,6 +3952,14 @@ void swBlitPixels(int xDst, int yDst, int wDst, int hDst, int xSrc, int ySrc, in
39523952 }
39533953}
39543954
3955+ // Get framefuffer pixel data pointer and size
3956+ void * swGetColorBuffer (int * width , int * height )
3957+ {
3958+ if (width != NULL ) * width = RLSW .framebuffer .color -> width ;
3959+ if (height != NULL ) * height = RLSW .framebuffer .color -> height ;
3960+ return RLSW .framebuffer .color -> pixels ;
3961+ }
3962+
39553963void swEnable (SWstate state )
39563964{
39573965 switch (state )
@@ -4201,15 +4209,6 @@ void swCullFace(SWface face)
42014209 RLSW .cullFace = face ;
42024210}
42034211
4204- // Get direct pointer to the default framebuffer's pixel data
4205- // Restored for ESP-IDF compatibility - removed in Raylib 6.0 PR #5655
4206- void * swGetColorBuffer (int * width , int * height )
4207- {
4208- if (width ) * width = RLSW .colorBuffer -> width ;
4209- if (height ) * height = RLSW .colorBuffer -> height ;
4210- return RLSW .colorBuffer -> pixels ;
4211- }
4212-
42134212void swPointSize (float size )
42144213{
42154214 RLSW .pointRadius = floorf (size * 0.5f );
0 commit comments