LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Newbie:Problem with DevIL method signature  (Read 8619 times)

Toby

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
Newbie:Problem with DevIL method signature
« on: April 13, 2005, 08:18:34 »

Hi,

I've run into an issue with the NeHe Lesson06 with the line:

IL.ilGenImages(1,image);

according to the method signature it should be:

IL.ilGenImages(image)

but this does not load the texture correctly, anyone got any ideas?

MacOSX, version 0.96 of lwjgl
Logged

Matzon

  • Demigod
  • *****
  • Offline Offline
  • Posts: 2242
Newbie:Problem with DevIL method signature
« Reply #1 on: April 13, 2005, 08:53:20 »

I recently changed the signature to reflect the rest of lwjgl.

The buffer supplied is now checked for its position, and limit to determine how many images to create.

However, judging from the nehe 06 code, everything should work fine? - position should be 0 and limit should be 1, thus producing 1 image. Indeed the GL11.glGenTextures(buf); called a bit below, uses the same syntax, and has always worked fine... Have you confirmed that it used to wrok fine on mac os x ?

Matzon

  • Demigod
  • *****
  • Offline Offline
  • Posts: 2242
Newbie:Problem with DevIL method signature
« Reply #2 on: April 13, 2005, 09:04:11 »

Everything seems in order ? - must be the nehe code?

Quote
MacBeth:/Users/matzon/Development/lwjgl $ java -cp .:bin/: -Djava.library.path=libs/ org.lwjgl.test.devil.BasicTest
error = no error
ilGenImages
ilBindImage
error = no error
ilLoadFromURL file:/Users/matzon/Development/lwjgl/res/ILtest.tga
load lump = true
error = no error
ilGetData
error = no error
limit = 48
0 0 0
0 0 -1
-1 0 0
0 -1 0
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 -1
current image = 2 IL.ilGetInteger(IL.IL_ACTIVE_IMAGE) = 0
Version: 161
error = no error
info.id         = 3
info.width      = 4
info.height     = 4
info.depth      = 1
info.bpp        = 3
info.sizeOfData = 48
info.format     = 32992
info.type       = 5121
info.origin     = 1537
info.palType    = 1024
info.palSize    = 0
info.numNext    = 0
info.numMips    = 0
info.numLayers  = 0
error = no error
ILUT Vendor: Abysmal Software

Toby

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
Newbie:Problem with DevIL method signature
« Reply #3 on: April 13, 2005, 09:32:28 »

Only came to lwjgl at version 0.96. so cannot say if it worked or not in previous releases. But the texture is definately not loading in Lesson06

Ran the BasicTest and all that appeared to be fine,
Logged

Toby

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
Newbie:Problem with DevIL method signature
« Reply #4 on: April 13, 2005, 12:08:01 »

My mistake, path to the texture was wrong.
Logged