This topic is now archived and is closed to further replies.


Texture mapping

Recommended Posts

Hachaso    122
Hi! I''ve been going through the tutorials and found a little problem in tutorial nr 10. I''ve been trying to make my own version and loading my own bitmap but can''t seem to make it work. I found that the reason why my picture doesn''t load is because it''s bigger then the one used in the tutorial. What can I do if my picture is bigger then the surface I''m trying to draw it on? The dimensions I have on the picture are 600x444 Maybe my problem is solved with this function call but I tryed different things here without any result. glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); Thanks!

Share this post

Link to post
Share on other sites
Mezz    571
The dimensions of your source images for your textures need to be a power of two, or OpenGL will not handle them.

There is an extension to OpenGL for handling non power of two textures (NV_texture_rectangle if you really want to know, there is also ARB_texture_non_power_of_two), but I'd advise getting the basics down before moving on to anything like that, they're fairly special case uses anyway.

EDIT: typo


[edited by - Mezz on March 21, 2004 4:29:58 AM]

Share this post

Link to post
Share on other sites