Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jjmoore

Pages: [1]
1
Graphics / Re: Efficiency...
« on: May 06, 2021, 12:44:04 am »
Thank you.

2
Graphics / Efficiency...
« on: May 05, 2021, 03:22:15 pm »
Apologies in advance,
If this has been asked before... please point me in the right direction...

So with regards to the statement... "performance depends in large part on the number of calls to the draw function ..."

What is the most effective and efficient way to call groups of primitives...?

A draw() for all your points (one vertex array) followed by a draw() for all your triangles (its own vertex array) and then followed by lines (again another vertex array), and so on?

Assuming you had a large but reasonable number of all drawable primitives that you wanted to update and draw each frame... In other words, the worst case scenario... Is this the best approach?

Or, can something be done with a virtual base class and a collection via polymorphism? Without any offset for different vertex requirements..?.. So, you only call draw() once for all the primitives collected and required? I guess you could translate everything into single points, a vertex, in an array and have another matching array for the number of vertices... ?

Thanks in advance for any advice... Finally, may I ask, if you know of anyone to ever use SFML to plot realtime and or static data based charts... Financial and scientific?

All the best, Jonathan


Pages: [1]