Call glReleaseShaderCompiler on GLES

This commit is contained in:
Jonas Kulla 2014-12-23 19:23:08 +01:00
parent 3fb4108306
commit ee17bb2137
3 changed files with 16 additions and 0 deletions

View File

@ -101,6 +101,11 @@ void initGLFunctions()
if (glMajor < 2)
throw EXC("At least OpenGL (ES) 2.0 is required");
if (gles)
{
GL_ES_FUN;
}
BoostSet<std::string> ext;
if (glMajor >= 3)

View File

@ -110,6 +110,9 @@ typedef void (APIENTRYP _PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint* arrays);
typedef void (APIENTRYP _PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint* arrays);
typedef void (APIENTRYP _PFNGLBINDVERTEXARRAYPROC) (GLuint array);
/* GLES only */
typedef void (APIENTRYP _PFNGLRELEASESHADERCOMPILERPROC) (void);
#ifdef GLES2_HEADER
#define GL_NUM_EXTENSIONS 0x821D
#define GL_READ_FRAMEBUFFER 0x8CA8
@ -178,6 +181,9 @@ typedef void (APIENTRYP _PFNGLBINDVERTEXARRAYPROC) (GLuint array);
GL_FUN(DisableVertexAttribArray, _PFNGLDISABLEVERTEXATTRIBARRAYPROC) \
GL_FUN(VertexAttribPointer, _PFNGLVERTEXATTRIBPOINTERPROC)
#define GL_ES_FUN \
GL_FUN(ReleaseShaderCompiler, _PFNGLRELEASESHADERCOMPILERPROC)
#define GL_FBO_FUN \
/* Framebuffer object */ \
GL_FUN(GenFramebuffers, _PFNGLGENFRAMEBUFFERSPROC) \
@ -206,6 +212,7 @@ struct GLFunctions
#define GL_FUN(name, type) type name;
GL_20_FUN
GL_ES_FUN
GL_FBO_FUN
GL_FBO_BLIT_FUN
GL_VAO_FUN

View File

@ -111,6 +111,10 @@ struct SharedStatePrivate
fontState(threadData->config),
stampCounter(0)
{
/* Shaders have been compiled in ShaderSet's constructor */
if (gl.ReleaseShaderCompiler)
gl.ReleaseShaderCompiler();
// FIXME find out correct archive filename
std::string archPath = defGameArchive();