Results 1 to 8 of 8

Thread: Multipassrendering ?

  1. #1
    Member Newbie
    Join Date
    Mar 2002
    Location
    Vienna Austria
    Posts
    34

    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:

    DrawWorld (DRAWMODE_TEXTURES);
    XXXXXXX
    XXXXXXX
    XXXXXXX
    DrawWorld (DRAWMODE_LIGHTMAPS);


    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 !



    stryx
    ***EOF***

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Multipassrendering ?

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

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Pori, Finland
    Posts
    191

    Re: Multipassrendering ?

    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.

  4. #4
    Member Newbie
    Join Date
    Mar 2002
    Location
    Vienna Austria
    Posts
    34

    Re: Multipassrendering ?

    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,
    StryX
    ***EOF***

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Multipassrendering ?

    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.

  6. #6
    Member Contributor
    Join Date
    Jan 2001
    Location
    Portland, ME., USA
    Posts
    86

    Re: Multipassrendering ?

    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!

    lobstah...

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

  7. #7
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Pori, Finland
    Posts
    191

    Re: Multipassrendering ?

    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.

  8. #8
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Pori, Finland
    Posts
    191

    Re: Multipassrendering ?

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

    glDisable(GL_BLEND);

    // Render all your polygons here with base textures

    glEnable(GL_BLEND);
    glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR);

    // 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).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean