Jump to content
  • Advertisement
Sign in to follow this  
excali

VBO with multiple indexing?

This topic is 2438 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

Hi all,
I'm trying to render a scene with 300k triangles and in fact there are only 153k different vertex coordinates. There are also other attributes like texture coordinates, normals and tangents. Because it seems only one indices buffer are allowed to bind to GL_ELEMENT_ARRAY_BUFFER, I have to store all 4 attributes for every single vertex in the VBO. As it takes 4 uints to store indices for 4 attributes, but takes 4 x 3 = 12 floats to store attributes directly. That waste a lot of memory and bandwidth.

So, my question is, "Is there a way to set up multiple index buffer for different attributes? or is there another way to improve performance of draw calls?"

Thanks a lot.

regards,
Li

Share this post


Link to post
Share on other sites
Advertisement

Is there a way to set up multiple index buffer for different attributes?

No.

or is there another way to improve performance of draw calls?[/quote]
300K triangles is peanuts. Is your data entirely in VBOs? Are you rendering it with a single (or at most, a very small number of) draw calls? What sort of hardware are you running on?

Share this post


Link to post
Share on other sites
Hi, thank you for your reply.


Are you rendering it with a single (or at most, a very small number of) draw calls?


Currently, I'm rendering a frame with 25 draw calls, dealing with 25 materials respectively, because they have different textures and some of them have normal maps and some of them haven't.

What sort of hardware are you running on?[/quote]

I'm running on a machine with Geforce GTX 460 graphics card and E8200 CPU. BTW, is there any tools can be used to profile GL programs on Geforce 400 cards? I have tried gDebugger, but in order to use the performance counter it needs nvidia PerfKit. I installed it and just found out it has no support for OpenGL on Geforce 400 cards .....

Share this post


Link to post
Share on other sites

BTW, is there any tools can be used to profile GL programs on Geforce 400 cards? I have tried gDebugger, but in order to use the performance counter it needs nvidia PerfKit. I installed it and just found out it has no support for OpenGL on Geforce 400 cards .....

I'm not aware of anything beyond the perfkit - OpenGL doesn't get much love form the IHVs when it comes to tools.

Currently, I'm rendering a frame with 25 draw calls, dealing with 25 materials respectively, because they have different textures and some of them have normal maps and some of them haven't.[/quote]
What sort of frame rate are you achieving? On the assumption that it isn't a good frame rate: that few draw calls shouldn't be a bottleneck, so lacking a proper profiler, you get to do this the old fashioned way :wink:

A likely candidate is that you have a rogue shader - try switching all of them to a simple passthrough shader, that just renders everything a fixed colour. If that doesn't fix your frame rate, then you can rule out shader problems.

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!