Support 5_6_5 in SDL/GL port
Jeffrey Pfau jeffrey@endrift.com
Sun, 13 Jul 2014 18:31:28 -0700
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/platform/sdl/gl-main.c
→
src/platform/sdl/gl-main.c
@@ -183,7 +183,11 @@ while (context->state < THREAD_EXITING) {
if (GBASyncWaitFrameStart(&context->sync, context->frameskip)) { glBindTexture(GL_TEXTURE_2D, renderer->tex); #ifdef COLOR_16_BIT +#ifdef COLOR_5_6_5 + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, renderer->d.outputBuffer); +#else glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, renderer->d.outputBuffer); +#endif #else glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, renderer->d.outputBuffer); #endif