From: Lloyd D. <ll...@ga...> - 2001-09-27 08:45:04
|
Woaw... > BitmapData bitmapdata = bitmapSquare.LockBits( > rect, > ImageLockMode.ReadOnly, > PixelFormat.Format32bppArgb ); > > // set the OpenGL texture map data > GL.glTexImage2D( > GL.GL_TEXTURE_2D, > 0, > (int) GL.GL_RGB8, > bitmapdata.Width, > bitmapdata.Height, > 0, > GL.GL_BGRA_EXT, > GL.GL_UNSIGNED_BYTE, > bitmapdata.Scan0 ); > > // unlock the bitmap since we are done with it > bitmapSquare.UnlockBits( bitmapdata ); > i don't know such a class... i agree that i should get rid of PreTexture2D, this is much more nicer.. i will do this soon |