typedef PFN's explicitly

This commit is contained in:
David Rose 2004-12-01 23:01:30 +00:00
parent de8da3d285
commit c25138f82c
3 changed files with 22 additions and 4 deletions

View File

@ -347,7 +347,7 @@ reset() {
_glBlendEquation = NULL; _glBlendEquation = NULL;
if (has_extension("GL_EXT_blend_minmax") || is_at_least_version(1, 2)) { if (has_extension("GL_EXT_blend_minmax") || is_at_least_version(1, 2)) {
_glBlendEquation = (PFNGLBLENDEQUATIONEXTPROC) _glBlendEquation = (PFNGLBLENDEQUATIONPROC)
get_extension_func(GLPREFIX_QUOTED, "BlendEquationEXT"); get_extension_func(GLPREFIX_QUOTED, "BlendEquationEXT");
if (_glBlendEquation == NULL) { if (_glBlendEquation == NULL) {
GLCAT.warning() GLCAT.warning()
@ -360,7 +360,7 @@ reset() {
_glBlendColor = NULL; _glBlendColor = NULL;
if (has_extension("GL_EXT_blend_color") || is_at_least_version(1, 2)) { if (has_extension("GL_EXT_blend_color") || is_at_least_version(1, 2)) {
_glBlendColor = (PFNGLBLENDCOLOREXTPROC) _glBlendColor = (PFNGLBLENDCOLORPROC)
get_extension_func(GLPREFIX_QUOTED, "BlendColorEXT"); get_extension_func(GLPREFIX_QUOTED, "BlendColorEXT");
if (_glBlendColor == NULL) { if (_glBlendColor == NULL) {
GLCAT.warning() GLCAT.warning()
@ -3993,6 +3993,7 @@ get_fog_mode_type(Fog::Mode m) {
GLenum CLP(GraphicsStateGuardian):: GLenum CLP(GraphicsStateGuardian)::
get_blend_equation_type(ColorBlendAttrib::Mode mode) { get_blend_equation_type(ColorBlendAttrib::Mode mode) {
switch (mode) { switch (mode) {
case ColorBlendAttrib::M_none:
case ColorBlendAttrib::M_add: case ColorBlendAttrib::M_add:
return GL_FUNC_ADD; return GL_FUNC_ADD;

View File

@ -39,6 +39,16 @@
class PlaneNode; class PlaneNode;
class Light; class Light;
// These typedefs are declared in glext.h, but we must repeat them
// here, mainly because they will not be included from glext.h if the
// system GL version matches or exceeds the GL version in which these
// functions are defined, and the system gl.h sometimes doesn't
// declare these typedefs.
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : GLGraphicsStateGuardian // Class : GLGraphicsStateGuardian
// Description : A GraphicsStateGuardian specialized for rendering // Description : A GraphicsStateGuardian specialized for rendering
@ -279,8 +289,8 @@ public:
PFNGLACTIVETEXTUREPROC _glActiveTexture; PFNGLACTIVETEXTUREPROC _glActiveTexture;
PFNGLMULTITEXCOORD2FVPROC _glMultiTexCoord2fv; PFNGLMULTITEXCOORD2FVPROC _glMultiTexCoord2fv;
PFNGLBLENDEQUATIONEXTPROC _glBlendEquation; PFNGLBLENDEQUATIONPROC _glBlendEquation;
PFNGLBLENDCOLOREXTPROC _glBlendColor; PFNGLBLENDCOLORPROC _glBlendColor;
GLenum _edge_clamp; GLenum _edge_clamp;
GLenum _border_clamp; GLenum _border_clamp;

View File

@ -30,6 +30,13 @@
// includes gl.h). // includes gl.h).
#include "glxext.h" #include "glxext.h"
// These typedefs are declared in glxext.h, but we must repeat them
// here, mainly because they will not be included from glxext.h if the
// system GLX version matches or exceeds the GLX version in which
// these functions are defined, and the system glx.h sometimes doesn't
// declare these typedefs.
typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : glxGraphicsStateGuardian // Class : glxGraphicsStateGuardian
// Description : A tiny specialization on GLGraphicsStateGuardian to // Description : A tiny specialization on GLGraphicsStateGuardian to