added missing texture cube map targets
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 8 Jun 2002 12:39:18 +0000 (12:39 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 8 Jun 2002 12:39:18 +0000 (12:39 +0000)
src/mesa/main/colortab.c

index d9b796c1e7462931fa5cef9317de0c454c19f99f..d4c745fab2f45fe331972a038657cd8cc21f0559 100644 (file)
@@ -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;