View Full Version : texture loading troubles
09-17-2003, 11:48 AM
I am using an image format that is not really a standard image format. They are hdf images if anyone knows about them or cares. Thats not really the problem though. The problem is that the image has a width of 6052 and a height of 7691. Open GL textures have to be a power of 2 which these are obviously not. When I try to run the program the window doesnt even draw itself once. Is this because I am passing such large width and height values to the opengl function or is it because it isnt a power of 2? Also what would happen if I just scaled the width and height that i am giving to opengl to a power of 2
09-17-2003, 12:46 PM
If you'd use MipMapping, the 2^n*2^n-texuresize rules doesn't apply any more (at least on newer cards).
But your texture will never work (even when rescaling to 2^n) as it's far too big for current 3d-accelerators.NVidia supports up to 4096x4096 and ATI up to 2048x2048.
So you'll either have to tile your texture into smaller textures or you will have to resize it to fit your graphicscard's limits.
09-17-2003, 12:54 PM
The restriction still applies to mip maps. gluBuild2DMipMaps just happens to resize the textures to be powers of 2 underneath for you.
09-17-2003, 04:01 PM
ok thanks these help but about tiling the textures, are there any tutorials about tiling. Is it something that can be done in real time?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.