summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texgen.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-09-08 11:01:19 +0800
committerBrian Paul <[email protected]>2009-09-30 08:31:55 -0600
commitcc95de82e5939586771d478e662cb458bbc42c20 (patch)
tree1e1a7821e623eb867211f6202b1d77449e2ba589 /src/mesa/main/texgen.c
parent301a510092859d2e214d64f4ac2ebe03d591c64b (diff)
mesa/main: Make FEATURE_texgen follow feature conventions.
As shown in mfeatures.h, this allows users of texgen.h to work without knowing if the feature is available.
Diffstat (limited to 'src/mesa/main/texgen.c')
-rw-r--r--src/mesa/main/texgen.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index b3ecfc784e3..733e129fcfe 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -37,6 +37,10 @@
#include "main/texgen.h"
#include "main/texstate.h"
#include "math/m_matrix.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_texgen
/**
@@ -162,7 +166,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
{
GLfloat p[4];
@@ -179,7 +183,7 @@ _mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGend(GLenum coord, GLenum pname, GLdouble param )
{
GLfloat p = (GLfloat) param;
@@ -187,7 +191,7 @@ _mesa_TexGend(GLenum coord, GLenum pname, GLdouble param )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
{
GLfloat p[4];
@@ -204,7 +208,7 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
{
_mesa_TexGenfv(coord, pname, &param);
@@ -219,7 +223,7 @@ _mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
{
struct gl_texture_unit *texUnit;
@@ -257,7 +261,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
{
struct gl_texture_unit *texUnit;
@@ -295,7 +299,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
{
struct gl_texture_unit *texUnit;
@@ -338,3 +342,19 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
}
+void
+_mesa_init_texgen_dispatch(struct _glapi_table *disp)
+{
+ SET_GetTexGendv(disp, _mesa_GetTexGendv);
+ SET_GetTexGenfv(disp, _mesa_GetTexGenfv);
+ SET_GetTexGeniv(disp, _mesa_GetTexGeniv);
+ SET_TexGend(disp, _mesa_TexGend);
+ SET_TexGendv(disp, _mesa_TexGendv);
+ SET_TexGenf(disp, _mesa_TexGenf);
+ SET_TexGenfv(disp, _mesa_TexGenfv);
+ SET_TexGeni(disp, _mesa_TexGeni);
+ SET_TexGeniv(disp, _mesa_TexGeniv);
+}
+
+
+#endif /* FEATURE_texgen */