Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Slower renderer? (ofGLProgrammableRenderer)

$
0
0

Hi,

Do you get the same performance difference if you do:

		ofMesh mesh;
		mesh.setMode( OF_PRIMITIVE_LINES );
		for( int i = 0; i < 5000; i++ )
		{
		    mesh.addVertex( ofVec3f(ofRandom(-5,5), ofRandom(-5,5), ofRandom(-5,5) ) );
		    mesh.addVertex( ofVec3f(ofRandom(-5,5), ofRandom(-5,5), ofRandom(-5,5) ) );
		}
		mesh.draw();

I use the programmable renderer all the time and performance isn't an issue, but I am using it with custom shaders rather than the default one OF uses internally when you are drawing. The internal one has to account for all the different types of features you are using to draw and won't be as quick as a custom shader doing only what you are looking to do.

If you are wanting to use the programmable renderer, chances are it's because you want to use your own custom shaders and you won't be using the built in one that much.

Best,
Andreas


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>