]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a bug that caused GL20 render path to always ask for tangents and
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 May 2007 10:12:19 +0000 (10:12 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 May 2007 10:12:19 +0000 (10:12 +0000)
normals when rendering models

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

gl_rmain.c

index 5d6931700dd72d3a0e5e472d7abe870cbde1b42e..11dc45a81cf39248abcea7356b93771fd36ce1dd 100644 (file)
@@ -3982,9 +3982,9 @@ static void R_DrawTextureSurfaceList_GL20(int texturenumsurfaces, msurface_t **t
                return;
 
        if (rsurface_lightmode == 2)
-               RSurf_PrepareVerticesForBatch(true, r_glsl_permutation->loc_Texture_Normal, texturenumsurfaces, texturesurfacelist);
+               RSurf_PrepareVerticesForBatch(true, r_glsl_permutation->loc_Texture_Normal >= 0, texturenumsurfaces, texturesurfacelist);
        else
-               RSurf_PrepareVerticesForBatch(r_glsl_permutation->loc_Texture_Normal, r_glsl_permutation->loc_Texture_Normal, texturenumsurfaces, texturesurfacelist);
+               RSurf_PrepareVerticesForBatch(r_glsl_permutation->loc_Texture_Normal >= 0, r_glsl_permutation->loc_Texture_Normal >= 0, texturenumsurfaces, texturesurfacelist);
        R_Mesh_TexCoordPointer(0, 2, rsurface_model->surfmesh.data_texcoordtexture2f, rsurface_model->surfmesh.vbo, rsurface_model->surfmesh.vbooffset_texcoordtexture2f);
        R_Mesh_TexCoordPointer(1, 3, rsurface_svector3f, rsurface_svector3f_bufferobject, rsurface_svector3f_bufferoffset);
        R_Mesh_TexCoordPointer(2, 3, rsurface_tvector3f, rsurface_tvector3f_bufferobject, rsurface_tvector3f_bufferoffset);