summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-06-08 12:39:18 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-06-08 12:39:18 +0000
commitdd41748f63b819c36c4234a525e5609660ceb395 (patch)
treeacd5728d41f5a3f31c06d40ec9d85df0d959daa2 /src
parent3f058cd2c5a7e71eaff6adb011a78d797231e470 (diff)
added missing texture cube map targets
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/colortab.c69
1 files changed, 66 insertions, 3 deletions
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index d9b796c1e7..d4c745fab2 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -1,10 +1,10 @@
-/* $Id: colortab.c,v 1.42 2001/09/15 18:02:49 brianp Exp $ */
+/* $Id: colortab.c,v 1.43 2002/06/08 12:39:18 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -213,6 +213,14 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
texObj = texUnit->Current3D;
table = &texObj->Palette;
break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
+ return;
+ }
+ texObj = texUnit->CurrentCubeMap;
+ table = &texObj->Palette;
+ break;
case GL_PROXY_TEXTURE_1D:
texObj = ctx->Texture.Proxy1D;
table = &texObj->Palette;
@@ -228,6 +236,14 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
table = &texObj->Palette;
proxy = GL_TRUE;
break;
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
+ return;
+ }
+ texObj = ctx->Texture.ProxyCubeMap;
+ table = &texObj->Palette;
+ break;
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
@@ -456,6 +472,14 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
texObj = texUnit->Current3D;
table = &texObj->Palette;
break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
+ return;
+ }
+ texObj = texUnit->CurrentCubeMap;
+ table = &texObj->Palette;
+ break;
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
@@ -654,6 +678,13 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_TEXTURE_3D:
table = &texUnit->Current3D->Palette;
break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
+ return;
+ }
+ table = &texUnit->CurrentCubeMap->Palette;
+ break;
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
@@ -928,6 +959,14 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_TEXTURE_3D:
table = &texUnit->Current3D->Palette;
break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetColorTableParameterfv(target)");
+ return;
+ }
+ table = &texUnit->CurrentCubeMap->Palette;
+ break;
case GL_PROXY_TEXTURE_1D:
table = &ctx->Texture.Proxy1D->Palette;
break;
@@ -937,6 +976,14 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_PROXY_TEXTURE_3D:
table = &ctx->Texture.Proxy3D->Palette;
break;
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetColorTableParameterfv(target)");
+ return;
+ }
+ table = &ctx->Texture.ProxyCubeMap->Palette;
+ break;
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
@@ -1058,6 +1105,14 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_TEXTURE_3D:
table = &texUnit->Current3D->Palette;
break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetColorTableParameteriv(target)");
+ return;
+ }
+ table = &texUnit->CurrentCubeMap->Palette;
+ break;
case GL_PROXY_TEXTURE_1D:
table = &ctx->Texture.Proxy1D->Palette;
break;
@@ -1067,6 +1122,14 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_PROXY_TEXTURE_3D:
table = &ctx->Texture.Proxy3D->Palette;
break;
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ if (!ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetColorTableParameteriv(target)");
+ return;
+ }
+ table = &ctx->Texture.ProxyCubeMap->Palette;
+ break;
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;