Hello,
I’m following the Shaders Tutorials --> http://www.openframeworks.cc/tutorials/graphics/shaders.html
The “Adding Textures” section of code is different than the code example on Github for 04_SimpleTexturing. In the Setup from 04_SimpleTexturing there is the following code:
plane.set(800, 600, 10, 10);
plane.mapTexCoords(0, 0, img.getWidth(), img.getHeight()); //why do we do this twice?
ofVec4f tcoords = plane.getTexCoords();
plane.mapTexCoords(tcoords.x, tcoords.y, tcoords.z, tcoords.w);
}
I’m not super clear on this. Why is mapTexCoords called twice? I can see that there is some connection between passing in a texture (mapTextCoordsFromTexture()), texture coordinates (?) (mapTextCoords()), and normalization, but it’s a bit foggy.