Search and replace job to get to compile

This commit is contained in:
jpaana 2004-03-24 00:20:38 +00:00
parent c6624eba2d
commit 7e5d433eea
6 changed files with 761 additions and 742 deletions

File diff suppressed because it is too large Load diff

View file

@ -448,6 +448,8 @@ Shader utitlity routines
*************************/
void FormatError(void); // in gl_bumparb.c
void GF3_SetupTcMod(tcmod_t *tc) {
switch (tc->type) {
@ -509,17 +511,13 @@ Generic triangle list routines
*************************/
void FormatError () {
Sys_Error("Invalid vertexdef_t\n");
}
void GF3_sendTriangleListWV(const vertexdef_t *verts, int *indecies, int numIndecies) {
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_TexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//draw them
@ -531,27 +529,29 @@ void GF3_sendTriangleListWV(const vertexdef_t *verts, int *indecies, int numInde
void GF3_sendTriangleListTA(const vertexdef_t *verts, int *indecies, int numIndecies) {
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
if (!verts->texcoords) FormatError();
//Check the input vertices
if (IsNullDriver(verts->texcoords)) FormatError();
if (IsNullDriver(verts->binormals)) FormatError();
if (IsNullDriver(verts->tangents)) FormatError();
if (IsNullDriver(verts->normals)) FormatError();
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->tangents) FormatError();
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->binormals) FormatError();
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->normals) FormatError();
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
GL_TexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//draw them
@ -627,11 +627,11 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
int i;
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!shader->cull) {
@ -649,7 +649,7 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
glMatrixMode(GL_MODELVIEW);
if (verts->lightmapcoords && (lightmapIndex >= 0) && (shader->flags & SURF_PPLIGHT)) {
if (!IsNullDriver(verts->lightmapcoords) && (lightmapIndex >= 0) && (shader->flags & SURF_PPLIGHT)) {
//Delux lightmapping
qboolean usedelux = (sh_delux.value != 0);
@ -660,23 +660,23 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
if (usedelux) {
glNormalPointer(GL_FLOAT, verts->normalstride, verts->normals);
GL_NormalPointer(GL_FLOAT, verts->normalstride, verts->normals);
glEnableClientState(GL_NORMAL_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL_SelectTexture(GL_TEXTURE0_ARB);
@ -778,11 +778,11 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
glEnable(GL_TEXTURE_2D);
GL_Bind(lightmap_textures+lightmapIndex);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@ -796,9 +796,9 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
glDisable(GL_TEXTURE_2D);
GL_SelectTexture(GL_TEXTURE0_ARB);
} else if (verts->colors && (shader->flags & SURF_PPLIGHT)) {
} else if (!IsNullDriver(verts->colors) && (shader->flags & SURF_PPLIGHT)) {
glColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
GL_ColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
glEnableClientState(GL_COLOR_ARRAY);
glShadeModel(GL_SMOOTH);
@ -938,7 +938,7 @@ void GF3_TestAmbientBumps (vertexdef_t *verts, msurface_t **surfs, int numSurfac
//Pass 1: Lightmap (= ambient occlusion) * colormap
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (shader->numcolorstages) {
@ -1053,11 +1053,11 @@ void GF3_drawSurfaceListBase (vertexdef_t *verts, msurface_t **surfs, int numSur
int i;
qboolean usedelux;
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glColor3ub(255,255,255);
@ -1078,14 +1078,14 @@ void GF3_drawSurfaceListBase (vertexdef_t *verts, msurface_t **surfs, int numSur
glPopMatrix();
}
if (verts->lightmapcoords && (shader->flags & SURF_PPLIGHT)) {
if (!IsNullDriver(verts->lightmapcoords) && (shader->flags & SURF_PPLIGHT)) {
#ifdef AMBIENT_BUMP
GF3_TestAmbientBumps(verts, surfs, numSurfaces, shader);
#else
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//Delux lightmapping
@ -1102,11 +1102,11 @@ void GF3_drawSurfaceListBase (vertexdef_t *verts, msurface_t **surfs, int numSur
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL_SelectTexture(GL_TEXTURE0_ARB);
@ -1401,7 +1401,7 @@ void GF3_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs, int numSur
int i, num;
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
@ -1412,7 +1412,7 @@ void GF3_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs, int numSur
GL_DrawAlpha();
GL_EnableAttentShaderGF3(tr);
glTexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_TexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GF3_sendSurfacesPlain(surfs,numSurfaces);
GL_DisableAttentShaderGF3();
@ -1425,7 +1425,7 @@ void GF3_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs, int numSur
num = (currentshadowlight->shader->numstages == 0) ? 1 : currentshadowlight->shader->numstages;
for (i=0; i<num; i++) {
GL_EnableSpecularShaderGF3(tr, lo, i, true,true);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GF3_sendSurfacesTA(surfs,numSurfaces, true);
GL_DisableDiffuseShaderGF3(i);
}

View file

@ -828,11 +828,17 @@ void GL2_drawTriangleListBump (const vertexdef_t *verts, int *indecies,
const transform_t *tr, const lightobject_t *lo)
{
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_AddColor();
glColor3fv(&currentshadowlight->color[0]);
//Check the input vertices
if (IsNullDriver(verts->texcoords)) FormatError();
if (IsNullDriver(verts->binormals)) FormatError();
if (IsNullDriver(verts->tangents)) FormatError();
if (IsNullDriver(verts->normals)) FormatError();
GL2_EnableBumpShader(tr, lo, true, shader);
//bind the correct textures
@ -840,33 +846,25 @@ void GL2_drawTriangleListBump (const vertexdef_t *verts, int *indecies,
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
if (shader->numbumpstages > 0)
GL_BindAdvanced(shader->bumpstages[0].texture[0]);
if (!verts->texcoords)
FormatError();
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_SelectTexture(GL_TEXTURE1_ARB);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
if (shader->numcolorstages > 0)
GL_BindAdvanced(shader->colorstages[0].texture[0]);
if (!verts->tangents)
FormatError();
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
if (!verts->binormals)
FormatError();
GL_SelectTexture(GL_TEXTURE2_ARB);
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
if (!verts->normals)
FormatError();
GL_SelectTexture(GL_TEXTURE3_ARB);
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
GL_TexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
glDrawElements(GL_TRIANGLES, numIndecies, GL_UNSIGNED_INT, indecies);
@ -892,12 +890,12 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
int i;
glGetError();
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
GL_SelectTexture(GL_TEXTURE0_ARB);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!shader->cull)
@ -905,7 +903,7 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
glDisable(GL_CULL_FACE);
}
glColor3ub(255,255,255);
glColor3ub(255,255,255);
for ( i = 0; i < shader->numstages; i++)
{
@ -915,7 +913,7 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
}
glMatrixMode(GL_MODELVIEW);
if (verts->lightmapcoords && (lightmapIndex >= 0) && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->lightmapcoords) && (lightmapIndex >= 0) && (shader->flags & SURF_PPLIGHT))
{
//Delux lightmapping
qboolean usedelux = (sh_delux.value != 0);
@ -965,15 +963,16 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
// Light map
GL_SelectTexture(GL_TEXTURE0_ARB);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride,
verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL_Bind(lightmap_textures+lightmapIndex);
// Delux map
GL_SelectTexture(GL_TEXTURE1_ARB);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL_Bind(lightmap_textures+lightmapIndex+1);
@ -985,15 +984,15 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
GL_BindAdvanced(shader->bumpstages[0].texture[0]);
}
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride,
verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride,
verts->tangents);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
// Setup base texture
GL_SelectTexture(GL_TEXTURE3_ARB);
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride,
verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride,
verts->binormals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (shader->numcolorstages)
@ -1010,8 +1009,8 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
// Normals
qglClientActiveTextureARB(GL_TEXTURE4_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->normalstride,
verts->normals);
GL_TexCoordPointer(3, GL_FLOAT, verts->normalstride,
verts->normals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL2_EnableDeluxShader(shader);
@ -1064,7 +1063,8 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
GL_SelectTexture(GL_TEXTURE0_ARB);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride,
verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@ -1072,7 +1072,8 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
glEnable(GL_TEXTURE_2D);
GL_Bind(lightmap_textures+lightmapIndex);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@ -1086,9 +1087,9 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
}
else
{
if (verts->colors && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->colors) && (shader->flags & SURF_PPLIGHT))
{
glColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
GL_ColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
glEnableClientState(GL_COLOR_ARRAY);
glShadeModel(GL_SMOOTH);
@ -1134,10 +1135,10 @@ void GL2_drawTriangleListBase (vertexdef_t *verts, int *indecies,
{
if (shader->colorstages[0].src_blend >= 0) {
glBlendFunc(shader->colorstages[0].src_blend, shader->colorstages[0].dst_blend);
glEnable(GL_BLEND);
glBlendFunc(shader->colorstages[0].src_blend, shader->colorstages[0].dst_blend);
glEnable(GL_BLEND);
} else {
glDisable(GL_BLEND);
glDisable(GL_BLEND);
}
glColor3f(0,0,0);
@ -1235,13 +1236,13 @@ void GL2_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
int usedelux;
checkerror();
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
GL_SelectTexture(GL_TEXTURE0_ARB);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glColor3ub(255,255,255);
@ -1257,12 +1258,12 @@ void GL2_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
GL2_sendSurfacesBase(surfs, numSurfaces, false);
glPopMatrix();
}
if (verts->lightmapcoords && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->lightmapcoords) && (shader->flags & SURF_PPLIGHT))
{
GL_SelectTexture(GL_TEXTURE1_ARB);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//Delux lightmapping
@ -1495,12 +1496,12 @@ void GL2_sendSurfacesTA(msurface_t** surfs, int numSurfaces, const transform_t *
void GL2_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
int numSurfaces,const transform_t *tr, const lightobject_t *lo)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_AddColor();
glColor3fv(&currentshadowlight->color[0]);

View file

@ -728,11 +728,17 @@ void NV3x_drawTriangleListBump (const vertexdef_t *verts, int *indecies,
const transform_t *tr, const lightobject_t *lo)
{
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_AddColor();
glColor3fv(&currentshadowlight->color[0]);
//Check the input vertices
if (IsNullDriver(verts->texcoords)) FormatError();
if (IsNullDriver(verts->binormals)) FormatError();
if (IsNullDriver(verts->tangents)) FormatError();
if (IsNullDriver(verts->normals)) FormatError();
NV3x_EnableBumpShader(tr, lo, true, shader);
//bind the correct textures
@ -740,33 +746,25 @@ void NV3x_drawTriangleListBump (const vertexdef_t *verts, int *indecies,
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
if (shader->numbumpstages > 0)
GL_BindAdvanced(shader->bumpstages[0].texture[0]);
if (!verts->texcoords)
FormatError();
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_SelectTexture(GL_TEXTURE1_ARB);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
if (shader->numcolorstages > 0)
GL_BindAdvanced(shader->colorstages[0].texture[0]);
if (!verts->tangents)
FormatError();
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
if (!verts->binormals)
FormatError();
GL_SelectTexture(GL_TEXTURE2_ARB);
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
if (!verts->normals)
FormatError();
GL_SelectTexture(GL_TEXTURE3_ARB);
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
GL_TexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
glDrawElements(GL_TRIANGLES, numIndecies, GL_UNSIGNED_INT, indecies);
@ -792,12 +790,12 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
int i;
glGetError();
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
GL_SelectTexture(GL_TEXTURE0_ARB);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!shader->cull)
@ -805,7 +803,7 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
glDisable(GL_CULL_FACE);
}
glColor3ub(255,255,255);
glColor3ub(255,255,255);
for ( i = 0; i < shader->numstages; i++)
{
@ -815,7 +813,7 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
}
glMatrixMode(GL_MODELVIEW);
if (verts->lightmapcoords && (lightmapIndex >= 0) && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->lightmapcoords) && (lightmapIndex >= 0) && (shader->flags & SURF_PPLIGHT))
{
//Delux lightmapping
qboolean usedelux = (sh_delux.value != 0);
@ -865,7 +863,7 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
GL_SelectTexture(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL_Bind(lightmap_textures+lightmapIndex);
@ -873,8 +871,8 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
GL_SelectTexture(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL_Bind(lightmap_textures+lightmapIndex+1);
@ -887,16 +885,16 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
GL_BindAdvanced(shader->bumpstages[0].texture[0]);
}
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride,
verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride,
verts->tangents);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
// Setup base texture
GL_SelectTexture(GL_TEXTURE3_ARB);
glEnable(GL_TEXTURE_2D);
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride,
verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride,
verts->binormals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (shader->numcolorstages)
@ -913,8 +911,8 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
// Normals
qglClientActiveTextureARB(GL_TEXTURE4_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->normalstride,
verts->normals);
GL_TexCoordPointer(3, GL_FLOAT, verts->normalstride,
verts->normals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
NV3x_EnableDeluxShader(shader);
@ -972,7 +970,7 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
GL_SelectTexture(GL_TEXTURE0_ARB);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@ -980,7 +978,7 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
glEnable(GL_TEXTURE_2D);
GL_Bind(lightmap_textures+lightmapIndex);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride, verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@ -994,9 +992,9 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
}
else
{
if (verts->colors && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->colors) && (shader->flags & SURF_PPLIGHT))
{
glColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
GL_ColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
glEnableClientState(GL_COLOR_ARRAY);
glShadeModel(GL_SMOOTH);
@ -1042,10 +1040,10 @@ void NV3x_drawTriangleListBase (vertexdef_t *verts, int *indecies,
{
if (shader->colorstages[0].src_blend >= 0) {
glBlendFunc(shader->colorstages[0].src_blend, shader->colorstages[0].dst_blend);
glEnable(GL_BLEND);
glBlendFunc(shader->colorstages[0].src_blend, shader->colorstages[0].dst_blend);
glEnable(GL_BLEND);
} else {
glDisable(GL_BLEND);
glDisable(GL_BLEND);
}
glColor3f(0,0,0);
@ -1143,13 +1141,13 @@ void NV3x_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
int usedelux;
checkerror();
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
GL_SelectTexture(GL_TEXTURE0_ARB);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glColor3ub(255,255,255);
@ -1166,11 +1164,11 @@ void NV3x_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
NV3x_sendSurfacesBase(surfs, numSurfaces, false);
glPopMatrix();
}
if (verts->lightmapcoords && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->lightmapcoords) && (shader->flags & SURF_PPLIGHT))
{
GL_SelectTexture(GL_TEXTURE1_ARB);
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@ -1416,12 +1414,12 @@ void NV3x_sendSurfacesTA(msurface_t** surfs, int numSurfaces, const transform_t
void NV3x_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
int numSurfaces,const transform_t *tr, const lightobject_t *lo)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_AddColor();
glColor3fv(&currentshadowlight->color[0]);

View file

@ -1169,11 +1169,11 @@ void Parhelia_sendTriangleListWV(const vertexdef_t *verts, int *indecies,
int numIndecies)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_TexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//draw them
@ -1186,31 +1186,29 @@ void Parhelia_sendTriangleListWV(const vertexdef_t *verts, int *indecies,
void Parhelia_sendTriangleListTA(const vertexdef_t *verts, int *indecies,
int numIndecies)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
if (!verts->texcoords)
FormatError();
//Check the input vertices
if (IsNullDriver(verts->texcoords)) FormatError();
if (IsNullDriver(verts->binormals)) FormatError();
if (IsNullDriver(verts->tangents)) FormatError();
if (IsNullDriver(verts->normals)) FormatError();
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->tangents)
FormatError();
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->binormals)
FormatError();
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->normals)
FormatError();
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
GL_TexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//draw them
@ -1280,11 +1278,11 @@ void Parhelia_drawTriangleListBase (vertexdef_t *verts, int *indecies,
{
int i;
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!shader->cull)
@ -1302,9 +1300,9 @@ void Parhelia_drawTriangleListBase (vertexdef_t *verts, int *indecies,
}
glMatrixMode(GL_MODELVIEW);
if (verts->colors && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->colors) && (shader->flags & SURF_PPLIGHT))
{
glColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
GL_ColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
glEnableClientState(GL_COLOR_ARRAY);
glShadeModel(GL_SMOOTH);
@ -1407,11 +1405,11 @@ void Parhelia_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
{
int i;
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glColor3ub(255,255,255);
@ -1429,10 +1427,10 @@ void Parhelia_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
glPopMatrix();
}
if (verts->lightmapcoords && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->lightmapcoords) && (shader->flags & SURF_PPLIGHT))
{
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@ -1623,7 +1621,7 @@ void Parhelia_sendSurfacesPlain(msurface_t** surfs, int numSurfaces)
void Parhelia_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
int numSurfaces,const transform_t *tr, const lightobject_t *lo)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
@ -1635,7 +1633,7 @@ void Parhelia_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
GL_DrawAlpha();
Parhelia_EnableAttentShader(tr);
glTexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_TexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
Parhelia_sendSurfacesPlain(surfs,numSurfaces);
Parhelia_DisableAttentShader();
@ -1649,7 +1647,7 @@ void Parhelia_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
Parhelia_EnableSpecularShader(tr, lo, true);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
Parhelia_sendSurfacesTA(surfs,numSurfaces);
Parhelia_DisableDiffuseShader();

View file

@ -990,11 +990,11 @@ void Radeon_sendTriangleListWV(const vertexdef_t *verts, int *indecies,
int numIndecies)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_TexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//draw them
@ -1007,31 +1007,29 @@ void Radeon_sendTriangleListWV(const vertexdef_t *verts, int *indecies,
void Radeon_sendTriangleListTA(const vertexdef_t *verts, int *indecies,
int numIndecies)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
if (!verts->texcoords)
FormatError();
//Check the input vertices
if (IsNullDriver(verts->texcoords)) FormatError();
if (IsNullDriver(verts->binormals)) FormatError();
if (IsNullDriver(verts->tangents)) FormatError();
if (IsNullDriver(verts->normals)) FormatError();
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->tangents)
FormatError();
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
GL_TexCoordPointer(3, GL_FLOAT, verts->tangentstride, verts->tangents);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->binormals)
FormatError();
qglClientActiveTextureARB(GL_TEXTURE2_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
GL_TexCoordPointer(3, GL_FLOAT, verts->binormalstride, verts->binormals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!verts->normals)
FormatError();
qglClientActiveTextureARB(GL_TEXTURE3_ARB);
glTexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
GL_TexCoordPointer(3, GL_FLOAT, verts->normalstride, verts->normals);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//draw them
@ -1090,11 +1088,11 @@ void Radeon_drawTriangleListBase (vertexdef_t *verts, int *indecies,
{
int i;
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (!shader->cull)
@ -1114,9 +1112,9 @@ void Radeon_drawTriangleListBase (vertexdef_t *verts, int *indecies,
}
glMatrixMode(GL_MODELVIEW);
if (verts->colors && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->colors) && (shader->flags & SURF_PPLIGHT))
{
glColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
GL_ColorPointer(3, GL_UNSIGNED_BYTE, verts->colorstride, verts->colors);
glEnableClientState(GL_COLOR_ARRAY);
glShadeModel(GL_SMOOTH);
@ -1220,11 +1218,11 @@ void Radeon_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
{
int i;
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glColor3ub(255,255,255);
@ -1242,10 +1240,10 @@ void Radeon_drawSurfaceListBase (vertexdef_t* verts, msurface_t** surfs,
glPopMatrix();
}
if (verts->lightmapcoords && (shader->flags & SURF_PPLIGHT))
if (!IsNullDriver(verts->lightmapcoords) && (shader->flags & SURF_PPLIGHT))
{
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
GL_TexCoordPointer(2, GL_FLOAT, verts->lightmapstride,
verts->lightmapcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@ -1443,7 +1441,7 @@ void Radeon_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
int numSurfaces, const transform_t *tr,
const lightobject_t *lo)
{
glVertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_VertexPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
glEnableClientState(GL_VERTEX_ARRAY);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
@ -1454,7 +1452,7 @@ void Radeon_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
//draw attent into dest alpha
GL_DrawAlpha();
Radeon_EnableAttentShader(tr);
glTexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
GL_TexCoordPointer(3, GL_FLOAT, verts->vertexstride, verts->vertices);
Radeon_sendSurfacesPlain(surfs,numSurfaces);
Radeon_DisableAttentShader();
GL_ModulateAlphaDrawColor();
@ -1465,7 +1463,7 @@ void Radeon_drawSurfaceListBump (vertexdef_t *verts, msurface_t **surfs,
}
glColor3fv(&currentshadowlight->color[0]);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
GL_TexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
Radeon_sendSurfacesTA(surfs, numSurfaces, tr, lo);
glDisableClientState(GL_VERTEX_ARRAY);