Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Quick question for an opengl guru, I'm in the process of building a render queue and can either reduce the number of shader binding or the number of vertex buffer binding. I just want to know which one is more expensive on newer graphics cards (IE)(opengl >= 3.2)?

share|improve this question
1  
How many shaders vs how many vertex buffers? –  Byte56 Nov 22 '12 at 23:36
2  
Profile, benchmark, make an informed decision. –  Darth Satan Nov 22 '12 at 23:47
    
I asked a question somewhat similar/related to this on GameDev.net, which I think you may find interesting. It's not so much about binding buffers, but still relevant. –  Cornstalks Nov 24 '12 at 8:44

1 Answer 1

How exactly your system performs state changes is not part of the OpenGL specification, so perfomrances may vary betwen diffrent vendors and implementations. The only real way to answer your question is simply by testing it. Write a simple test program (or use the the thing you´re currently working on if possible), which performs alot of buffer bindings to reduce shader bindings and then the opposite. Use a high precision clock to measure the time of both test cases and compare.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.