pran1
04-01-2004, 03:08 AM
Hi, I just wanted know what sort of values should I assign to the glVertex() so that the texture drawn is as the same height and width of the image being textured.
glBegin ( GL_QUADS );
glTexCoord2d ( 0, 0 ); glVertex2f (image_height3, 0);
glTexCoord2d ( 0, 1 ); glVertex2f (image_height3,image_width3);
glTexCoord2d ( 1, 1 ); glVertex2f ( 0,image_width3);
glTexCoord2d ( 1, 0 ); glVertex2f ( 0, 0);
glEnd ( );
I have tried assigning values like this but the textured image is not displayed properly.
Thanks for your time and help.
regards,
pran
glBegin ( GL_QUADS );
glTexCoord2d ( 0, 0 ); glVertex2f (image_height3, 0);
glTexCoord2d ( 0, 1 ); glVertex2f (image_height3,image_width3);
glTexCoord2d ( 1, 1 ); glVertex2f ( 0,image_width3);
glTexCoord2d ( 1, 0 ); glVertex2f ( 0, 0);
glEnd ( );
I have tried assigning values like this but the textured image is not displayed properly.
Thanks for your time and help.
regards,
pran