View Full Version : how to texture map with an image of 450*720?

11-18-2002, 02:22 AM
I am a beganner of opengl and I cann't texture mapping an image of 450*720 to a box.
somebody told me that glteximage2d and
gltexsubimage2d can help me,but I am still
failure, would you like to give me an example about it?
any help or advice be appreiated.
thanks ,yqs

11-18-2002, 02:41 AM
OMG, why are u posting this question on the advanced forum? Your textures must have a power of two width and hieght (ie 256x256 or 128x512). You can use a extension to map a non-power of two texture, but u won't have mipmaping stuff.

Hope it helps

11-18-2002, 12:03 PM
Look up "glTexSubImage()" in the OpenGL spec (or on MSDN, or wherever). It allows you to update image data into some non-power-of-two sized sub-area of a larger, power-of-two sized texture previously established with glTexImage().

11-19-2002, 12:43 AM
NV_texture_rectangle also allows you to do this.

- Matt