Fixed GetPixel() in GLES2 driver

This commit is contained in:
n00b
2024-12-05 22:19:50 -05:00
parent 32e1e0a00f
commit 5a24dc445b
6 changed files with 45 additions and 40 deletions

View File

@@ -1409,6 +1409,10 @@ Uint32 rc_getPixel(int x, int y)
if(y < 0 || y >= rc_window_size.Height)
y = 0;
#ifdef RC_DRIVER_GLES2
y = rc_canvas[rc_active_canvas].texture->getSize().Height - (y+1);
#endif // RC_DRIVER_GLES2
irr::video::ITexture* texture = rc_canvas[rc_active_canvas].texture;

View File

@@ -2,7 +2,7 @@
#define RC_OS_DEFINES_H_INCLUDED
//USED FOR TESTING ONLY
//#define RC_TESTING
#define RC_TESTING
//I am checking Android first since I think it also defines __linux__

View File

@@ -32,7 +32,7 @@
<irrtheora.h>
"rc_func130_cases.h"
1733451673 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
1733454924 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
<TargetConditionals.h>
1733270962 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_defines.h
@@ -1247,7 +1247,7 @@
1727545973 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/RealisticWater.h
<irrlicht.h>
1733452182 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
1733454956 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
"SDL.h"
<SDL2/SDL.h>
<irrlicht.h>