Browse Source

Fix ofEnableNormalizedTexCoords in texture editing mode

master
Krisjanis Rijnieks 9 years ago
parent
commit
8f452cc3ae
  1. 7
      src/Surfaces/SurfaceManagerGui.cpp

7
src/Surfaces/SurfaceManagerGui.cpp

@ -46,9 +46,16 @@ void SurfaceManagerGui::draw(){
}else if(guiMode == GuiMode::TEXTURE_MAPPING){ }else if(guiMode == GuiMode::TEXTURE_MAPPING){
// draw the texture of the selected surface // draw the texture of the selected surface
if(surfaceManager->getSelectedSurface() != 0){ if(surfaceManager->getSelectedSurface() != 0){
bool normalizedTexCoords = ofGetUsingNormalizedTexCoords();
ofEnableNormalizedTexCoords();
// Reset default color to white first // Reset default color to white first
ofSetColor(255, 255, 255, 255); ofSetColor(255, 255, 255, 255);
surfaceManager->getSelectedSurface()->drawTexture(ofVec2f(0, 0)); surfaceManager->getSelectedSurface()->drawTexture(ofVec2f(0, 0));
if(!normalizedTexCoords){
ofDisableNormalizedTexCoords();
}
} }
// draw surfaces with opacity // draw surfaces with opacity

Loading…
Cancel
Save