LWJGL
May 20, 2012, 23:24:55
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL 2.8.3 released!
Home
Help
Search
Login
Register
LWJGL
>
Archive
>
DevIL
>
Lesson 6 on nehe only loads 256x256 bmp
Pages: [
1
]
« previous
next »
Print
Author
Topic: Lesson 6 on nehe only loads 256x256 bmp (Read 4059 times)
Fcuk
Newbie
Posts: 1
Lesson 6 on nehe only loads 256x256 bmp
«
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
Lesson 6 on nehe only loads 256x256 bmp
«
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
Lesson 6 on nehe only loads 256x256 bmp
«
Reply #2 on:
May 07, 2006, 03:47:13 »
256x128 is valid
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...