Search
lxdream.org :: lxdream :: r1156:d124a1c833cb
lxdream 0.9.1
released Jun 29
Download Now
changeset1156:d124a1c833cb
parent1155:f9aefb4613e5
child1157:20053990db61
authornkeynes
dateWed Jan 19 10:45:06 2011 +1000 (13 years ago)
Add apple-specific GL context optimization
src/pvr2/glrender.c
1.1 --- a/src/pvr2/glrender.c Tue Jan 18 17:48:48 2011 +1000
1.2 +++ b/src/pvr2/glrender.c Wed Jan 19 10:45:06 2011 +1000
1.3 @@ -25,6 +25,13 @@
1.4 #include "pvr2/scene.h"
1.5 #include "pvr2/tileiter.h"
1.6
1.7 +#ifdef APPLE_BUILD
1.8 +#include "OpenGL/CGLCurrent.h"
1.9 +#include "OpenGL/CGLMacro.h"
1.10 +
1.11 +static CGLContextObj CGL_MACRO_CONTEXT;
1.12 +#endif
1.13 +
1.14 #define IS_EMPTY_TILE_LIST(p) ((*((uint32_t *)(pvr2_main_ram+(p))) >> 28) == 0x0F)
1.15
1.16 int pvr2_poly_depthmode[8] = { GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL,
1.17 @@ -119,6 +126,9 @@
1.18 }
1.19 }
1.20
1.21 +#ifdef APPLE_BUILD
1.22 + CGL_MACRO_CONTEXT = CGLGetCurrentContext();
1.23 +#endif
1.24 texcache_gl_init(); // Allocate texture IDs
1.25 glDisable( GL_CULL_FACE );
1.26 glEnable( GL_BLEND );
.