mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix pfn types for linux
This commit is contained in:
parent
26664d4f5b
commit
1e8a6a9fee
@ -349,12 +349,24 @@ reset() {
|
|||||||
_supports_3d_texture =
|
_supports_3d_texture =
|
||||||
has_extension("GL_EXT_texture3D") || is_at_least_version(1, 2);
|
has_extension("GL_EXT_texture3D") || is_at_least_version(1, 2);
|
||||||
|
|
||||||
if (_supports_3d_texture) {
|
if (is_at_least_version(1, 2)) {
|
||||||
|
_supports_3d_texture = true;
|
||||||
|
|
||||||
_glTexImage3D = (PFNGLTEXIMAGE3DPROC)
|
_glTexImage3D = (PFNGLTEXIMAGE3DPROC)
|
||||||
get_extension_func(GLPREFIX_QUOTED, "TexImage3D");
|
get_extension_func(GLPREFIX_QUOTED, "TexImage3D");
|
||||||
_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)
|
_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)
|
||||||
get_extension_func(GLPREFIX_QUOTED, "TexSubImage3D");
|
get_extension_func(GLPREFIX_QUOTED, "TexSubImage3D");
|
||||||
|
|
||||||
|
} else if (has_extension("GL_EXT_texture3D")) {
|
||||||
|
_supports_3d_texture = true;
|
||||||
|
|
||||||
|
_glTexImage3D = (PFNGLTEXIMAGE3DPROC)
|
||||||
|
get_extension_func(GLPREFIX_QUOTED, "TexImage3DEXT");
|
||||||
|
_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)
|
||||||
|
get_extension_func(GLPREFIX_QUOTED, "TexSubImage3DEXT");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_supports_3d_texture) {
|
||||||
if (_glTexImage3D == NULL || _glTexSubImage3D == NULL) {
|
if (_glTexImage3D == NULL || _glTexSubImage3D == NULL) {
|
||||||
GLCAT.warning()
|
GLCAT.warning()
|
||||||
<< "3-D textures advertised as supported by OpenGL runtime, but could not get pointers to extension functions.\n";
|
<< "3-D textures advertised as supported by OpenGL runtime, but could not get pointers to extension functions.\n";
|
||||||
|
@ -48,6 +48,8 @@ class Light;
|
|||||||
// system GL version matches or exceeds the GL version in which these
|
// system GL version matches or exceeds the GL version in which these
|
||||||
// functions are defined, and the system gl.h sometimes doesn't
|
// functions are defined, and the system gl.h sometimes doesn't
|
||||||
// declare these typedefs.
|
// declare these typedefs.
|
||||||
|
typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||||
|
typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
|
||||||
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
|
typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
|
||||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user