View Full Version : Scale texture
Ok.. i want to scale a texture to its origin size on a quads.. not strech it..
I know how to use the u and v tex. coord. with the thing GL_REPEAT.. i tried few things like u/myTexture.width and v/myTexture.height...
please help me someone... or anyone or.. anything.. tk
come on someone... i need to know http://www.opengl.org/discussion_boards/ubb/frown.gif
not sure if i unedrstand completely what u want but
03-05-2001, 11:43 PM
You want to display a textured quad so that the texture appears with the same number of pixels on screen as it has in the image?
One way to do this is:
Set texture coordinates to bottome left (0, 0), bottom right (1,0), top right (1, 1), and top left (0, 1).
Set the projection matrix to window size with gluOrtho2D, set modelview matrix to identity, and draw your quad in the size of the original texture image.
[This message has been edited by Relic (edited 03-06-2001).]
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.