Jump to content
  • Advertisement
Sign in to follow this  
tonnot

OpenGL VBO (Vertex Buffer Objects) and can I'm sure that today almost graph cards can support it ?

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

I have two ways to draw my wordl, vertex arrays or vertex buffer objects.
As I have readen, VBO are the best.
But I'm ask myself .... today I can be completely sure that it is supporte by almost all graphic cards ?
The fist version of opengl that suport it was 1.5 . OpenGL 2.0 was released on 2004.

So, Have I to duplicate my code to support both ways ? (arrays and VBO's ) ??

I have more doubts.
I have read :
Legacy Note: Versions of OpenGL prior to 3.0 allowed the use of client-side data for vertex rendering, but GL 3.0 deprecated this. Core GL 3.1 and greater forbid client-side vertex data, so VBOs are the only means for rendering.
What means ?
Thanks

Share this post


Link to post
Share on other sites
Advertisement
So, Have I to duplicate my code to support both ways ? (arrays and VBO's ) ??[/quote]
That is up to you. If you want to support Intel stuff, then I suggest that you use D3D since their driver support is better.

What means ? [/quote]
It means that you should not create a forward compatible context. Create a legacy context so that you can use plain old vertex arrays.
In more specific terms, don't do what we do here http://www.opengl.org/wiki/Tutorials
Notice how we search for
WGL_ARB_create_context

Share this post


Link to post
Share on other sites
In my opinion, you should safely assume that OpenGL 2.1 is present, simply by making it a minimum requirement (and of course checking the version and aborting if it isn't).

The reasoning behind that is:
  1. it solves 90% of your headaches (VBO, PBO, FBO, non-POT) because you have a good working set of base functionality that is guaranteed
  2. not half a million extra checks and 20 different code paths for all eventualities
  3. every graphics card that is not 10 years old can do OpenGL 2.1
  4. if OpenGL 2.1 is not supported, then either it's a software fallback, and a really bad one too
  5. or, the graphics card is so old/cheap that the user will not have any fun either way, because it does not have enough fillrate/memory/whatever

That said, vertex buffer objects are something that can easily be emulated in software (without any penalties) too, if the hardware really does not support them. Insofar, there is no excuse for VBO not being supported even on 10 year old hardware. Of course it won't be magically faster, but it will work the same. If an implementation really doesn't support VBO, it is just hopelessly old (or hopelessly poor).

So, even blindly assuming that VBO is always present (not even looking at the version or extension string) may be a valid point of view although it's of course incorrect.

Ed:
Worded differently: If the most basic functionality is not present, you should conclude that it does not make sense to support this particular client at all. It is not in your client's interest having a game run at 1 FPS (or slower), and it is not in your interest dealing with the unavoidable support queries of this client.
Your interest is making it work for as many people as reasonably possible, and making it work well.

Making it work badly for someone who did not care to spend $20 on a graphics card five years ago is not in the interest of anyone.

Note that you can even buy OpenGL 3.2/3.3 compatible cards for under $20 nowadays (which is why I personally don't target anything below version 3.2 at all any more, it just does not warrant the trouble of maintaining extra codepaths -- the people who can't (or don't want to) afford a $20 card can't (or don't want to) afford to pay you either, so putting extra work in supporting them means only to put extra work in people who will only pirate your stuff). Edited by samoth

Share this post


Link to post
Share on other sites

In my opinion, you should safely assume that OpenGL 2.1 is present, simply by making it a minimum requirement (and of course checking the version and aborting if it isn't).

The reasoning behind that is:
  1. it solves 90% of your headaches (VBO, PBO, FBO, non-POT) because you have a good working set of base functionality that is guaranteed
  2. not half a million extra checks and 20 different code paths for all eventualities
  3. every graphics card that is not 10 years old can do OpenGL 2.1
  4. if OpenGL 2.1 is not supported, then either it's a software fallback, and a really bad one too
  5. or, the graphics card is so old/cheap that the user will not have any fun either way, because it does not have enough fillrate/memory/whatever

That said, vertex buffer objects are something that can easily be emulated in software (without any penalties) too, if the hardware really does not support them. Insofar, there is no excuse for VBO not being supported even on 10 year old hardware. Of course it won't be magically faster, but it will work the same. If an implementation really doesn't support VBO, it is just hopelessly old (or hopelessly poor).

So, even blindly assuming that VBO is always present (not even looking at the version or extension string) may be a valid point of view although it's of course incorrect.

Ed:
Worded differently: If the most basic functionality is not present, you should conclude that it does not make sense to support this particular client at all. It is not in your client's interest having a game run at 1 FPS (or slower), and it is not in your interest dealing with the unavoidable support queries of this client.
Your interest is making it work for as many people as reasonably possible, and making it work well.

Making it work badly for someone who did not care to spend $20 on a graphics card five years ago is not in the interest of anyone.

Note that you can even buy OpenGL 3.2/3.3 compatible cards for under $20 nowadays (which is why I personally don't target anything below version 3.2 at all any more, it just does not warrant the trouble of maintaining extra codepaths -- the people who can't (or don't want to) afford a $20 card can't (or don't want to) afford to pay you either, so putting extra work in supporting them means only to put extra work in people who will only pirate your stuff).


I'd +2 this if I could; awesome advice and seconded all the way.

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!