Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this link for some ideas:</p> <ul> <li><a href="https://stackoverflow.com/questions/166356/what-are-some-best-practices-for-opengl-coding-esp-w-r-t-object-orientation">What are some best practices for OpenGL coding (esp. w.r.t. object orientation)?</a></li> </ul> <p>Basically what I've seen that people do to increase their FPS and drop quality includes the following:</p> <ul> <li><p>Using DisplayLists. (cache complex or repetitive matrix stacks).</p></li> <li><p>Using Vertex Arrays. </p></li> <li><p>Using simpler geometry with fewer faces.</p></li> <li><p>Using simpler lighting.</p></li> <li><p>Using simpler textures.</p></li> </ul> <p>The main advantage of OpenGL is that is works with a lot of graphics cards, which are built to do a lot of the 4x4 matrix transformations, multiplications, etc, very quickly and they provide more RAM memory for storing rendered or partially rendered objects.</p> <p>Assuming that all the vectors are changing so much and often that you can't cache any of the renderings...</p> <p>My approach to this problem would be to simplify the drawing down to just lines and points, and get that to draw at the desired frame rate. (A line for your cylinder and a colored point on the end for the direction.)</p> <p>After that draws fast enough, try making the drawing more complex, like a rectangular prism instead of a line, and a pyramid instead of a colored point.</p> <p>Rounded objects typically require a lot more surfaces and calculations.</p> <p>I am not an expert on the subject, but I would google other OpenGL tutorials that deal with optimization.</p> <p>Hope that helps.</p> <p>EDIT: Removed references to NeHe tutorials because of comments.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload