Ian Romanick wrote:

James Jones wrote:

Ian Romanick wrote:

That would be useful, but it won't solve the problem Chris was seeing. I'm pretty sure that when TexSubImage is used to update a dynamic lightmap, the entire texture is replaced.


Not necessarily. If I recall, quake combined many lightmaps into one large texture. It might only be updating the portions that change, unless I'm wrong and dynamic lightmaps were stored seperately.


That is true for the static lightmaps. I seem to recall from looking at the GPLed Quake2 source that each dynamic lightmap is its own texture object. I could be wrong, though. In either case, it would be easy enough to figure it out: Use the source, Luke! :)


As a contributor to quakeforge and a friend of the guy who started this thread:

Original id quakeworld never did dynamic lightmaps, it used a "bubble" polyblend to do dlights.
Most of the open source quake extension projects do though, and this is how quakeforge does it:


There are up to MAX_LIGHTMAPS (64) lightmaps, which are 128x128. surfaces are allocated
parts of these.


when a surface's light is changed, it recreates the part of the lightmap for that surface, and
extends the lightmap's dirty rectangle around it.


at certain points (depending), all lines in a lightmap that are part of the dirty rectangle
are glTexSubImage2d'd.





------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to