glaux.h for Mac OS X?
Hi,
I need a way to deal with:
AUX_RGBImageRec *pBitmap = NULL;
tImageTGA *pImage = NULL;
and
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?
thx
I need a way to deal with:
AUX_RGBImageRec *pBitmap = NULL;
tImageTGA *pImage = NULL;
and
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?
thx
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...index.html -- look for "Creating Textures from Image Data" under "Techniques for Working with Texture Data"
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...index.html -- look for "Creating Textures from Image Data" under "Techniques for Working with Texture Data"
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);
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);
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).
[edit] Ahh yes, the link is here. Enjoy!
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).
[edit] Ahh yes, the link is here. Enjoy!
It's not magic, it's Ruby.

