Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which OpenGL version is most stable and currently used?

Tags:

c++

opengl

I've been thinking of making an additional wrapper for my project to use OpenGL rather then Allegro. I was not sure which OpenGL version to go for since I know that some computers cannot run recent versions such as v4.4. Also, I need a version which compiles no problem in Linux, Windows, Mac.

like image 640
Johnathan Avatar asked Apr 12 '11 14:04

Johnathan


People also ask

Is OpenGL 2 still used?

OpenGL ES 2.0 - Programmable ShadingIt remains a prevalent API today, and still is the most widely available 3D graphics API, and remains a solid choice to target the widest range of devices in the market.

What OpenGL version should I target?

Short answer: a core OpenGL 3.3 profile. You'll get wide support across all major operating systems with this.


1 Answers

You'll want to look at what kinds of graphics cards will be available on your target systems and bear some details in mind:

  • OpenGL up to 1.5 can be completely emulated in software in real time on most systems. You don't necessarily need hardware support for good performance.
  • OpenGL 1.4 has universal support. Virtually all hardware supports it.
  • Mac OS X only supports up to OpenGL 2.0 and OpenGL 2.1, depending on OS version and hardware. Systems using GMA950 have only OGL1.4 support. Mac OS X Lion 10.7 supports OpenGL 3.2 Core profile on supported hardware.
  • On Linux, it's not unusual for users to specifically prefer open source drivers over the alternative "binary blobs," so bear in mind that the version of Mesa that most people have supports only up to about OpenGL 2.1 compatibility. Upcoming versions have support for OpenGL 3.x. Closed-source "binary blobs" will generally support the highest OpenGL version for the hardware, including up to OpenGL 4.2 Core.

When considering what hardware is available to your users, the Steam hardware Survey may help. Note that most users have DirectX 9-compatible hardware, which is roughly feature-equivalent to OpenGL 2.0. Wikipedia's OpenGL article also specifies what hardware came with initial support for which versions.

If you use a library like GLEW or GLEE or any toolkit that depends on them or offers similar functionality (like SFML, or even Allegro since 4.3), then you'll not need to concern yourself with whether your code will compile. These toolkits will take care of the details of enabling extensions and providing all of the symbols you need.

Given all of this, I'd suggest targeting OpenGL 2.1 to get the widest audience possible with the best feature support.

like image 170
greyfade Avatar answered Sep 23 '22 00:09

greyfade