aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texgen.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
committermarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
commit14b1cb8d5a27ec9716d3f790fce95f0469e35605 (patch)
tree6c94dc9f37b19b995bec603141442b1b93e8c9d2 /mesalib/src/mesa/main/texgen.c
parent93c85587c691f9b91e7c2d8bda50f453e0f6674d (diff)
downloadvcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.gz
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.bz2
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.zip
Updated to Mesa 7.7
Diffstat (limited to 'mesalib/src/mesa/main/texgen.c')
-rw-r--r--mesalib/src/mesa/main/texgen.c59
1 files changed, 44 insertions, 15 deletions
diff --git a/mesalib/src/mesa/main/texgen.c b/mesalib/src/mesa/main/texgen.c
index e3feb024c..be4e03bc5 100644
--- a/mesalib/src/mesa/main/texgen.c
+++ b/mesalib/src/mesa/main/texgen.c
@@ -35,7 +35,12 @@
#include "main/enums.h"
#include "main/macros.h"
#include "main/texgen.h"
+#include "main/texstate.h"
#include "math/m_matrix.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_texgen
/**
@@ -79,7 +84,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -161,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];
@@ -178,15 +183,17 @@ _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;
- _mesa_TexGenfv( coord, pname, &p );
+ GLfloat p[4];
+ p[0] = (GLfloat) param;
+ p[1] = p[2] = p[3] = 0.0F;
+ _mesa_TexGenfv( coord, pname, p );
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
{
GLfloat p[4];
@@ -203,22 +210,28 @@ _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);
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ _mesa_TexGenfv(coord, pname, p);
}
void GLAPIENTRY
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
{
- _mesa_TexGeniv( coord, pname, &param );
+ GLint p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0;
+ _mesa_TexGeniv( coord, pname, p );
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
{
struct gl_texture_unit *texUnit;
@@ -231,7 +244,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -256,7 +269,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;
@@ -269,7 +282,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -294,7 +307,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;
@@ -307,7 +320,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -337,3 +350,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 */