mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-21 18:58:14 +00:00
REVIEWED: Define instancing API entry points for RPI
This commit is contained in:
12
src/rlgl.h
12
src/rlgl.h
@@ -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
|
||||
|
Reference in New Issue
Block a user