aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/colortab.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-02 10:53:27 +0000
committermarha <marha@users.sourceforge.net>2011-03-02 10:53:27 +0000
commit43fb99508848b8e9f4ced9a7e7a6c3692047fbf1 (patch)
tree8cba41c6dda06adfd2a2f88eff6e54ab6d4204cf /mesalib/src/mesa/main/colortab.c
parent717b1a4e21b372e1343e33ae9348fbe5c6f8d7ed (diff)
parent56950d7bed70ee82186f44f9333537cdbb33c448 (diff)
downloadvcxsrv-43fb99508848b8e9f4ced9a7e7a6c3692047fbf1.tar.gz
vcxsrv-43fb99508848b8e9f4ced9a7e7a6c3692047fbf1.tar.bz2
vcxsrv-43fb99508848b8e9f4ced9a7e7a6c3692047fbf1.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/colortab.c')
-rw-r--r--mesalib/src/mesa/main/colortab.c127
1 files changed, 7 insertions, 120 deletions
diff --git a/mesalib/src/mesa/main/colortab.c b/mesalib/src/mesa/main/colortab.c
index 9c23e253b..48318248e 100644
--- a/mesalib/src/mesa/main/colortab.c
+++ b/mesalib/src/mesa/main/colortab.c
@@ -32,6 +32,7 @@
#include "mfeatures.h"
#include "mtypes.h"
#include "pack.h"
+#include "pbo.h"
#include "state.h"
#include "teximage.h"
#include "texstate.h"
@@ -300,23 +301,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- scale = ctx->Pixel.TextureColorTableScale;
- bias = ctx->Pixel.TextureColorTableBias;
- break;
- case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
- return;
- }
- table = &(texUnit->ProxyColorTable);
- proxy = GL_TRUE;
- break;
default:
/* try texture targets */
{
@@ -435,15 +419,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- scale = ctx->Pixel.TextureColorTableScale;
- bias = ctx->Pixel.TextureColorTableBias;
- break;
default:
/* try texture targets */
texObj = _mesa_select_tex_object(ctx, texUnit, target);
@@ -551,13 +526,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- break;
default:
/* try texture targets */
{
@@ -661,32 +629,10 @@ _mesa_GetColorTable( GLenum target, GLenum format,
static void GLAPIENTRY
_mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
{
- GLfloat *scale, *bias;
+ /* no extensions use this function */
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
-
- switch (target) {
- case GL_TEXTURE_COLOR_TABLE_SGI:
- scale = ctx->Pixel.TextureColorTableScale;
- bias = ctx->Pixel.TextureColorTableBias;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)");
- return;
- }
-
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(scale, params);
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(bias, params);
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)");
- return;
- }
-
- ctx->NewState |= _NEW_PIXEL;
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(target)");
}
@@ -694,19 +640,10 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
static void GLAPIENTRY
_mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
{
- GLfloat fparams[4];
- if (pname == GL_TEXTURE_COLOR_TABLE_SGI) {
- /* four values */
- fparams[0] = (GLfloat) params[0];
- fparams[1] = (GLfloat) params[1];
- fparams[2] = (GLfloat) params[2];
- fparams[3] = (GLfloat) params[3];
- }
- else {
- /* one values */
- fparams[0] = (GLfloat) params[0];
- }
- _mesa_ColorTableParameterfv(target, pname, fparams);
+ /* no extensions use this function */
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameteriv(target)");
}
@@ -723,28 +660,6 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.TextureColorTableScale);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.TextureColorTableBias);
- return;
- }
- break;
- case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ProxyColorTable);
- break;
default:
/* try texture targets */
{
@@ -808,34 +723,6 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- params[0] = (GLint) ctx->Pixel.TextureColorTableScale[0];
- params[1] = (GLint) ctx->Pixel.TextureColorTableScale[1];
- params[2] = (GLint) ctx->Pixel.TextureColorTableScale[2];
- params[3] = (GLint) ctx->Pixel.TextureColorTableScale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- params[0] = (GLint) ctx->Pixel.TextureColorTableBias[0];
- params[1] = (GLint) ctx->Pixel.TextureColorTableBias[1];
- params[2] = (GLint) ctx->Pixel.TextureColorTableBias[2];
- params[3] = (GLint) ctx->Pixel.TextureColorTableBias[3];
- return;
- }
- break;
- case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ProxyColorTable);
- break;
default:
/* Try texture targets */
{