mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-12 05:49:15 +01:00
Replace GL_TEXTURE by XASH_TEXTURE because it's used internally by GL.h
This commit is contained in:
parent
13fe097318
commit
b825e584f3
@ -1074,8 +1074,8 @@ void GL_DrawAliasFrame( aliashdr_t *paliashdr )
|
||||
// texture coordinates come from the draw list
|
||||
if( GL_Support( GL_ARB_MULTITEXTURE ) && glState.activeTMU > 0 )
|
||||
{
|
||||
GL_MultiTexCoord2f( GL_TEXTURE0, ((float *)order)[0], ((float *)order)[1] );
|
||||
GL_MultiTexCoord2f( GL_TEXTURE1, ((float *)order)[0], ((float *)order)[1] );
|
||||
GL_MultiTexCoord2f( XASH_TEXTURE0, ((float *)order)[0], ((float *)order)[1] );
|
||||
GL_MultiTexCoord2f( XASH_TEXTURE1, ((float *)order)[0], ((float *)order)[1] );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1290,7 +1290,7 @@ static void R_AliasDrawAbsBBox( cl_entity_t *e, const vec3_t absmin, const vec3_
|
||||
p[i][2] = ( i & 4 ) ? absmin[2] : absmax[2];
|
||||
}
|
||||
|
||||
GL_Bind( GL_TEXTURE0, tr.whiteTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.whiteTexture );
|
||||
TriColor4f( 0.5f, 0.5f, 1.0f, 0.5f );
|
||||
TriRenderMode( kRenderTransAdd );
|
||||
pglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||
@ -1440,16 +1440,16 @@ void R_DrawAliasModel( cl_entity_t *e )
|
||||
if( m_fDoRemap ) pinfo = CL_GetRemapInfoForEntity( e );
|
||||
|
||||
if( r_lightmap->value && !r_fullbright->value )
|
||||
GL_Bind( GL_TEXTURE0, tr.whiteTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.whiteTexture );
|
||||
else if( pinfo != NULL && pinfo->textures[skin] != 0 )
|
||||
GL_Bind( GL_TEXTURE0, pinfo->textures[skin] ); // FIXME: allow remapping for skingroups someday
|
||||
else GL_Bind( GL_TEXTURE0, m_pAliasHeader->gl_texturenum[skin][anim] );
|
||||
GL_Bind( XASH_TEXTURE0, pinfo->textures[skin] ); // FIXME: allow remapping for skingroups someday
|
||||
else GL_Bind( XASH_TEXTURE0, m_pAliasHeader->gl_texturenum[skin][anim] );
|
||||
|
||||
pglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||
|
||||
if( GL_Support( GL_ARB_MULTITEXTURE ) && m_pAliasHeader->fb_texturenum[skin][anim] )
|
||||
{
|
||||
GL_Bind( GL_TEXTURE1, m_pAliasHeader->fb_texturenum[skin][anim] );
|
||||
GL_Bind( XASH_TEXTURE1, m_pAliasHeader->fb_texturenum[skin][anim] );
|
||||
pglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
|
||||
}
|
||||
|
||||
|
@ -679,7 +679,7 @@ rebuild_page:
|
||||
y = k / base_w * h;
|
||||
|
||||
pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GL_Bind( GL_TEXTURE0, i ); // NOTE: don't use image->texnum here, because skybox has a 'wrong' indexes
|
||||
GL_Bind( XASH_TEXTURE0, i ); // NOTE: don't use image->texnum here, because skybox has a 'wrong' indexes
|
||||
|
||||
if( FBitSet( image->flags, TF_DEPTHMAP ) && !FBitSet( image->flags, TF_NOCOMPARE ))
|
||||
pglTexParameteri( image->target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE );
|
||||
|
@ -891,7 +891,7 @@ void DrawSingleDecal( decal_t *pDecal, msurface_t *fa )
|
||||
v = R_DecalSetupVerts( pDecal, fa, pDecal->texture, &numVerts );
|
||||
if( !numVerts ) return;
|
||||
|
||||
GL_Bind( GL_TEXTURE0, pDecal->texture );
|
||||
GL_Bind( XASH_TEXTURE0, pDecal->texture );
|
||||
|
||||
pglBegin( GL_POLYGON );
|
||||
|
||||
|
@ -66,7 +66,7 @@ R_DrawStretchPic
|
||||
*/
|
||||
void R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, int texnum )
|
||||
{
|
||||
GL_Bind( GL_TEXTURE0, texnum );
|
||||
GL_Bind( XASH_TEXTURE0, texnum );
|
||||
|
||||
pglBegin( GL_QUADS );
|
||||
pglTexCoord2f( s1, t1 );
|
||||
@ -98,7 +98,7 @@ void R_DrawTileClear( int x, int y, int w, int h )
|
||||
|
||||
GL_SetRenderMode( kRenderNormal );
|
||||
pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GL_Bind( GL_TEXTURE0, cls.tileImage );
|
||||
GL_Bind( XASH_TEXTURE0, cls.tileImage );
|
||||
|
||||
glt = R_GetTexture( cls.tileImage );
|
||||
tw = glt->srcWidth;
|
||||
@ -156,7 +156,7 @@ void R_DrawStretchRaw( float x, float y, float w, float h, int cols, int rows, c
|
||||
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
|
||||
|
||||
tex = R_GetTexture( tr.cinTexture );
|
||||
GL_Bind( GL_TEXTURE0, tr.cinTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.cinTexture );
|
||||
|
||||
if( cols == tex->width && rows == tex->height )
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ static void GL_UpdateTextureParams( int iTexture )
|
||||
|
||||
if( !tex->texnum ) return; // free slot
|
||||
|
||||
GL_Bind( GL_TEXTURE0, iTexture );
|
||||
GL_Bind( XASH_TEXTURE0, iTexture );
|
||||
|
||||
// set texture anisotropy if available
|
||||
if( GL_Support( GL_ANISOTROPY_EXT ) && ( tex->numMips > 1 ) && !FBitSet( tex->flags, TF_DEPTHMAP ))
|
||||
|
@ -380,7 +380,7 @@ void CL_DrawParticles( double frametime )
|
||||
pglDisable( GL_ALPHA_TEST );
|
||||
pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||
|
||||
GL_Bind( GL_TEXTURE0, tr.particleTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.particleTexture );
|
||||
pglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||
pglDepthMask( GL_FALSE );
|
||||
|
||||
|
@ -41,7 +41,7 @@ static qboolean draw_details = false;
|
||||
static msurface_t *skychain = NULL;
|
||||
static gllightmapstate_t gl_lms;
|
||||
|
||||
static void LM_UploadBlock( int lightmapnum );
|
||||
static void LM_UploadBlock( qboolean dynamic );
|
||||
|
||||
byte *Mod_GetCurrentVis( void )
|
||||
{
|
||||
@ -625,8 +625,8 @@ static void LM_UploadBlock( qboolean dynamic )
|
||||
}
|
||||
|
||||
if( host.features & ENGINE_LARGE_LIGHTMAPS )
|
||||
GL_Bind( GL_TEXTURE0, tr.dlightTexture2 );
|
||||
else GL_Bind( GL_TEXTURE0, tr.dlightTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.dlightTexture2 );
|
||||
else GL_Bind( XASH_TEXTURE0, tr.dlightTexture );
|
||||
|
||||
pglTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, BLOCK_SIZE, height, GL_RGBA, GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer );
|
||||
}
|
||||
@ -864,7 +864,7 @@ void R_BlendLightmaps( void )
|
||||
{
|
||||
if( gl_lms.lightmap_surfaces[i] )
|
||||
{
|
||||
GL_Bind( GL_TEXTURE0, tr.lightmapTextures[i] );
|
||||
GL_Bind( XASH_TEXTURE0, tr.lightmapTextures[i] );
|
||||
|
||||
for( surf = gl_lms.lightmap_surfaces[i]; surf != NULL; surf = surf->info->lightmapchain )
|
||||
{
|
||||
@ -879,8 +879,8 @@ void R_BlendLightmaps( void )
|
||||
LM_InitBlock();
|
||||
|
||||
if( host.features & ENGINE_LARGE_LIGHTMAPS )
|
||||
GL_Bind( GL_TEXTURE0, tr.dlightTexture2 );
|
||||
else GL_Bind( GL_TEXTURE0, tr.dlightTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.dlightTexture2 );
|
||||
else GL_Bind( XASH_TEXTURE0, tr.dlightTexture );
|
||||
|
||||
newsurf = gl_lms.dynamic_surfaces;
|
||||
|
||||
@ -985,7 +985,7 @@ void R_RenderFullbrights( void )
|
||||
es = fullbright_surfaces[i];
|
||||
if( !es ) continue;
|
||||
|
||||
GL_Bind( GL_TEXTURE0, i );
|
||||
GL_Bind( XASH_TEXTURE0, i );
|
||||
|
||||
for( p = es; p; p = p->lumachain )
|
||||
DrawGLPoly( p->surf->polys, 0.0f, 0.0f );
|
||||
@ -1030,7 +1030,7 @@ void R_RenderDetails( void )
|
||||
es = detail_surfaces[i];
|
||||
if( !es ) continue;
|
||||
|
||||
GL_Bind( GL_TEXTURE0, i );
|
||||
GL_Bind( XASH_TEXTURE0, i );
|
||||
|
||||
for( p = es; p; p = p->detailchain )
|
||||
{
|
||||
@ -1071,7 +1071,7 @@ void R_RenderBrushPoly( msurface_t *fa, int cull_type )
|
||||
|
||||
t = R_TextureAnimation( fa );
|
||||
|
||||
GL_Bind( GL_TEXTURE0, t->gl_texturenum );
|
||||
GL_Bind( XASH_TEXTURE0, t->gl_texturenum );
|
||||
|
||||
if( FBitSet( fa->flags, SURF_DRAWTURB ))
|
||||
{
|
||||
@ -1164,7 +1164,7 @@ dynamic:
|
||||
R_BuildLightMap( fa, temp, smax * 4, true );
|
||||
R_SetCacheState( fa );
|
||||
|
||||
GL_Bind( GL_TEXTURE0, tr.lightmapTextures[fa->lightmaptexturenum] );
|
||||
GL_Bind( XASH_TEXTURE0, tr.lightmapTextures[fa->lightmaptexturenum] );
|
||||
|
||||
pglTexSubImage2D( GL_TEXTURE_2D, 0, fa->light_s, fa->light_t, smax, tmax,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, temp );
|
||||
@ -1347,7 +1347,7 @@ void R_DrawWaterSurfaces( void )
|
||||
continue;
|
||||
|
||||
// set modulate mode explicitly
|
||||
GL_Bind( GL_TEXTURE0, t->gl_texturenum );
|
||||
GL_Bind( XASH_TEXTURE0, t->gl_texturenum );
|
||||
|
||||
for( ; s; s = s->texturechain )
|
||||
EmitWaterPolys( s, false );
|
||||
|
@ -1031,7 +1031,7 @@ void R_DrawSpriteModel( cl_entity_t *e )
|
||||
{
|
||||
// draw the single non-lerped frame
|
||||
pglColor4f( color[0], color[1], color[2], tr.blend );
|
||||
GL_Bind( GL_TEXTURE0, frame->gl_texturenum );
|
||||
GL_Bind( XASH_TEXTURE0, frame->gl_texturenum );
|
||||
R_DrawSpriteQuad( frame, origin, v_right, v_up, scale );
|
||||
}
|
||||
else
|
||||
@ -1043,14 +1043,14 @@ void R_DrawSpriteModel( cl_entity_t *e )
|
||||
if( ilerp != 0.0f )
|
||||
{
|
||||
pglColor4f( color[0], color[1], color[2], tr.blend * ilerp );
|
||||
GL_Bind( GL_TEXTURE0, oldframe->gl_texturenum );
|
||||
GL_Bind( XASH_TEXTURE0, oldframe->gl_texturenum );
|
||||
R_DrawSpriteQuad( oldframe, origin, v_right, v_up, scale );
|
||||
}
|
||||
|
||||
if( lerp != 0.0f )
|
||||
{
|
||||
pglColor4f( color[0], color[1], color[2], tr.blend * lerp );
|
||||
GL_Bind( GL_TEXTURE0, frame->gl_texturenum );
|
||||
GL_Bind( XASH_TEXTURE0, frame->gl_texturenum );
|
||||
R_DrawSpriteQuad( frame, origin, v_right, v_up, scale );
|
||||
}
|
||||
}
|
||||
@ -1067,7 +1067,7 @@ void R_DrawSpriteModel( cl_entity_t *e )
|
||||
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||
|
||||
pglColor4f( color2[0], color2[1], color2[2], tr.blend );
|
||||
GL_Bind( GL_TEXTURE0, tr.whiteTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.whiteTexture );
|
||||
R_DrawSpriteQuad( frame, origin, v_right, v_up, scale );
|
||||
pglAlphaFunc( GL_GREATER, 0.0f );
|
||||
pglDepthFunc( GL_LEQUAL );
|
||||
|
@ -2058,8 +2058,8 @@ static void R_StudioSetupSkin( studiohdr_t *ptexturehdr, int index )
|
||||
if( !ptexture ) ptexture = (mstudiotexture_t *)((byte *)ptexturehdr + ptexturehdr->textureindex); // fallback
|
||||
|
||||
if( r_lightmap->value && !r_fullbright->value )
|
||||
GL_Bind( GL_TEXTURE0, tr.whiteTexture );
|
||||
else GL_Bind( GL_TEXTURE0, ptexture[index].index );
|
||||
GL_Bind( XASH_TEXTURE0, tr.whiteTexture );
|
||||
else GL_Bind( XASH_TEXTURE0, ptexture[index].index );
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2163,7 +2163,7 @@ R_StudioDrawNormalMesh
|
||||
generic path
|
||||
===============
|
||||
*/
|
||||
static _inline void R_StudioDrawNormalMesh( short *ptricmds, vec3_t *pstudionorms, float s, float t )
|
||||
_inline void R_StudioDrawNormalMesh( short *ptricmds, vec3_t *pstudionorms, float s, float t )
|
||||
{
|
||||
float *lv;
|
||||
int i;
|
||||
@ -2199,7 +2199,7 @@ R_StudioDrawNormalMesh
|
||||
generic path
|
||||
===============
|
||||
*/
|
||||
static _inline void R_StudioDrawFloatMesh( short *ptricmds, vec3_t *pstudionorms )
|
||||
_inline void R_StudioDrawFloatMesh( short *ptricmds, vec3_t *pstudionorms )
|
||||
{
|
||||
float *lv;
|
||||
int i;
|
||||
@ -2234,7 +2234,7 @@ R_StudioDrawNormalMesh
|
||||
generic path
|
||||
===============
|
||||
*/
|
||||
static _inline void R_StudioDrawChromeMesh( short *ptricmds, vec3_t *pstudionorms, float s, float t, float scale )
|
||||
_inline void R_StudioDrawChromeMesh( short *ptricmds, vec3_t *pstudionorms, float s, float t, float scale )
|
||||
{
|
||||
float *lv, *av;
|
||||
int i, idx;
|
||||
@ -2465,7 +2465,7 @@ static void R_StudioDrawHulls( void )
|
||||
alpha = 0.5f;
|
||||
else alpha = 1.0f;
|
||||
|
||||
GL_Bind( GL_TEXTURE0, tr.whiteTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.whiteTexture );
|
||||
pglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||
|
||||
for( i = 0; i < m_pStudioHeader->numhitboxes; i++ )
|
||||
@ -2522,7 +2522,7 @@ static void R_StudioDrawAbsBBox( void )
|
||||
if( !R_StudioComputeBBox( p ))
|
||||
return;
|
||||
|
||||
GL_Bind( GL_TEXTURE0, tr.whiteTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.whiteTexture );
|
||||
TriColor4f( 0.5f, 0.5f, 1.0f, 0.5f );
|
||||
TriRenderMode( kRenderTransAdd );
|
||||
|
||||
|
@ -382,8 +382,8 @@ void R_DrawSkyBox( void )
|
||||
continue;
|
||||
|
||||
if( tr.skyboxTextures[r_skyTexOrder[i]] )
|
||||
GL_Bind( GL_TEXTURE0, tr.skyboxTextures[r_skyTexOrder[i]] );
|
||||
else GL_Bind( GL_TEXTURE0, tr.skyTexture ); // stub
|
||||
GL_Bind( XASH_TEXTURE0, tr.skyboxTextures[r_skyTexOrder[i]] );
|
||||
else GL_Bind( XASH_TEXTURE0, tr.skyTexture ); // stub
|
||||
|
||||
pglBegin( GL_QUADS );
|
||||
MakeSkyVec( RI.skyMins[0][i], RI.skyMins[1][i], i );
|
||||
@ -521,7 +521,7 @@ void R_CloudDrawPoly( glpoly_t *p )
|
||||
int i;
|
||||
|
||||
GL_SetRenderMode( kRenderNormal );
|
||||
GL_Bind( GL_TEXTURE0, tr.solidskyTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.solidskyTexture );
|
||||
|
||||
pglBegin( GL_QUADS );
|
||||
for( i = 0, v = p->verts[0]; i < 4; i++, v += VERTEXSIZE )
|
||||
@ -533,7 +533,7 @@ void R_CloudDrawPoly( glpoly_t *p )
|
||||
pglEnd();
|
||||
|
||||
GL_SetRenderMode( kRenderTransTexture );
|
||||
GL_Bind( GL_TEXTURE0, tr.alphaskyTexture );
|
||||
GL_Bind( XASH_TEXTURE0, tr.alphaskyTexture );
|
||||
|
||||
pglBegin( GL_QUADS );
|
||||
for( i = 0, v = p->verts[0]; i < 4; i++, v += VERTEXSIZE )
|
||||
|
Loading…
Reference in New Issue
Block a user