Jump to content
  • Advertisement
Sign in to follow this  
Daniel Lee

howto speed up rendering with 5 viewports

This topic is 4853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

allo, i'm working with 5 viewports and noticed that the graphics is rotating rather slow. I think its the repeatative re-initialising of the viewports in the draw loop. is there a better way to achieve higher visual performance and yet maintaining the 5 viewports. ciao

Share this post


Link to post
Share on other sites
Advertisement
If you are rendering the same meshes, you could use "Instancing".

I heard about it that you only need to send the vertex data to the graphics card once instead of 5 times (correct me?!).

You could also pre-transform the vertices in your program instead of matrices and use a vertex shader without matrix calculations.

Share this post


Link to post
Share on other sites
openGL does not have instancing, instancing is a d3d thing, it is not needed in openGL.

To speed things up you could try VBO, but not all hardware supports that.

allso remember, 5 viewports take five times as mutch time to render than one.

Share this post


Link to post
Share on other sites
Quote:
Original post by Daniel Lee
I think its the repeatative re-initialising of the viewports in the draw loop.


Find out for sure. It'd be a shame for you to put lots of effort into speeding one thing up, only to find it's another.

How many polys are you drawing? any shaders? how fast is it with 1 viewport and the same geometry + shaders? how fast is it with 5 viewports and simpler geometry + shaders? How fast drawing the geometry and shaders 5 times in one viewport?

Find these things out, and you'll probably have the answer.

Share this post


Link to post
Share on other sites
What you want to do is check the time it takes to render 1 viewport 1000times
and then check the time it takes to render 5 viewports 1000times.

This is what the result should be if its just because of render 5 times the ammount of stuff
5 * SingleViewportTime = PentViewportTimes * 1
ie
1 Viewport takes 10 secs
5 viewports takes 50 secs

then there isnt really anything that could be done.

Share this post


Link to post
Share on other sites
well looks like its there to stay. In my app those vertex are already in display lists. Maybe the nearest thing is to use
another higher performance card though the case of Dollar&Cents.

what do you think.
ciao

Share this post


Link to post
Share on other sites
Is this for a modelling program or game?

Could you only refresh when needed? Like if you need to rotate in one viewport, update that viewport only when you are doing something in that one. Stop once you are done with it...

Share this post


Link to post
Share on other sites
If it is possible, I would also advise using VBOs.
When I converted my project from using Display Lists to VBOs, I had a performance increase of 300% and up.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!