Skip to content

Commit

Permalink
Merge branch 'etternalmemestatus' of https://github.com/etternagame/e…
Browse files Browse the repository at this point in the history
…tterna.git into etternalmemestatus
  • Loading branch information
MinaciousGrace committed Jun 13, 2017
2 parents 9d234b5 + da33713 commit 96947c5
Show file tree
Hide file tree
Showing 12 changed files with 186 additions and 138 deletions.
4 changes: 2 additions & 2 deletions src/ActorMultiTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ void ActorMultiTexture::DrawPrimitives()
quadVerticies.top = -m_size.y/2.0f;
quadVerticies.bottom = +m_size.y/2.0f;

DISPLAY->ClearAllTextures();
for( size_t i = 0; i < m_aTextureUnits.size(); ++i )
{
TextureUnit tu = enum_add2(TextureUnit_1, i);
Expand Down Expand Up @@ -130,7 +129,8 @@ void ActorMultiTexture::DrawPrimitives()
for( size_t i = 0; i < m_aTextureUnits.size(); ++i )
DISPLAY->SetTexture( enum_add2(TextureUnit_1, i), 0 );

DISPLAY->SetEffectMode( EffectMode_Normal );
if ( m_EffectMode != EffectMode_Normal )
DISPLAY->SetEffectMode(EffectMode_Normal);
}

bool ActorMultiTexture::EarlyAbortDraw() const
Expand Down
4 changes: 2 additions & 2 deletions src/ActorMultiVertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ void ActorMultiVertex::DrawPrimitives()
{
Actor::SetGlobalRenderStates(); // set Actor-specified render states

DISPLAY->ClearAllTextures();
DISPLAY->SetTexture( TextureUnit_1, _Texture->GetTexHandle() );

Actor::SetTextureRenderStates();
Expand Down Expand Up @@ -330,7 +329,8 @@ void ActorMultiVertex::DrawInternal( const AMV_TweenState *TS )
break;
}

DISPLAY->SetEffectMode( EffectMode_Normal );
if ( _EffectMode != EffectMode_Normal )
DISPLAY->SetEffectMode(EffectMode_Normal);
}

bool ActorMultiVertex::EarlyAbortDraw() const
Expand Down
2 changes: 0 additions & 2 deletions src/BitmapText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
bool haveTextures = false;
int startingPoint = iStartGlyph;

DISPLAY->ClearAllTextures();
for ( int start = iStartGlyph; start < iEndGlyph; )
{
int end = start;
Expand Down Expand Up @@ -465,7 +464,6 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
DISPLAY->DrawQuads(&m_aVertices[startingPoint * 4], (end - startingPoint) * 4);

// Setup for the next render pass
DISPLAY->ClearAllTextures();
startingPoint = end;
haveTextures = false;
}
Expand Down
3 changes: 0 additions & 3 deletions src/GraphDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class GraphLine: public Actor
{
Actor::SetGlobalRenderStates(); // set Actor-specified render states

DISPLAY->ClearAllTextures();

// Must call this after setting the texture or else texture
// parameters have no effect.
Actor::SetTextureRenderStates();
Expand Down Expand Up @@ -133,7 +131,6 @@ class GraphBody: public Actor
{
Actor::SetGlobalRenderStates(); // set Actor-specified render states

DISPLAY->ClearAllTextures();
DISPLAY->SetTexture( TextureUnit_1, m_pTexture->GetTexHandle() );

// Must call this after setting the texture or else texture
Expand Down
1 change: 0 additions & 1 deletion src/GrooveRadar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
// draw radar filling
const float fRadius = GetUnzoomedWidth()/2.0f*1.1f;

DISPLAY->ClearAllTextures();
DISPLAY->SetTextureMode( TextureUnit_1, TextureMode_Modulate );
RageSpriteVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives

Expand Down
6 changes: 0 additions & 6 deletions src/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ void Model::DrawPrimitives()
static const RageColor specular( 0.2f,0.2f,0.2f,1 );
static const float shininess = 1;
DISPLAY->SetMaterial( emissive, ambient, diffuse, specular, shininess );
DISPLAY->ClearAllTextures();
DISPLAY->SetSphereEnvironmentMapping( TextureUnit_1, false );
DrawMesh( i );
}
Expand All @@ -445,18 +444,13 @@ void Model::DrawPrimitives()
float shininess = 1;

DISPLAY->SetMaterial( emissive, ambient, diffuse, specular, shininess );
DISPLAY->ClearAllTextures();

if( pMesh->nMaterialIndex != -1 )
{
msMaterial& mat = m_Materials[ pMesh->nMaterialIndex ];
DISPLAY->SetTexture( TextureUnit_1, mat.diffuse.GetCurrentTexture() ? mat.diffuse.GetCurrentTexture()->GetTexHandle() : 0 );
Actor::SetTextureRenderStates(); // set Actor-specified render states
}
else
{
// hey why is this otherwise empty else block here? -aj
}

DrawMesh( i );
}
Expand Down
2 changes: 0 additions & 2 deletions src/NoteDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,6 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
}
}

DISPLAY->ClearAllTextures();

const float fTexCoordLeft = rect.left;
const float fTexCoordRight = rect.right;
const float fTexCoordCenter = (fTexCoordLeft+fTexCoordRight)/2;
Expand Down
Loading

0 comments on commit 96947c5

Please sign in to comment.