I’ve been using a Mac Mini to play with an app that draws 20k small circles.
I decided to try to set up my project on my Windows machine because I have a GTX1070 card in it, and I figured the output performance should be significantly faster than my Mac’s.
Is my code not using my Windows PC’s GPU? What can I do to improve the performance?
(I’m not using shaders nor FBOs. (I am extremely inexperienced with both at the moment))
if you are drawing circles one by one using ofCircle or similar the bottleneck is probably not the gpu but the cpu. you should try to reduce the number of draw calls as much as possible by for example joining all the geometry in one mesh or using instanced drawing to emit the geometry in the gpu instead of the cpu
Thank you for your help. I am drawing the circles one by one.
by for example joining all the geometry in one mesh
You can do this with circles?
using instanced drawing to emit the geometry in the gpu instead of the cpu
Is there a guide on how to do that? I can’t find a mention of instanced drawing on ofBook.
This thread below looks like a good resource which I will have to study:
no an fbo is not meant to be used like that, you should be using a buffer object (ofBufferObject) or a texture buffer object using an ofTexture the way it’s demo’d in the textureBufferInstancedExample.
Also downloading data form the graphics card is slow and problematic so it’s better to do those calculations in the same shader that draws the circles. With instanced drawing you can also just pass the geometry of one circle and calculate the position for every circle depending on an id you get i…
As well some examples in the examples directory, such as vboMeshDrawInstancedExample and textureBufferInstancedExample.