Consolidated source files. Since the re-org a number of source files
only had one or two functions left in them.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: texstate.c,v 1.53 2001/06/13 14:56:14 brianp Exp $ */
|
||||
/* $Id: texstate.c,v 1.54 2001/06/18 17:26:08 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -2062,3 +2062,135 @@ _mesa_ClientActiveTextureARB( GLenum target )
|
||||
FLUSH_VERTICES(ctx, _NEW_ARRAY);
|
||||
ctx->Array.ActiveTexture = texUnit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
/* Pixel Texgen Extensions */
|
||||
/**********************************************************************/
|
||||
|
||||
void
|
||||
_mesa_PixelTexGenSGIX(GLenum mode)
|
||||
{
|
||||
GLenum newRgbSource, newAlphaSource;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
switch (mode) {
|
||||
case GL_NONE:
|
||||
newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
|
||||
newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
|
||||
break;
|
||||
case GL_ALPHA:
|
||||
newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
|
||||
newAlphaSource = GL_CURRENT_RASTER_COLOR;
|
||||
break;
|
||||
case GL_RGB:
|
||||
newRgbSource = GL_CURRENT_RASTER_COLOR;
|
||||
newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
|
||||
break;
|
||||
case GL_RGBA:
|
||||
newRgbSource = GL_CURRENT_RASTER_COLOR;
|
||||
newAlphaSource = GL_CURRENT_RASTER_COLOR;
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenSGIX(mode)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (newRgbSource == ctx->Pixel.FragmentRgbSource &&
|
||||
newAlphaSource == ctx->Pixel.FragmentAlphaSource)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_PIXEL);
|
||||
ctx->Pixel.FragmentRgbSource = newRgbSource;
|
||||
ctx->Pixel.FragmentAlphaSource = newAlphaSource;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value)
|
||||
{
|
||||
_mesa_PixelTexGenParameteriSGIS(target, (GLint) value);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value)
|
||||
{
|
||||
_mesa_PixelTexGenParameteriSGIS(target, (GLint) *value);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (value != GL_CURRENT_RASTER_COLOR && value != GL_PIXEL_GROUP_COLOR_SGIS) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(value)");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (target) {
|
||||
case GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS:
|
||||
if (ctx->Pixel.FragmentRgbSource == (GLenum) value)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_PIXEL);
|
||||
ctx->Pixel.FragmentRgbSource = (GLenum) value;
|
||||
break;
|
||||
case GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS:
|
||||
if (ctx->Pixel.FragmentAlphaSource == (GLenum) value)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_PIXEL);
|
||||
ctx->Pixel.FragmentAlphaSource = (GLenum) value;
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(target)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value)
|
||||
{
|
||||
_mesa_PixelTexGenParameteriSGIS(target, *value);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) {
|
||||
*value = (GLfloat) ctx->Pixel.FragmentRgbSource;
|
||||
}
|
||||
else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) {
|
||||
*value = (GLfloat) ctx->Pixel.FragmentAlphaSource;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterfvSGIS(target)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) {
|
||||
*value = (GLint) ctx->Pixel.FragmentRgbSource;
|
||||
}
|
||||
else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) {
|
||||
*value = (GLint) ctx->Pixel.FragmentAlphaSource;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterivSGIS(target)");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user