Alternative to GLaux?
I've been reading the NeHe tuts and I can't seem to get to the glaux replacement code. Any help would be much appreciated...
True God of the TribunalKelchargeMy SiteMy Ugly Forums
I don't remember using glaux for anything except texture loading.
So if it's textures you're after, I'd suggest the DevIL Image Library.
So if it's textures you're after, I'd suggest the DevIL Image Library.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Could any one give me some sample code using Corona with the NeHe tutorials?
True God of the TribunalKelchargeMy SiteMy Ugly Forums
Sorry, I should say I need an alternate texture loader. Like Corona, GLFW, DevIL etc, etc...
True God of the TribunalKelchargeMy SiteMy Ugly Forums
check my sig for GlAux replacement.
allso check out lesson 24 and 33 for tga loading.
allso check out lesson 24 and 33 for tga loading.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
Does this fix mem leaks from the glaux lib? No problems with it or whatever?
I can't get it to work, I am using the NeHe tutorial for lesson 6, maybe you could show an example?
[Edited by - kelcharge on August 13, 2005 2:03:51 PM]
I can't get it to work, I am using the NeHe tutorial for lesson 6, maybe you could show an example?
[Edited by - kelcharge on August 13, 2005 2:03:51 PM]
True God of the TribunalKelchargeMy SiteMy Ugly Forums
Perhaps i better write a tutorial about it sometime, you have no idea how many that ask what your asking.
1. it does not fix the memory leaks in glAux.lib, it actualy never uses it so memory leaks are not an issue here, i hope.
2. if you have the exact lesson 6 code it should not be a problem, if you follow all the posts i made about this in the thread in my sig you should be able to get it running.
This one if your unshure.
3. if it still doesn't work then tell me exactly what goes wrong and what the compiler spits out, along with any other information that is relevant (like what brand/version is your compiler).
1. it does not fix the memory leaks in glAux.lib, it actualy never uses it so memory leaks are not an issue here, i hope.
2. if you have the exact lesson 6 code it should not be a problem, if you follow all the posts i made about this in the thread in my sig you should be able to get it running.
This one if your unshure.
3. if it still doesn't work then tell me exactly what goes wrong and what the compiler spits out, along with any other information that is relevant (like what brand/version is your compiler).
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
Sorry about saying it does not work, in the bmp.h file I didn't take out the commenting where the includes were. :(
True God of the TribunalKelchargeMy SiteMy Ugly Forums
You could try using SDL. That is what I use. www.libsdl.org. It is great and available on many platforms.
If that helps, I am not sure...
If that helps, I am not sure...
---John Josef, Technical DirectorGlass Hat Software Inc
Here's some code I wrote sometime ago using corona it's really basic and really haven't tested it yet but it should work in most of the cases. You should be able to adapt/fix it to your needs without much trouble
GLuint LoadTexture(const char* path){ GLuint texture; corona::Image* image = corona::OpenImage(path); int cmp; int fmt; corona::PixelFormat format = image->getFormat(); switch( format ) { case corona::PF_B8G8R8: case corona::PF_R8G8B8: fmt = (format == corona::PF_B8G8R8) ? GL_BGR : GL_RGB; cmp = 3; break; case corona::PF_B8G8R8A8: case corona::PF_R8G8B8A8: fmt = (format == corona::PF_B8G8R8A8) ? GL_BGRA : GL_RGBA; cmp = 4; break; } glGenTextures(1,&texture); glBindTexture(GL_TEXTURE_2D,texture); gluBuild2DMipmaps(GL_TEXTURE_2D,cmp,image->getWidth(),image->getHeight(),fmt,GL_UNSIGNED_BYTE,image->getPixels()); delete image; return texture;}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement