glaux.h for Mac OS X? - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Tools & Technology (/forum-10.html)
+--- Thread: glaux.h for Mac OS X? (/thread-4242.html)
glaux.h for Mac OS X? - FreeKQuency23 - May 25, 2006 04:53 PM
I need a way to deal with:
AUX_RGBImageRec *pBitmap = NULL;
tImageTGA *pImage = NULL;
pImage = LoadTGA(strFileName);
pBitmap = auxDIBImageLoad(strFileName);
which are datatypes and functions located in the glaux.h library in windows.
I know people have asked this question before. I found a post with a response from One Sad Cookie: http://www.idevgames.com/forum/showthread.php?t=2437
Unfortunatly the link he references in the post is broken.
Can someone either point me to some working code or help me understand what I need to do to port the glaux.h to the mac?
Im not actually sure what these functions do to load an image. What would I need to do to create functions and datatypes that support this functionality on the mac?
glaux.h for Mac OS X? - OneSadCookie - May 25, 2006 05:08 PM
Wow, that's an ancient post :|
QTValuePak is now here: http://onesadcookie.com/svn/repos/QTValuePak , but Apple just released some official sample code the other day: http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/index.html -- look for "Creating Textures from Image Data" under "Techniques for Working with Texture Data"
glaux.h for Mac OS X? - FreeKQuency23 - May 25, 2006 05:36 PM
Ok, Im checking out the apple tutorial. Does Listing 9-4 (Using a Quartz image as a texture source) describe the same functionality as: auxDIBImageLoad(strFileName) from the glaux.h library?
The glaux function returns a pointer of type AUX_RGBImageRec. If I wanted access to similar data what would I need to return in the apple function?
In other words, what Apple datatype is the same as AUX_RGBImageRec?
I need to pass size and data to gluBuildMipMaps like this:
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, pBitmap->sizeX, pBitmap->sizeY, GL_RGB, GL_UNSIGNED_BYTE, pBitmap->data);
glaux.h for Mac OS X? - Duane - May 26, 2006 01:20 PM
Sorry, that doesn't work on a mac. glaux is a windows only (maybe it's also on posix too, I don't know), but it's not available for mac.
There's the QT pack OSC mentioned above; that's pretty fast. You could also load it using quartz, I found that a bit of a pain, but it's very effective, and there's a bit of code somewhere around here for that. If you're using cocoa, there's NSImage, but it's pretty slow.
You could always use libpng/jpeg, though bmps are fairly easy to load/write. (I prefer TGAs).
 Ahh yes, the link is here. Enjoy!