diff options
| author | raysan5 <[email protected]> | 2021-03-31 18:41:03 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2021-03-31 18:41:03 +0200 |
| commit | 434a3a276df2f0a3dfe48b522a9e20abe8562fef (patch) | |
| tree | 23960c24aaf6740c042921ca1259916551eef14b | |
| parent | 8e51e6d1dff309f9fa51bfd6cf45dee2da1b89b4 (diff) | |
| download | raylib-434a3a276df2f0a3dfe48b522a9e20abe8562fef.tar.gz raylib-434a3a276df2f0a3dfe48b522a9e20abe8562fef.zip | |
REVIEWED: Define instancing API entry points for RPI
| -rw-r--r-- | src/rlgl.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -731,6 +731,14 @@ RLAPI Texture2D rlGenTextureBRDF(Shader shader, int size); // Gener #include <EGL/egl.h> // EGL library #include <GLES2/gl2.h> // OpenGL ES 2.0 library #include <GLES2/gl2ext.h> // OpenGL ES 2.0 extensions library + + // It seems OpenGL ES 2.0 instancing entry points are not defined on Raspberry Pi + // provided headers (despite being defined in official Khronos GLES2 headers) + #if defined(PLATFORM_RPI) || defined(PLATFORM_DRM) + typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); + typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); + typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor); + #endif #endif //---------------------------------------------------------------------------------- @@ -892,15 +900,11 @@ static PFNGLGENVERTEXARRAYSOESPROC glGenVertexArrays = NULL; static PFNGLBINDVERTEXARRAYOESPROC glBindVertexArray = 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 static PFNGLDRAWARRAYSINSTANCEDEXTPROC glDrawArraysInstanced = NULL; static PFNGLDRAWELEMENTSINSTANCEDEXTPROC glDrawElementsInstanced = NULL; static PFNGLVERTEXATTRIBDIVISOREXTPROC glVertexAttribDivisor = NULL; #endif -#endif //---------------------------------------------------------------------------------- // Module specific Functions Declaration |
