removed detection of GL_NV_texture_shader extension which was previously used for...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 21 Mar 2006 09:06:02 +0000 (09:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 21 Mar 2006 09:06:02 +0000 (09:06 +0000)
removed support for GL_DSDT_NV textures (which were only used for the geforce3 water shader)
removed code pertaining to GL_NV_vertex_array_range (which hasn't been supported for a very long time)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6158 d7cf8633-e32d-0410-b094-e92efae38249

gl_textures.c
glquake.h
r_textures.h
vid.h
vid_shared.c

index b39b3e3..7a53cd3 100644 (file)
@@ -39,7 +39,6 @@ static textypeinfo_t textype_rgb           = {TEXTYPE_RGB    , 3, 3, GL_RGB    ,
 static textypeinfo_t textype_rgba          = {TEXTYPE_RGBA   , 4, 4, GL_RGBA   , 3};
 static textypeinfo_t textype_palette_alpha = {TEXTYPE_PALETTE, 1, 4, GL_RGBA   , 4};
 static textypeinfo_t textype_rgba_alpha    = {TEXTYPE_RGBA   , 4, 4, GL_RGBA   , 4};
-static textypeinfo_t textype_dsdt          = {TEXTYPE_DSDT   , 2, 2, GL_DSDT_NV, GL_DSDT8_NV};
 
 #define GLTEXTURETYPE_1D 0
 #define GLTEXTURETYPE_2D 1
@@ -145,8 +144,6 @@ static textypeinfo_t *R_GetTexTypeInfo(int textype, int flags)
                        return &textype_rgb;
                case TEXTYPE_RGBA:
                        return &textype_rgba;
-               case TEXTYPE_DSDT:
-                       return &textype_dsdt;
                default:
                        Host_Error("R_GetTexTypeInfo: unknown texture format");
                        return NULL;
@@ -881,8 +878,6 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden
                        }
                }
                break;
-       case TEXTYPE_DSDT:
-               break;
        default:
                Host_Error("R_LoadTexture: unknown texture type");
        }
index f8066af..a119923 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -312,17 +312,6 @@ extern int gl_combine_extension;
 #endif
 
 
-extern int gl_textureshader;
-#ifndef GL_TEXTURE_SHADER_NV
-#define GL_TEXTURE_SHADER_NV                   0x86DE
-#define GL_SHADER_OPERATION_NV                 0x86DF
-#define GL_OFFSET_TEXTURE_MATRIX_NV            0x86E1
-#define GL_PREVIOUS_TEXTURE_INPUT_NV   0x86E4
-#define GL_OFFSET_TEXTURE_2D_NV                        0x86E8
-#define GL_DSDT_NV                                             0x86F5
-#define GL_DSDT8_NV                                            0x8709
-#endif
-
 extern int gl_texture3d;
 extern int gl_max_3d_texture_size;
 #ifndef GL_TEXTURE_3D
index be6dbe0..5cd1aa8 100644 (file)
@@ -27,8 +27,6 @@
 #define TEXTYPE_RGB 2
 // 32bit RGBA
 #define TEXTYPE_RGBA 3
-// 16bit DSDT
-#define TEXTYPE_DSDT 4
 
 // contents of this structure are mostly private to gl_textures.c
 typedef struct rtexture_s
diff --git a/vid.h b/vid.h
index c2b3e1f..5aae1b4 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -101,11 +101,6 @@ extern int gl_videosyncavailable;
 void *GL_GetProcAddress(const char *name);
 int GL_CheckExtension(const char *name, const dllfunction_t *funcs, const char *disableparm, int silent);
 
-// this attempts to use vendor extensions to allocate faster vertex memory if
-// the fast parameter is true, if unsuccessful it uses Mem_Alloc instead
-void *VID_AllocVertexArrays(mempool_t *pool, int size, int fast, float readfrequency, float writefrequency, float priority);
-void VID_FreeVertexArrays(void *pointer);
-
 void VID_Shared_Init(void);
 
 void GL_Init (void);
index 61e506a..0a8a2d1 100644 (file)
@@ -40,8 +40,6 @@ int gl_support_clamptoedge = false;
 // GL_EXT_texture_filter_anisotropic
 int gl_support_anisotropy = false;
 int gl_max_anisotropy = 1;
-// GL_NV_texture_shader
-int gl_textureshader = false;
 // GL_EXT_stencil_two_side
 int gl_support_stenciltwoside = false;
 // GL_ARB_shader_objects
@@ -126,12 +124,6 @@ void (GLAPIENTRY *qglClientActiveTexture) (GLenum);
 void (GLAPIENTRY *qglLockArraysEXT) (GLint first, GLint count);
 void (GLAPIENTRY *qglUnlockArraysEXT) (void);
 
-//GL_NV_vertex_array_range
-GLvoid *(GLAPIENTRY *qglAllocateMemoryNV)(GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
-GLvoid (GLAPIENTRY *qglFreeMemoryNV)(GLvoid *pointer);
-GLvoid (GLAPIENTRY *qglVertexArrayRangeNV)(GLsizei length, GLvoid *pointer);
-GLvoid (GLAPIENTRY *qglFlushVertexArrayRangeNV)(GLvoid);
-
 // general GL functions
 
 void (GLAPIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
@@ -635,7 +627,6 @@ void VID_CheckExtensions(void)
        gl_support_clamptoedge = false;
        gl_support_anisotropy = false;
        gl_max_anisotropy = 1;
-       gl_textureshader = false;
        gl_support_stenciltwoside = false;
        gl_support_shader_objects = false;
        gl_support_shading_language_100 = false;
@@ -685,9 +676,6 @@ void VID_CheckExtensions(void)
        if ((gl_support_anisotropy = GL_CheckExtension("GL_EXT_texture_filter_anisotropic", NULL, "-noanisotropy", false)))
                qglGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_max_anisotropy);
 
-// COMMANDLINEOPTION: GL: -notextureshader disables GL_NV_texture_shader (required for the Geforce3 water shader, NVIDIA only)
-       gl_textureshader = GL_CheckExtension("GL_NV_texture_shader", NULL, "-notextureshader", false);
-
 // COMMANDLINEOPTION: GL: -nostenciltwoside disables GL_EXT_stencil_two_side (accelerates shadow rendering)
        gl_support_stenciltwoside = GL_CheckExtension("GL_EXT_stencil_two_side", stenciltwosidefuncs, "-nostenciltwoside", false);
 
@@ -708,38 +696,6 @@ void VID_CheckExtensions(void)
        gl_support_half_float = GL_CheckExtension("GL_NV_half_float", NULL, "-nohalffloat", false);
 }
 
-qboolean vid_vertexarrays_are_var = false;
-void *VID_AllocVertexArrays(mempool_t *pool, int size, int fast, float readfrequency, float writefrequency, float priority)
-{
-       void *m;
-       vid_vertexarrays_are_var = false;
-       if (fast && qglAllocateMemoryNV)
-       {
-               CHECKGLERROR
-               m = qglAllocateMemoryNV(size, readfrequency, writefrequency, priority);
-               CHECKGLERROR
-               if (m)
-               {
-                       vid_vertexarrays_are_var = true;
-                       return m;
-               }
-       }
-       return Mem_Alloc(pool, size);
-}
-
-void VID_FreeVertexArrays(void *pointer)
-{
-       if (vid_vertexarrays_are_var)
-       {
-               CHECKGLERROR
-               qglFreeMemoryNV(pointer);
-               CHECKGLERROR
-       }
-       else
-               Mem_Free(pointer);
-       vid_vertexarrays_are_var = false;
-}
-
 void Force_CenterView_f (void)
 {
        cl.viewangles[PITCH] = 0;