From 8f452cc3ae7400af037c60b72a530f6e813bd6fb Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Thu, 11 Aug 2016 14:10:13 +0300 Subject: [PATCH] Fix ofEnableNormalizedTexCoords in texture editing mode --- src/Surfaces/SurfaceManagerGui.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Surfaces/SurfaceManagerGui.cpp b/src/Surfaces/SurfaceManagerGui.cpp index a04ef2d..75e35d3 100644 --- a/src/Surfaces/SurfaceManagerGui.cpp +++ b/src/Surfaces/SurfaceManagerGui.cpp @@ -46,9 +46,16 @@ void SurfaceManagerGui::draw(){ }else if(guiMode == GuiMode::TEXTURE_MAPPING){ // draw the texture of the selected surface if(surfaceManager->getSelectedSurface() != 0){ + bool normalizedTexCoords = ofGetUsingNormalizedTexCoords(); + ofEnableNormalizedTexCoords(); + // Reset default color to white first ofSetColor(255, 255, 255, 255); surfaceManager->getSelectedSurface()->drawTexture(ofVec2f(0, 0)); + + if(!normalizedTexCoords){ + ofDisableNormalizedTexCoords(); + } } // draw surfaces with opacity