Hi, I want to load a SPR file to use it as a texture in one OpenGL program. I have based my code from the one in sprgen.c. For testing, I'm using a single frame 256*256 sprite, and I follow this order for reading the data: -1 struct dsprite_t (sprite header) -1 short (# of palette indexes - 256) -256 bytes (colours of the palette indexes) -1 struct spriteframetype_t (frame type - single or multiple) -1 struct dspriteframe_t (sprite frame header) -dspriteframe_t->height*dspriteframe_t->width bytes (height*width bytes - sprite frame data) And then I create the texture with glTexImage2D. The problem is the final texture gets messy; did I miss something? Is there any documentation about SPR file format?
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders