Original Post
🔒 Locked
Texturing loading with DevIL
Advertisement
I recommend using DevIL, but you seem to have misunderstood the OpenGL texture mechanism. The value returned by that function should be an OpenGL texture handle, which you can bind and unbind with OpenGL calls, when you need to do so.
Edit: That function effectively takes care of all the loading, converting of the image, and creating, binding, and populating an ogl texture with the image's data. I don't think it will generate the mipmaps for you, however.
Edit: That function effectively takes care of all the loading, converting of the image, and creating, binding, and populating an ogl texture with the image's data. I don't think it will generate the mipmaps for you, however.
Hm.. either I'm blind or the documentation is severely lacking. No mention of if and how the kind of texture is determined, if mipmaps are used, especially how dds files are handled.
And just to reiterate: GLuint is nothing but an unsigned integer, declared as part of OpenGL to ensure consistent sizes. So there won't be either image data or additional info. If you need/want that, then you will have to use the standard loadimage functions.
And just to reiterate: GLuint is nothing but an unsigned integer, declared as part of OpenGL to ensure consistent sizes. So there won't be either image data or additional info. If you need/want that, then you will have to use the standard loadimage functions.
I always had loads of trouble with DevIL under GCC. Everything from random crashes to things just not working. I'd recommend a) writing my own loader or even better b) using phantom's GTL lib (for another pimp for him ;) )
It would seem that in this case DevIL does the format determination behind the scenes, same as when you pass an IL_UNKNOWN when telling it about the type of texture it's supposed to load. The sensible thing to do is probably to throw away ILUT and use DevIL and OpenGL directly - then you have exact control over mipmaps, compression, origin, resizing to power of 2, and anything else you want.
I've seen only rock stable performance from DevIL so far, but then again, I'm using it through the LWJGL wrappers.
I've seen only rock stable performance from DevIL so far, but then again, I'm using it through the LWJGL wrappers.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement