Search
lxdream.org :: lxdream/src/pvr2/glrender.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glrender.c
changeset 1156:d124a1c833cb
prev1154:5225c7c059ce
next1159:580436b01b6c
author nkeynes
date Wed Jan 19 10:45:06 2011 +1000 (9 years ago)
permissions -rw-r--r--
last change Add apple-specific GL context optimization
file annotate diff log raw
1.1 --- a/src/pvr2/glrender.c Mon Jan 17 21:22:06 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 );
.