From 2cdd509a92a82128bf8ca6a0624e34a0109020fc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 21 Nov 2002 22:25:00 +0000 Subject: [PATCH] Texture parameters are bound to the texture, and aren't generic OpenGL state, so we need to set the texture *before* setting other stuff up. --- stepmania/src/NoteDisplay.cpp | 2 +- stepmania/src/Sprite.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index 0a9b7b7c7b..1084065f8f 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -223,13 +223,13 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float const int fYStep = 8; // draw a segment every 8 pixels // this requires that the texture dimensions be a multiple of 8 + DISPLAY->SetTexture( m_sprHoldParts.GetTexture() ); DISPLAY->SetBlendModeNormal(); if( bDrawGlowOnly ) DISPLAY->SetTextureModeGlow(); else DISPLAY->SetTextureModeModulate(); DISPLAY->EnableTextureWrapping(); - DISPLAY->SetTexture( m_sprHoldParts.GetTexture() ); // // Draw the tail diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index bb875b2e19..02a8fec38a 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -224,6 +224,7 @@ void Sprite::DrawPrimitives() v[2].p = RageVector3( quadVerticies.right, quadVerticies.bottom, 0 ); // bottom right v[3].p = RageVector3( quadVerticies.right, quadVerticies.top, 0 ); // top right + DISPLAY->SetTexture( m_pTexture ); if( m_pTexture ) { @@ -253,7 +254,6 @@ void Sprite::DrawPrimitives() } } - DISPLAY->SetTexture( m_pTexture ); DISPLAY->SetTextureModeModulate(); if( m_bBlendAdd ) DISPLAY->SetBlendModeAdd();