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 2 of 2

Thread: How can i draw many pointy efficient ??

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2017

    How can i draw many pointy efficient ??


    i have a question how to draw many points with opengl in a efficient way.

    Today i have just a Vertex buffer with 4 points for a small cross which is my point.

    For every point i want to draw i set up a modeling transformation load it down to the shader with glUniformMatrix4fv and draw the buffer.

    Best Regards,

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2017
    The best way to draw lots of points in one go is to use Instancing.
    Here you send geometry down the pipeline only once and along with it you pack another VBO containing different model view matrices.
    Depending on instance id of point in shader you chose matrices.
    Here all the matrices and point geometry you are sending only once to GPU and not every render call hence its very efficient.
    for example in below I am drawing mesh 2000 instance with more than 200 FPS with skybox and shadows.

    for doing Instance rendering please refer following tutorial.

Posting Permissions

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