View Full Version : Lightmapz
My card (some kind of S3) dont support multitexturing, but im creating cool game, and i wanna make cool maps. But without lightmaps it will look crap. What i should to do , ppl? (BTW i can play q2 with lightmaps, so should be some kind of solution)..
05-11-2003, 05:07 AM
You have two textures, the lightmap and your base texture. You could render in two passes, first pass with the lightmap texture, and second pass with the base texture using a blend function (i.e. glBlendFunc(GL_ZERO, GL_SRC_COLOR)). Remember just before first pass to call glBindTexture with your lightmap, and just before second pass call glBindTexture with your base texture. And don't forget to enable and disable GL_BLEND at the right places. That's one way.
rebind with another texture? Do i need to create another polygon to do second pass?
05-13-2003, 01:10 PM
Well, you have to draw your polygon(s) again on second pass. Let's say you have compiled your polygon drawing into a display list called iDraw. Then your code should look something like this:
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.