diff options
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrConfig.h | 9 | ||||
-rw-r--r-- | include/gpu/gl/GrGLFunctions.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h index cd081eff22..766212de36 100644 --- a/include/gpu/GrConfig.h +++ b/include/gpu/GrConfig.h @@ -375,6 +375,15 @@ inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } #define GR_DEFAULT_TEXTURE_CACHE_MB_LIMIT 96 #endif +/** + * GR_USE_NEW_GL_SHADER_SOURCE_SIGNATURE is for compatibility with the new version + * of the OpenGLES2.0 headers from Khronos. glShaderSource now takes a const char * const *, + * instead of a const char **. + */ +#if !defined(GR_USE_NEW_GL_SHADER_SOURCE_SIGNATURE) + #define GR_USE_NEW_GL_SHADER_SOURCE_SIGNATURE 0 +#endif + /////////////////////////////////////////////////////////////////////////////// // tail section: // diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index b0b3b16313..ceaecc6e0f 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -122,7 +122,11 @@ extern "C" { typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLRenderbufferStorageMultisampleCoverageProc)(GrGLenum target, GrGLsizei coverageSamples, GrGLsizei colorSamples, GrGLenum internalformat, GrGLsizei width, GrGLsizei height); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLResolveMultisampleFramebufferProc)(); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLScissorProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height); +#if GR_USE_NEW_GL_SHADER_SOURCE_SIGNATURE + typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLShaderSourceProc)(GrGLuint shader, GrGLsizei count, const char* const * str, const GrGLint* length); +#else typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLShaderSourceProc)(GrGLuint shader, GrGLsizei count, const char** str, const GrGLint* length); +#endif typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilFuncProc)(GrGLenum func, GrGLint ref, GrGLuint mask); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilFuncSeparateProc)(GrGLenum face, GrGLenum func, GrGLint ref, GrGLuint mask); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilMaskProc)(GrGLuint mask); |