Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Transformed and Lit Vertices

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Moscow,Russia
    Posts
    3

    Transformed and Lit Vertices

    I have array of transformed and lit vertices
    can you advise me how to render it with best performance?

  2. #2
    Intern Contributor
    Join Date
    Mar 2001
    Posts
    58

    Re: Transformed and Lit Vertices

    I hope you are not going to bypass an OpenGL pipeline...
    Anyway, if you use a GF card, try glDrawElements with NV_vertex_array_range extension. Also see OpenGL T&L performance FAQ v2 at http://www.nvidia.com/Marketing/Deve...Frame?OpenPage
    Hope this helps.
    Alexei.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Moscow,Russia
    Posts
    3

    Re: Transformed and Lit Vertices

    Thanks for Advise,but i have TNT2
    it is w/o HW TnL

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,704

    Re: Transformed and Lit Vertices

    If you already transformed into screen space, just use the Ortho() function to set up a screen mapping, and use LockArrays()/DrawElements()/UnlockArrays() for the most optimal path through the driver.

    If you need the card to do perspective etc (you just transform to world space) then the same applies, except you use Perspective().

    Note that there is no such thing as "GL doing NO transform" because it still needs to do internal work to set up triangles with shading and texturing, so if you do the transformation because you think you're faster than the driver, you'll have to pay the price anyway (although there may be a fast path for when the MODELVIEW matrix is LoadIdentity()-ed).
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •