texture mapping
At present there is no 3D information used. All the display is based on 2D planar.I just need to adjust the size when the image is too big.
You actually can use the same texture by just adjusting the texture coordinates, i.e. you use tex coords smaller than 1.
By drawing a quad I just mean what you do already: glBegin(GL_QUADS); ...
Just change the coordinates of the vertices. However, I assume you want a fixed size quad, so playing around with the texture coords would be better.
Just make sure that the texture is fully initialized, i.e. you provide a large enough image with glTexImage(...) or just feed it some all-0 buffer of the same size.
By drawing a quad I just mean what you do already: glBegin(GL_QUADS); ...
Just change the coordinates of the vertices. However, I assume you want a fixed size quad, so playing around with the texture coords would be better.
Just make sure that the texture is fully initialized, i.e. you provide a large enough image with glTexImage(...) or just feed it some all-0 buffer of the same size.
Quote:Original post by Lord_Evil
You actually can use the same texture by just adjusting the texture coordinates, i.e. you use tex coords smaller than 1.
By drawing a quad I just mean what you do already: glBegin(GL_QUADS); ...
Just change the coordinates of the vertices. However, I assume you want a fixed size quad, so playing around with the texture coords would be better.
Just make sure that the texture is fully initialized, i.e. you provide a large enough image with glTexImage(...) or just feed it some all-0 buffer of the same size.
Now I understand what you meant. I can change my maxTextureWidth and maxTexutreHeight instead.
What a good idea! I've already created it, and didn't take advantage of it!
Thanks very much.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement