Browse Source

Remove ofSetColor from surface draw() calls

master
Krisjanis Rijnieks 9 years ago
parent
commit
1dafb81faa
  1. 7
      src/Surfaces/GridWarpSurface.cpp
  2. 5
      src/Surfaces/QuadSurface.cpp
  3. 5
      src/Surfaces/TriangleSurface.cpp

7
src/Surfaces/GridWarpSurface.cpp

@ -24,16 +24,11 @@ void GridWarpSurface::draw(){
bool normalizedTexCoords = ofGetUsingNormalizedTexCoords();
ofEnableNormalizedTexCoords();
ofPushStyle();
ofSetColor(255, 255, 255);
source->getTexture()->bind();
mesh.draw();
source->getTexture()->unbind();
ofPopStyle();
if(!normalizedTexCoords){
ofDisableNormalizedTexCoords();
}

5
src/Surfaces/QuadSurface.cpp

@ -81,16 +81,11 @@ void QuadSurface::draw(){
bool normalizedTexCoords = ofGetUsingNormalizedTexCoords();
ofEnableNormalizedTexCoords();
ofPushStyle();
ofSetColor(255, 255, 255);
glMultMatrixf(_matrix);
source->getTexture()->bind();
m.draw();
source->getTexture()->unbind();
ofPopStyle();
if(!normalizedTexCoords){
ofDisableNormalizedTexCoords();
}

5
src/Surfaces/TriangleSurface.cpp

@ -53,16 +53,11 @@ void TriangleSurface::draw(){
bool normalizedTexCoords = ofGetUsingNormalizedTexCoords();
ofEnableNormalizedTexCoords();
ofPushStyle();
ofSetColor(255, 255, 255);
source->getTexture()->bind();
mesh.draw();
source->getTexture()->unbind();
ofPopStyle();
if(!normalizedTexCoords){
ofDisableNormalizedTexCoords();
}

Loading…
Cancel
Save