mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-25 02:00:30 +01:00
Add more GlTextureParameter wrapper to COpenGLExtensionHandler
Sorry, just a hack to make it easier to work around Irrlicht :-( Would be nice to have a general mechanism to load native gl functions in Irrlicht from apps... git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6074 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
7b1ee6468d
commit
9c837aa41b
@ -88,7 +88,8 @@ COpenGLExtensionHandler::COpenGLExtensionHandler() :
|
||||
pGlBlendEquationIndexedAMD(0), pGlBlendEquationiARB(0), pGlBlendEquationSeparateIndexedAMD(0), pGlBlendEquationSeparateiARB(0),
|
||||
// DSA
|
||||
pGlTextureStorage2D(0), pGlTextureStorage3D(0), pGlTextureSubImage2D(0), pGlGetTextureImage(0), pGlNamedFramebufferTexture(0),
|
||||
pGlTextureParameteri(0), pGlCreateTextures(0), pGlCreateFramebuffers(0), pGlBindTextures(0), pGlGenerateTextureMipmap(0),
|
||||
pGlTextureParameteri(0), pGlTextureParameterf(0), pGlTextureParameteriv(0), pGlTextureParameterfv(0),
|
||||
pGlCreateTextures(0), pGlCreateFramebuffers(0), pGlBindTextures(0), pGlGenerateTextureMipmap(0),
|
||||
// DSA with EXT or functions to simulate it
|
||||
pGlTextureStorage2DEXT(0), pGlTexStorage2D(0), pGlTextureStorage3DEXT(0), pGlTexStorage3D(0), pGlTextureSubImage2DEXT(0), pGlGetTextureImageEXT(0),
|
||||
pGlNamedFramebufferTextureEXT(0), pGlFramebufferTexture(0), pGlGenerateTextureMipmapEXT(0)
|
||||
@ -586,6 +587,10 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
|
||||
pGlGetTextureImage = (PFNGLGETTEXTUREIMAGEPROC)IRR_OGL_LOAD_EXTENSION("glGetTextureImage");
|
||||
pGlNamedFramebufferTexture = (PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) IRR_OGL_LOAD_EXTENSION("glNamedFramebufferTexture");
|
||||
pGlTextureParameteri = (PFNGLTEXTUREPARAMETERIPROC) IRR_OGL_LOAD_EXTENSION("glTextureParameteri");
|
||||
pGlTextureParameterf = (PFNGLTEXTUREPARAMETERFPROC)IRR_OGL_LOAD_EXTENSION("glTextureParameterf");
|
||||
pGlTextureParameteriv = (PFNGLTEXTUREPARAMETERIVPROC)IRR_OGL_LOAD_EXTENSION("glTextureParameteriv");
|
||||
pGlTextureParameterfv = (PFNGLTEXTUREPARAMETERFVPROC)IRR_OGL_LOAD_EXTENSION("glTextureParameterfv");
|
||||
|
||||
pGlCreateTextures = (PFNGLCREATETEXTURESPROC) IRR_OGL_LOAD_EXTENSION("glCreateTextures");
|
||||
pGlCreateFramebuffers = (PFNGLCREATEFRAMEBUFFERSPROC) IRR_OGL_LOAD_EXTENSION("glCreateFramebuffers");
|
||||
pGlBindTextures = (PFNGLBINDTEXTURESPROC) IRR_OGL_LOAD_EXTENSION("glBindTextures");
|
||||
|
@ -1203,6 +1203,9 @@ class COpenGLExtensionHandler
|
||||
void extGlGetTextureImage(GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* pixels);
|
||||
void extGlNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
|
||||
void extGlTextureParameteri(GLuint texture, GLenum pname, GLint param);
|
||||
void extGlTextureParameterf(GLuint texture, GLenum pname, GLfloat param);
|
||||
void extGlTextureParameteriv(GLuint texture, GLenum pname, const GLint* params);
|
||||
void extGlTextureParameterfv(GLuint texture, GLenum pname, const GLfloat* params);
|
||||
void extGlCreateTextures(GLenum target, GLsizei n, GLuint* textures);
|
||||
void extGlCreateFramebuffers(GLsizei n, GLuint* framebuffers);
|
||||
void extGlBindTextures(GLuint first, GLsizei count, const GLuint *textures, const GLenum* targets);
|
||||
@ -1373,6 +1376,10 @@ class COpenGLExtensionHandler
|
||||
PFNGLGETTEXTUREIMAGEPROC pGlGetTextureImage;
|
||||
PFNGLNAMEDFRAMEBUFFERTEXTUREPROC pGlNamedFramebufferTexture;
|
||||
PFNGLTEXTUREPARAMETERIPROC pGlTextureParameteri;
|
||||
PFNGLTEXTUREPARAMETERFPROC pGlTextureParameterf;
|
||||
PFNGLTEXTUREPARAMETERIVPROC pGlTextureParameteriv;
|
||||
PFNGLTEXTUREPARAMETERFVPROC pGlTextureParameterfv;
|
||||
|
||||
PFNGLCREATETEXTURESPROC pGlCreateTextures;
|
||||
PFNGLCREATEFRAMEBUFFERSPROC pGlCreateFramebuffers;
|
||||
PFNGLBINDTEXTURESPROC pGlBindTextures;
|
||||
@ -3086,8 +3093,30 @@ inline void COpenGLExtensionHandler::extGlTextureParameteri(GLuint texture, GLen
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureParameteri)
|
||||
pGlTextureParameteri(texture, pname, param);
|
||||
#else
|
||||
// TODO
|
||||
#endif//_IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlTextureParameterf(GLuint texture, GLenum pname, GLfloat param)
|
||||
{
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureParameterf)
|
||||
pGlTextureParameterf(texture, pname, param);
|
||||
#endif//_IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlTextureParameteriv(GLuint texture, GLenum pname, const GLint* params)
|
||||
{
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureParameteriv)
|
||||
pGlTextureParameteriv(texture, pname, params);
|
||||
#endif//_IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlTextureParameterfv(GLuint texture, GLenum pname, const GLfloat* params)
|
||||
{
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureParameterfv)
|
||||
pGlTextureParameterfv(texture, pname, params);
|
||||
#endif//_IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user