Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: optimisating triangles drawing

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2003

    optimisating triangles drawing

    Hi everybody,
    I have a compicated algorithm that gives me lot of triangles (3D scene)... the problem is that some times it gives me 6 points for a rectangle... and we know that I need only 4 points (using glBegin(GL_TRIANGLE_STRIP)) so how can I do to reoganise my points (triangle) to have minimum points possible (for better performance and less momory)

    think you

  2. #2
    Intern Contributor
    Join Date
    Feb 2004

    Re: optimisating triangles drawing

    Partition your trinagles into co-planar sets. Within each set, combine shapes, convert trinagles to general polygons, by recursively removing adjacent edges. Apply a minimal triangulation to each polygon.

    For help on any step, see a Computation Geometry book. (Or post back questions here.)

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Aug 2001

    Re: optimisating triangles drawing

    Originally posted by ybenaabud:
    ...the problem is that some times it gives me 6 points for a rectangle...
    How much often does this happen? I wouldn't mind it unless you're wasting more than 1kTri and you're geometry limited.
    Before starting on this, are you sure this optimization will pay off in the short run? In the long run?
    By the way, how did you realize that and why? Sometimes it's right to have vertices when they're not supposed to be.

Posting Permissions

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