PICT rsrc texture source/demo/help

Post: #1
Does anyone know where i could find some simple source code (or demo, toutoral, etc.) demonstrating the loading of PICT resources and mapping them as textures? I know the basics, but ive been having trouble.

this is what i have so far, im not very clear on what gentextures can read, i think:

static void loadpictfile(int id)
static void LoadGLTextures(void)
glGenTextures(1, &texture[0].texID);
glBindTexture(GL_TEXTURE_2D, texture[0].texID);
glTexImage2D(GL_TEXTURE_2D, 0, 3, texture[0].width, texture[0].height, 0, GL_RGB, GL_UNSIGNED_BYTE, texture[0].imageData);
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
QTValuePak (http://homepage.mac.com/onesadcookie) shows texturing from a GWorld, so you could draw your picture into a GWorld and texture from that. It's probably the easiest way...

If you're not dead-set on using PICT resources, you could use QuickTime to load your texture from an image file straight into a GWorld. QTValuePak also demonstrates this technique.
Quote this message in a reply
Post Reply