use SetTextureMode

This commit is contained in:
Glenn Maynard
2007-02-13 04:15:32 +00:00
parent 256a737d25
commit 4bff44a918
6 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -513,7 +513,7 @@ bool BitmapText::EarlyAbortDraw() const
void BitmapText::DrawPrimitives() void BitmapText::DrawPrimitives()
{ {
Actor::SetGlobalRenderStates(); // set Actor-specified render states Actor::SetGlobalRenderStates(); // set Actor-specified render states
DISPLAY->SetTextureModeModulate(); DISPLAY->SetTextureMode( TextureMode_Modulate );
/* Draw if we're not fully transparent or the zbuffer is enabled */ /* Draw if we're not fully transparent or the zbuffer is enabled */
if( m_pTempState->diffuse[0].a != 0 ) if( m_pTempState->diffuse[0].a != 0 )
@@ -601,7 +601,7 @@ void BitmapText::DrawPrimitives()
/* render the glow pass */ /* render the glow pass */
if( m_pTempState->glow.a > 0.0001f ) if( m_pTempState->glow.a > 0.0001f )
{ {
DISPLAY->SetTextureModeGlow(); DISPLAY->SetTextureMode( TextureMode_Glow );
for( unsigned i=0; i<m_aVertices.size(); i++ ) for( unsigned i=0; i<m_aVertices.size(); i++ )
m_aVertices[i].c = m_pTempState->glow; m_aVertices[i].c = m_pTempState->glow;
@@ -773,7 +773,7 @@ void ColorBitmapText::SimpleAddLine( const RString &sAddition, const int iWidthP
void ColorBitmapText::DrawPrimitives( ) void ColorBitmapText::DrawPrimitives( )
{ {
Actor::SetGlobalRenderStates(); // set Actor-specified render states Actor::SetGlobalRenderStates(); // set Actor-specified render states
DISPLAY->SetTextureModeModulate(); DISPLAY->SetTextureMode( TextureMode_Modulate );
/* Draw if we're not fully transparent or the zbuffer is enabled */ /* Draw if we're not fully transparent or the zbuffer is enabled */
if( m_pTempState->diffuse[0].a != 0 ) if( m_pTempState->diffuse[0].a != 0 )
@@ -822,7 +822,7 @@ void ColorBitmapText::DrawPrimitives( )
/* render the glow pass */ /* render the glow pass */
if( m_pTempState->glow.a > 0.0001f ) if( m_pTempState->glow.a > 0.0001f )
{ {
DISPLAY->SetTextureModeGlow(); DISPLAY->SetTextureMode( TextureMode_Glow );
for( unsigned i=0; i<m_aVertices.size(); i++ ) for( unsigned i=0; i<m_aVertices.size(); i++ )
m_aVertices[i].c = m_pTempState->glow; m_aVertices[i].c = m_pTempState->glow;
+1 -1
View File
@@ -132,7 +132,7 @@ public:
// parameters have no effect. // parameters have no effect.
Actor::SetTextureRenderStates(); Actor::SetTextureRenderStates();
DISPLAY->SetTextureModeModulate(); DISPLAY->SetTextureMode( TextureMode_Modulate );
DISPLAY->DrawQuadStrip( m_Slices, ARRAYLEN(m_Slices) ); DISPLAY->DrawQuadStrip( m_Slices, ARRAYLEN(m_Slices) );
} }
+1 -1
View File
@@ -160,7 +160,7 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
const float fRadius = GetUnzoomedWidth()/2.0f*1.1f; const float fRadius = GetUnzoomedWidth()/2.0f*1.1f;
DISPLAY->ClearAllTextures(); DISPLAY->ClearAllTextures();
DISPLAY->SetTextureModeModulate(); DISPLAY->SetTextureMode( TextureMode_Modulate );
RageSpriteVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives RageSpriteVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives
if( !m_bValuesVisible ) if( !m_bValuesVisible )
+3 -3
View File
@@ -322,7 +322,7 @@ void Model::DrawPrimitives()
////////////////////// //////////////////////
if( m_pTempState->diffuse[0].a > 0 ) if( m_pTempState->diffuse[0].a > 0 )
{ {
DISPLAY->SetTextureModeModulate(); DISPLAY->SetTextureMode( TextureMode_Modulate );
for( unsigned i = 0; i < m_pGeometry->m_Meshes.size(); ++i ) for( unsigned i = 0; i < m_pGeometry->m_Meshes.size(); ++i )
{ {
@@ -367,7 +367,7 @@ void Model::DrawPrimitives()
DISPLAY->SetTexture( TextureUnit_2, mat.alpha.GetCurrentTexture() ? mat.alpha.GetCurrentTexture()->GetTexHandle() : 0 ); DISPLAY->SetTexture( TextureUnit_2, mat.alpha.GetCurrentTexture() ? mat.alpha.GetCurrentTexture()->GetTexHandle() : 0 );
Actor::SetTextureRenderStates(); // set Actor-specified render states Actor::SetTextureRenderStates(); // set Actor-specified render states
DISPLAY->SetSphereEnvironmentMapping( mat.alpha.m_bSphereMapped ); DISPLAY->SetSphereEnvironmentMapping( mat.alpha.m_bSphereMapped );
DISPLAY->SetTextureModeAdd(); DISPLAY->SetTextureMode( TextureMode_Add );
DISPLAY->SetTextureFiltering( true ); DISPLAY->SetTextureFiltering( true );
} }
else else
@@ -434,7 +434,7 @@ void Model::DrawPrimitives()
////////////////////// //////////////////////
if( m_pTempState->glow.a > 0.0001f ) if( m_pTempState->glow.a > 0.0001f )
{ {
DISPLAY->SetTextureModeGlow(); DISPLAY->SetTextureMode( TextureMode_Glow );
for( unsigned i = 0; i < m_pGeometry->m_Meshes.size(); ++i ) for( unsigned i = 0; i < m_pGeometry->m_Meshes.size(); ++i )
{ {
+2 -2
View File
@@ -515,9 +515,9 @@ void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool b
} }
if( bGlow ) if( bGlow )
DISPLAY->SetTextureModeGlow(); DISPLAY->SetTextureMode( TextureMode_Glow );
else else
DISPLAY->SetTextureModeModulate(); DISPLAY->SetTextureMode( TextureMode_Modulate );
const bool bWavyPartsNeedZBuffer = ArrowEffects::NeedZBuffer( m_pPlayerState ); const bool bWavyPartsNeedZBuffer = ArrowEffects::NeedZBuffer( m_pPlayerState );
DISPLAY->SetZTestMode( bWavyPartsNeedZBuffer?ZTEST_WRITE_ON_PASS:ZTEST_OFF ); DISPLAY->SetZTestMode( bWavyPartsNeedZBuffer?ZTEST_WRITE_ON_PASS:ZTEST_OFF );
+2 -2
View File
@@ -503,7 +503,7 @@ void Sprite::DrawTexture( const TweenState *state )
state->diffuse[2].a > 0 || state->diffuse[2].a > 0 ||
state->diffuse[3].a > 0 ) state->diffuse[3].a > 0 )
{ {
DISPLAY->SetTextureModeModulate(); DISPLAY->SetTextureMode( TextureMode_Modulate );
////////////////////// //////////////////////
// render the shadow // render the shadow
@@ -532,7 +532,7 @@ void Sprite::DrawTexture( const TweenState *state )
////////////////////// //////////////////////
if( state->glow.a > 0.0001f ) if( state->glow.a > 0.0001f )
{ {
DISPLAY->SetTextureModeGlow(); DISPLAY->SetTextureMode( TextureMode_Glow );
v[0].c = v[1].c = v[2].c = v[3].c = state->glow; v[0].c = v[1].c = v[2].c = v[3].c = state->glow;
DISPLAY->DrawQuad( v ); DISPLAY->DrawQuad( v );
} }