LWJGL
May 20, 2012, 23:24:55 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Lesson 6 on nehe only loads 256x256 bmp  (Read 4059 times)
Fcuk
Newbie
*
Posts: 1


« on: May 06, 2006, 11:32:23 »

hi everybody

i tried the lesson6 tutorial on nehe and tried to do the same but the problem is that the loadTexture method only loads 256x256 bitmaps.

I can't understand why.. how could I load other resolutions bitmaps?

thx
Logged
WiESi
Regular nerd
**
Posts: 70


« Reply #1 on: May 06, 2006, 23:28:14 »

With GL_TEXTURE_2D you can only load textures with the size 2^n, like 1x1, 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, ...
If you want to use textures with other sizes use something like GL_TEXTURE_RECTANGLE_ARB.
You first have to call glEnable with ARBTextureRectangle.GL_TEXTURE_RECTANGLE_ARB and then use ARBTextureRectangle.GL_TEXTURE_RECTANGLE_ARB instead of GL_TEXTURE_2D in all the other methods.

WiESi
Logged
darkprophet
Talks Too Much
***
Posts: 179


« Reply #2 on: May 07, 2006, 03:47:13 »

256x128 is valid Wink

The length of each dimension has to be POT, but older cards (im thinking Voodoo) can only deal with square textures, but anything newer than a voodoo will be fine with each dimension being POT but not necessarily the same..

DP
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!