how to texture map with an image of 450*720?

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

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
Arath

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().

NV_texture_rectangle also allows you to do this.

  • Matt