Archived

This topic is now archived and is closed to further replies.

weasalmongler

Sorry about this, a Quake 3 bsp Lightmap question

Recommended Posts

I know that the quake 3 lightmaps are stored in the file and are not externally referenced. I think they are in the format : unsigned char lightmap[128][128][3]; I imagine the first 128 is width, 2nd is height and the last part is the three colour components. How do I convert this to RGB format for loading into an OpenGL texture? Is it just loop through them all, and appending them to an unsigned char single array? -Weasalmongler

Share this post


Link to post
Share on other sites
Just pass the array pointer, ie:

unsigned char lightmap[128][128][3];

youll pass ''lightmap'' to glTexImage2D

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack

Share this post


Link to post
Share on other sites