|
@ -892,11 +892,15 @@ static PFNGLGENVERTEXARRAYSOESPROC glGenVertexArrays = NULL; |
|
|
static PFNGLBINDVERTEXARRAYOESPROC glBindVertexArray = NULL; |
|
|
static PFNGLBINDVERTEXARRAYOESPROC glBindVertexArray = NULL; |
|
|
static PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArrays = NULL; |
|
|
static PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArrays = NULL; |
|
|
|
|
|
|
|
|
|
|
|
// It seems OpenGL ES 2.0 instancing entry points are not defined |
|
|
|
|
|
// in Raspberry Pi provided headers (despite being defined in official Khronos GLES2 headers) |
|
|
|
|
|
#if !defined(PLATFORM_RPI) && !defined(PLATFORM_DRM) |
|
|
// NOTE: Instancing functionality could also be available through extension |
|
|
// NOTE: Instancing functionality could also be available through extension |
|
|
static PFNGLDRAWARRAYSINSTANCEDEXTPROC glDrawArraysInstanced = NULL; |
|
|
static PFNGLDRAWARRAYSINSTANCEDEXTPROC glDrawArraysInstanced = NULL; |
|
|
static PFNGLDRAWELEMENTSINSTANCEDEXTPROC glDrawElementsInstanced = NULL; |
|
|
static PFNGLDRAWELEMENTSINSTANCEDEXTPROC glDrawElementsInstanced = NULL; |
|
|
static PFNGLVERTEXATTRIBDIVISOREXTPROC glVertexAttribDivisor = NULL; |
|
|
static PFNGLVERTEXATTRIBDIVISOREXTPROC glVertexAttribDivisor = NULL; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------- |
|
|
//---------------------------------------------------------------------------------- |
|
|
// Module specific Functions Declaration |
|
|
// Module specific Functions Declaration |
|
@ -1722,7 +1726,7 @@ void rlglInit(int width, int height) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Check instanced rendering support |
|
|
// Check instanced rendering support |
|
|
if (strcmp(extList[i], (const char *)"GL_ANGLE_instanced_arrays") == 0) |
|
|
|
|
|
|
|
|
if (strcmp(extList[i], (const char *)"GL_ANGLE_instanced_arrays") == 0) // Web ANGLE |
|
|
{ |
|
|
{ |
|
|
glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDEXTPROC)eglGetProcAddress("glDrawArraysInstancedANGLE"); |
|
|
glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDEXTPROC)eglGetProcAddress("glDrawArraysInstancedANGLE"); |
|
|
glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDEXTPROC)eglGetProcAddress("glDrawElementsInstancedANGLE"); |
|
|
glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDEXTPROC)eglGetProcAddress("glDrawElementsInstancedANGLE"); |
|
@ -1730,6 +1734,18 @@ void rlglInit(int width, int height) |
|
|
|
|
|
|
|
|
if ((glDrawArraysInstanced != NULL) && (glDrawElementsInstanced != NULL) && (glVertexAttribDivisor != NULL)) RLGL.ExtSupported.instancing = true; |
|
|
if ((glDrawArraysInstanced != NULL) && (glDrawElementsInstanced != NULL) && (glVertexAttribDivisor != NULL)) RLGL.ExtSupported.instancing = true; |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if ((strcmp(extList[i], (const char *)"GL_EXT_draw_instanced") == 0) && // Standard EXT |
|
|
|
|
|
(strcmp(extList[i], (const char *)"GL_EXT_instanced_arrays") == 0)) |
|
|
|
|
|
{ |
|
|
|
|
|
glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDEXTPROC)eglGetProcAddress("glDrawArraysInstancedEXT"); |
|
|
|
|
|
glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDEXTPROC)eglGetProcAddress("glDrawElementsInstancedEXT"); |
|
|
|
|
|
glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISOREXTPROC)eglGetProcAddress("glVertexAttribDivisorEXT"); |
|
|
|
|
|
|
|
|
|
|
|
if ((glDrawArraysInstanced != NULL) && (glDrawElementsInstanced != NULL) && (glVertexAttribDivisor != NULL)) RLGL.ExtSupported.instancing = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Check NPOT textures support |
|
|
// Check NPOT textures support |
|
|
// NOTE: Only check on OpenGL ES, OpenGL 3.3 has NPOT textures full support as core feature |
|
|
// NOTE: Only check on OpenGL ES, OpenGL 3.3 has NPOT textures full support as core feature |
|
|