Hi all
I have to display a lot of cubes as visualization of some mathematics computing (in worst case even more than 100 000).
It's real time visualization of computing so I want to display this as fast as possible.
It will be only solid color cubes.
What I have before display is array contains size of cube and location (3d coordinate of center).
I thought for maybe Vertex Buffer of Triangle strips. But if I want use CUDA for generating vertex coordinates (for parallel and fast it up) I will have problem with concatenation of strips (because if I want to insert degenerate triangles to separate cubes I will need to know vertex coordinates for both of cubes and for parallel I need to generate cubes strips separately).
What is your ideas to make it fast?
Way to display a lot of cubes
Hi all
I have to display a lot of cubes as visualization of some mathematics computing (in worst case even more than 100 000).
It's real time visualization of computing so I want to display this as fast as possible.
It will be only solid color cubes.
What I have before display is array contains size of cube and location (3d coordinate of center).
I thought for maybe Vertex Buffer of Triangle strips. But if I want use CUDA for generating vertex coordinates (for parallel and fast it up) I will have problem with concatenation of strips (because if I want to insert degenerate triangles to separate cubes I will need to know vertex coordinates for both of cubes and for parallel I need to generate cubes strips separately).
What is your ideas to make it fast?
instancing?
Could even use geometry shaders, I've done this before in my demo -> http://pouet.net/prod.php?which=57299
What you can do with geometry shaders, or at least how I implemented it in that demo is that I only have to send a GL Point to the GPU and it will generate cubes on that spot, means I only send 1/8th of the points to the GPU I normally have to send 8 to create a cube out of triangles. It's fully written in GSLS, what I do is use a triangle strip which I wrap around this point. Add some size variables etc, color and you'll have about what I used for the demo. In the demo I was able to draw about 450K more or less, depending on the culling.
More on the demo here http://www.nisute.co...gathering-2011/
What you can do with geometry shaders, or at least how I implemented it in that demo is that I only have to send a GL Point to the GPU and it will generate cubes on that spot, means I only send 1/8th of the points to the GPU I normally have to send 8 to create a cube out of triangles. It's fully written in GSLS, what I do is use a triangle strip which I wrap around this point. Add some size variables etc, color and you'll have about what I used for the demo. In the demo I was able to draw about 450K more or less, depending on the culling.
More on the demo here http://www.nisute.co...gathering-2011/
[font=arial, verdana, tahoma, sans-serif][size=2]Wow, thanks for replying guys, I will look at this technologies
I have another question (maybe silly, but I'm not quite familiar with OpenGL. I rather create algorithms and use OpenGL to visualize results):
What will happen if I will push more data (floats) than graphic card have available ram? Will it make error or start to swap... or what? I think this situation may occur, because my computing use CUDA and it will take large part of graphics card memory.[/font]
I have another question (maybe silly, but I'm not quite familiar with OpenGL. I rather create algorithms and use OpenGL to visualize results):
What will happen if I will push more data (floats) than graphic card have available ram? Will it make error or start to swap... or what? I think this situation may occur, because my computing use CUDA and it will take large part of graphics card memory.[/font]
[font="arial, verdana, tahoma, sans-serif"]Wow, thanks for replying guys, I will look at this technologies
I have another question (maybe silly, but I'm not quite familiar with OpenGL. I rather create algorithms and use OpenGL to visualize results):
What will happen if I will push more data (floats) than graphic card have available ram? Will it make error or start to swap... or what? I think this situation may occur, because my computing use CUDA and it will take large part of graphics card memory.[/font]
what will happen is let's say you have 1GB of video RAM and 4GB of system RAM, and you have 3GB of data. About 1GB of it will be on the video card, and 2GB on the system ram. However this is implementation (driver) dependent, so your driver might do it differently, say it stores all the data in the system RAM.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement