PDA

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



yqs2002
11-18-2002, 03: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

Arath
11-18-2002, 03: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
Arath

jwatte
11-18-2002, 01: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().

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

- Matt