Remove all !_IRR_OGLES1_USE_EXTPOINTER_ code

This commit is contained in:
sfan5 2024-01-16 21:03:52 +01:00
parent f28e442bfa
commit b7bb4b5958
3 changed files with 2 additions and 44 deletions

@ -210,7 +210,7 @@ if(ENABLE_GLES1)
add_definitions(-D_IRR_COMPILE_WITH_OGLES1_)
set(OPENGLES_DIRECT_LINK TRUE)
if(DEVICE MATCHES "^(WINDOWS|X11|ANDROID)$")
add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_ -D_IRR_OGLES1_USE_EXTPOINTER_)
add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_)
endif()
endif()

@ -12,13 +12,11 @@
#include "SMaterial.h"
#include "fast_atof.h"
#if defined(_IRR_OGLES1_USE_EXTPOINTER_)
#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_) || defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_) || defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
#include <EGL/egl.h>
#else
#include <GLES/egl.h>
#endif
#endif
namespace irr
{
@ -27,12 +25,10 @@ namespace video
COGLES1ExtensionHandler::COGLES1ExtensionHandler() : COGLESCoreExtensionHandler(),
MaxUserClipPlanes(0), MaxLights(0)
#if defined(_IRR_OGLES1_USE_EXTPOINTER_)
, pGlBlendEquationOES(0), pGlBlendFuncSeparateOES(0),
pGlBindFramebufferOES(0), pGlDeleteFramebuffersOES(0),
pGlGenFramebuffersOES(0), pGlCheckFramebufferStatusOES(0),
pGlFramebufferTexture2DOES(0), pGlGenerateMipmapOES(0)
#endif
{
}
@ -84,7 +80,6 @@ namespace video
Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast<u8>(MATERIAL_MAX_TEXTURES));
Feature.ColorAttachment = 1;
#if defined(_IRR_OGLES1_USE_EXTPOINTER_)
pGlBlendEquationOES = (PFNGLBLENDEQUATIONOESPROC)eglGetProcAddress("glBlendEquationOES");
pGlBlendFuncSeparateOES = (PFNGLBLENDFUNCSEPARATEOESPROC)eglGetProcAddress("glBlendFuncSeparateOES");
pGlBindFramebufferOES = (PFNGLBINDFRAMEBUFFEROESPROC)eglGetProcAddress("glBindFramebufferOES");
@ -93,7 +88,6 @@ namespace video
pGlCheckFramebufferStatusOES = (PFNGLCHECKFRAMEBUFFERSTATUSOESPROC)eglGetProcAddress("glCheckFramebufferStatusOES");
pGlFramebufferTexture2DOES = (PFNGLFRAMEBUFFERTEXTURE2DOESPROC)eglGetProcAddress("glFramebufferTexture2DOES");
pGlGenerateMipmapOES = (PFNGLGENERATEMIPMAPOESPROC)eglGetProcAddress("glGenerateMipmapOES");
#endif
}
} // end namespace video

@ -83,66 +83,40 @@ namespace video
inline void irrGlBindFramebuffer(GLenum target, GLuint framebuffer)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlBindFramebufferOES)
pGlBindFramebufferOES(target, framebuffer);
#elif defined(GL_OES_framebuffer_object)
glBindFramebufferOES(target, framebuffer);
#endif
}
inline void irrGlDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlDeleteFramebuffersOES)
pGlDeleteFramebuffersOES(n, framebuffers);
#elif defined(GL_OES_framebuffer_object)
glDeleteFramebuffersOES(n, framebuffers);
#endif
}
inline void irrGlGenFramebuffers(GLsizei n, GLuint *framebuffers)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlGenFramebuffersOES)
pGlGenFramebuffersOES(n, framebuffers);
#elif defined(GL_OES_framebuffer_object)
glGenFramebuffersOES(n, framebuffers);
#endif
}
inline GLenum irrGlCheckFramebufferStatus(GLenum target)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlCheckFramebufferStatusOES)
return pGlCheckFramebufferStatusOES(target);
else
return 0;
#elif defined(GL_OES_framebuffer_object)
return glCheckFramebufferStatusOES(target);
#else
return 0;
#endif
}
inline void irrGlFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlFramebufferTexture2DOES)
pGlFramebufferTexture2DOES(target, attachment, textarget, texture, level);
#elif defined(GL_OES_framebuffer_object)
glFramebufferTexture2DOES(target, attachment, textarget, texture, level);
#endif
}
inline void irrGlGenerateMipmap(GLenum target)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlGenerateMipmapOES)
pGlGenerateMipmapOES(target);
#elif defined(GL_OES_framebuffer_object)
glGenerateMipmapOES(target);
#endif
}
inline void irrGlActiveStencilFace(GLenum face)
@ -159,22 +133,14 @@ namespace video
inline void irrGlBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlBlendFuncSeparateOES)
pGlBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
#elif defined(GL_OES_blend_func_separate)
glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
#endif
}
inline void irrGlBlendEquation(GLenum mode)
{
#ifdef _IRR_OGLES1_USE_EXTPOINTER_
if (pGlBlendEquationOES)
pGlBlendEquationOES(mode);
#elif defined(GL_OES_blend_subtract)
glBlendEquationOES(mode);
#endif
}
inline void irrGlEnableIndexed(GLenum target, GLuint index)
@ -210,7 +176,6 @@ namespace video
u8 MaxUserClipPlanes;
u8 MaxLights;
#if defined(_IRR_OGLES1_USE_EXTPOINTER_)
PFNGLBLENDEQUATIONOESPROC pGlBlendEquationOES;
PFNGLBLENDFUNCSEPARATEOESPROC pGlBlendFuncSeparateOES;
PFNGLBINDFRAMEBUFFEROESPROC pGlBindFramebufferOES;
@ -219,7 +184,6 @@ namespace video
PFNGLCHECKFRAMEBUFFERSTATUSOESPROC pGlCheckFramebufferStatusOES;
PFNGLFRAMEBUFFERTEXTURE2DOESPROC pGlFramebufferTexture2DOES;
PFNGLGENERATEMIPMAPOESPROC pGlGenerateMipmapOES;
#endif
};
}