Hi all,
I seem to think there was a previous thread explaining this but I can't find it. I was wondering what the code was for creating a texture from an NSBitmapimageRep. What I have is
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
image = [NSBitmapImageRep imageRepWithContentsOfFile: [motionArray objectAtIndex:z]];
<font color = brown>//bind data to texture</font>
if(!image)
exit(<font color = blue>20</font>);
<font color = brown>//create the texture</font>
glGenTextures(<font color = blue>1</font>, &spriteData[x-<font color = blue>1</font>][y-<font color = blue>1</font>][z-<font color = blue>1</font>]);
<font color = brown>//genreate texture with bitmap data</font>
glBindTexture(GL_TEXTURE_2D, temp);
<font color = brown>//generate the texture</font>
glTexImage2D(GL_TEXTURE_2D, <font color = blue>0</font>, <font color = blue>4</font>,
[image pixelsWide], [image pixelsHigh],<font color = blue>0</font>,
GL_RGBA, [image bitsPerSample], [image bitmapData]); </font>[/code]
thanks dudes.