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

Thread: How can i draw many pointy efficient ??

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2017
    Posts
    8

    How can i draw many pointy efficient ??

    Hi,

    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,
    TinTin

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2017
    Location
    holographica
    Posts
    10
    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.

    https://www.youtube.com/watch?v=oxAG2Q0N_8I

    for doing Instance rendering please refer following tutorial.

    http://www.opengl-tutorial.org/inter...es-instancing/

Posting Permissions

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