emulator opengl: add GLESv2 support to driver + renderer

Added GLESv2 library to system.
Made fixes to the host libOpenGLRender to
compile and support GLESv2 (defined WITH_GLES2).
Other fixes required to make GLESv2 to work.

Change-Id: I9eb198e6092e7fa3550342c50929dd1714282cb3
This commit is contained in:
Stas Gurtovoy
2011-06-16 14:51:21 +03:00
committed by Guy Zadickario
parent 39386d450f
commit 62d074d9f8
25 changed files with 233 additions and 29 deletions

View File

@@ -77,8 +77,8 @@ static const char *getGLES2ExtensionString(EGLDisplay p_dpy,
}
s_egl.eglMakeCurrent(p_dpy, NULL, NULL, NULL);
s_egl.eglDestroySurface(p_dpy, surface);
s_egl.eglDestroyContext(p_dpy, ctx);
s_egl.eglDestroySurface(p_dpy, surface);
return extString;
}
@@ -564,8 +564,14 @@ bool FrameBuffer::bindContext(HandleType p_context,
tinfo->currContext = ctx;
tinfo->currDrawSurf = draw;
tinfo->currReadSurf = read;
tinfo->m_glDec.setContextData(&ctx->decoderContextData());
if (ctx) {
if (ctx->isGL2()) tinfo->m_gl2Dec.setContextData(&ctx->decoderContextData());
else tinfo->m_glDec.setContextData(&ctx->decoderContextData());
}
else {
tinfo->m_glDec.setContextData(NULL);
tinfo->m_gl2Dec.setContextData(NULL);
}
return true;
}