Multipassrendering ?

Hi guys,
I want to display my world and to produce some light I want to use Lightmapping.

ARB_Multitexture is fine, but I want it to work on way old cards, too.

So I need Multipassrendering.

How to render in multiple passes ?

Take this as an example:


Now in this piece of code, what should the XXXXXX be ???

What must I do to render in multiple passes.

Since I’m very new to OGL please write not to complicated.

Thanks anyway !


Assuming your lightmaps are simply attenuation maps, then use glBlendFunc(GL_DST_COLOR, GL_ZERO) and glDepthFunc(GL_EQUAL)

ARB_Multitexture is fine, but I want it to work on way old cards, too.

How old cards are you talking about?
I thought ARB_multitexture was supported since Voodoo2. I think we should forget those old cards, and focus on new ones.
I think that if a graphics card doesn’t support ARB_multitexture, It is worth of nothing, and should be left behind.

Hm, you’re right.

But I’ve an Laptop with an ATI RAGE 3D MOBILITY and it doesn’t support ARB_Multitexture.

By the way: I’m making my game for our schoolcomputers and there we have only sh*t cards

I just want to include it “TOO”.
Everything else is done for new systems but always with an option for older systems.

This case (ARB_multitexture) is the most extreme case

Thanks anyway,

I have to seriously disagree with not supporting older cards simply because they are older. To the contrary, if you can support them with little extra effort, why not? You only increase your audience. Afraid that your program might be misrepresented on the older hardware? Then plainly put a disclaimer on it indicating that while it can run on older hardware, it is not recommended. Simple. Quake3 could run on a freaking NVIDIA Riva 128, and that didn’t detract at all from the TNT2 owners.

I agree with DFrey.

Also, I believe a graphics application programmer should not have deal with extentions and hardware specifics, etc.

Anyone out there program for a specific harddrive?

I hope OpenGL will catch up!


[This message has been edited by lobstah (edited 04-30-2002).]

Yes yes I agree that it is good to support as many hardware as you can, but sometimes it may cost a great deal of time to make things work on every machine.
I think myself that it is good to use some extensions as the primary option, but if there is no support for it, I’ll make a cheap code to be used instead, but that is usually much slower than an extension.

Here’s something I used to use (before singlepass):


// Render all your polygons here with base textures


// Render here all your polygons again, but use now your lightmap textures

Those blendfunc parameters could be something else, but I think that gives a nice overbrighting.

Ofcource, if your scene is large, that kind of multipass rendering is heavy, so it would be good to use vertex arrays.

[This message has been edited by blender (edited 05-01-2002).]