Changeset View
Changeset View
Standalone View
Standalone View
source/lib/external_libraries/glext_funcs.h
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
The names are made accessible to engine code only via the ARB name, to make it | The names are made accessible to engine code only via the ARB name, to make it | ||||
obvious that care must be taken (i.e. by being certain that the extension is | obvious that care must be taken (i.e. by being certain that the extension is | ||||
actually supported). | actually supported). | ||||
*/ | */ | ||||
#if CONFIG2_GLES | #if CONFIG2_GLES | ||||
// no GLES extensions used yet | |||||
// some functions that are extensions in GL are core functions in GLES, | // some functions that are extensions in GL are core functions in GLES, | ||||
// so we should use them without the function pointer indirection | // so we should use them without the function pointer indirection | ||||
#define pglActiveTextureARB glActiveTexture | #define pglActiveTextureARB glActiveTexture | ||||
#define pglBlendColorEXT glBlendColor | #define pglBlendColorEXT glBlendColor | ||||
#define pglBlendEquationEXT glBlendEquation | #define pglBlendEquationEXT glBlendEquation | ||||
#define pglClientActiveTextureARB glClientActiveTexture | #define pglClientActiveTextureARB glClientActiveTexture | ||||
#define pglCompressedTexImage2DARB glCompressedTexImage2D | #define pglCompressedTexImage2DARB glCompressedTexImage2D | ||||
Show All 23 Lines | |||||
#define pglUseProgramObjectARB glUseProgram | #define pglUseProgramObjectARB glUseProgram | ||||
#define pglVertexAttribPointerARB glVertexAttribPointer | #define pglVertexAttribPointerARB glVertexAttribPointer | ||||
#define pglBindBufferARB glBindBuffer | #define pglBindBufferARB glBindBuffer | ||||
#define pglBufferDataARB glBufferData | #define pglBufferDataARB glBufferData | ||||
#define pglBufferSubDataARB glBufferSubData | #define pglBufferSubDataARB glBufferSubData | ||||
#define pglDeleteBuffersARB glDeleteBuffers | #define pglDeleteBuffersARB glDeleteBuffers | ||||
#define pglGenBuffersARB glGenBuffers | #define pglGenBuffersARB glGenBuffers | ||||
#define pglMapBufferARB glMapBuffer | |||||
#define pglUnmapBufferARB glUnmapBuffer | |||||
// Those EXT symbols don’t exist in GLES!2.0, since it imported the ARB version instead. | |||||
#define pglBindFramebufferEXT glBindFramebuffer | #define pglBindFramebufferEXT glBindFramebuffer | ||||
#define pglCheckFramebufferStatusEXT glCheckFramebufferStatus | #define pglCheckFramebufferStatusEXT glCheckFramebufferStatus | ||||
#define pglDeleteFramebuffersEXT glDeleteFramebuffers | #define pglDeleteFramebuffersEXT glDeleteFramebuffers | ||||
#define pglFramebufferTexture2DEXT glFramebufferTexture2D | #define pglFramebufferTexture2DEXT glFramebufferTexture2D | ||||
#define pglGenFramebuffersEXT glGenFramebuffers | #define pglGenFramebuffersEXT glGenFramebuffers | ||||
#define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT | |||||
#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0 | |||||
#define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING | #define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING | ||||
#define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE | #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE | ||||
#define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER | #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER | ||||
#define GL_CLAMP_TO_BORDER GL_CLAMP_TO_EDGE // TODO: should fix code that relies on GL_CLAMP_TO_BORDER | // Those should come from GLES!2.0 core, not from GL_EXT_draw_buffers. | ||||
#ifndef GL_COLOR_ATTACHMENT0_EXT | |||||
#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0 | |||||
#define GL_COLOR_ATTACHMENT1_EXT GL_COLOR_ATTACHMENT1 | |||||
#endif | |||||
#ifndef GL_DEPTH_ATTACHMENT_EXT | |||||
#define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT | |||||
#endif | |||||
// GL_OES_mapbuffer | |||||
FUNC(void*, glMapBufferOES, (int target, int access)) | |||||
FUNC(bool, glUnmapBufferOES, (int target)) | |||||
#define pglMapBufferARB pglMapBufferOES | |||||
#define pglUnmapBufferARB pglUnmapBufferOES | |||||
#define GL_WRITE_ONLY GL_WRITE_ONLY_OES | |||||
// GL_OES_texture_border_clamp | |||||
linkmauve: This one also became core in OpenGL ES 3.2, in addition to this extension for 2.0+, so we may… | |||||
#define GL_CLAMP_TO_BORDER GL_CLAMP_TO_EDGE | |||||
// GL_OES_rgb8_rgba8 | |||||
#define GL_RGBA8 GL_RGBA8_OES | |||||
// GL_OES_depth32 | |||||
#define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES | |||||
typedef GLuint GLhandleARB; | typedef GLuint GLhandleARB; | ||||
#else | #else | ||||
// were these defined as real functions in gl.h already? | // were these defined as real functions in gl.h already? | ||||
// GL_EXT_draw_range_elements / GL1.2: | // GL_EXT_draw_range_elements / GL1.2: | ||||
▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
This one also became core in OpenGL ES 3.2, in addition to this extension for 2.0+, so we may want to discover it at some point.