Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  What version of OpenGL to use?  (Read 2253 times)
0 Members and 1 Guest are viewing this topic.
Offline Axeman

Senior Devvie

Medals: 7

« Posted 2013-02-22 14:40:23 »

I´ve been fiddeling around a bit with OpenGL/Lwjgl, but nothing much. Just an asteroidclone, an rotating box and some textures, all drawn out with glBegin(). Later I realised that glBegin is reeeeally old and not the way to do stuff anymore.

Anyways. Now I want to learn more OpenGL but I´m not really sure where to start. Some people seem to be using OpenGL2, some OpenGL3 and somethings are deprecated from version OpenGL3.2 (?). There seems to be little support for OpenGL4 and perhaps even OpenGL3. I hope you can understand the confusion when I wonder: What version should I use to get going? Smiley Perhaps it doesn´t even matter? I would really appreciate some clarity...

ps. I should perhaps clarify that I don´t have a "game" in mind. I just want to learn more about all the cool stuff like shaders and... Stuff... Smiley
Offline Mac70
« Reply #1 - Posted 2013-02-22 14:56:34 »

If you want to use shaders, OpenGL 3.2 is much better choice than fixed pipeline, old OpenGL. It is much, much harder, but much better performance is worth it.
Offline davedes
« Reply #2 - Posted 2013-02-22 15:48:59 »

For newbies, the choice generally boils down to "fixed-function" or "programmable" pipeline.

The fixed-function pipeline has been around since the early days of GL. It has utilities like glFog and glLight that help you light a scene. There is only so much you can do with the fixed-function pipeline, and you won't really learn the "essence" of graphics programming (IMHO). Most of these features are now deprecated, and you are forced to do it yourself through shaders or custom matrix math. If you wanted to learn this, you would read NeHe and other old tutorials.

The programmable pipeline started with the introduction of shaders (GL 2.0). This means that things like fog, lighting, texture splatting, matrix math, and so forth are all handled with shaders and custom attributes. If you wanted to learn this, you would read ArcSynthesis and other modern tutorials.

As for version, it largely depends on your target audience. If you are doing a 2D game, you probably don't need geometry shaders, transform feedback, instanced drawing, etc. More important would be a wider playability. Minecraft stats give us a rough idea of casual gamers:
  • 49% of users support GL 3 or greater
  • 42% of users only support GL 2.x
  • 9% of users only support GL 1.x
Personally, I would recommend learning the "programmable pipeline" -- but targeting GL 2.0. This also means that your code and shaders will be more compatible with OpenGL ES (iOS, WebGL, Android). You can generally read tutorials for 3.2+ and the concepts will transfer over well, but in some cases you may need to make some changes. Particularly, GLSL code will look slightly different in GL 2.0 than it will in GL 3.2+. All in all, it's not going to be an easy road... Tongue

All of my tutorials are compatible with GL 2.0 and OpenGL ES:

Here are some other modern tutorials that mostly focus on 3.2+ techniques: (Java ports)

And the LWJGL wiki also includes some tutorials on shaders and the programmable pipeline.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

« JGO Spiffy Duke »

Medals: 952
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #3 - Posted 2013-02-22 16:24:05 »

Go for OpenGL 2.1 is my advice, which lets you use modern features and still gives you access to the majority of desktops.

Cas Smiley

Offline Axeman

Senior Devvie

Medals: 7

« Reply #4 - Posted 2013-02-22 17:17:24 »

Thank you for great advice and links, as always! No time to waste, better get started.

...And if it´s easy it´s no fun, is it? Smiley
Offline concerto49

Junior Devvie

« Reply #5 - Posted 2013-02-22 22:57:32 »

It depends on if it's a casual game or a more "hardcore game". Most "hardcore" gamers would have upgraded in the last 3-4 years at least and for sure have gotten OpenGL 3.x or above. The only set back might be mobile, but recent Intel GPU also support it with the latest drivers.

High performance, fast network, affordable price VPS - Cloud Shards
Available in Texas, New York & Los Angeles
Need a VPS Upgrade?
Offline Alan_W

JGO Knight

Medals: 8
Projects: 3

Java tames rock!

« Reply #6 - Posted 2013-02-23 08:57:18 »

My Macbook Air has OSX Mountain Lion - Intel HD Graphics 4000

Compatibility Profile
v1.1 (100 % - 7/7)

v1.2 (100 % - 8/8)

v1.3 (100 % - 9/9)

v1.4 (100 % - 15/15)

v1.5 (100 % - 3/3)

v2.0 (100 % - 10/10)

v2.1 (100 % - 3/3)

v3.0 (95 % - 22/23)

v3.1 (25 % - 2/8)

v3.2 (70 % - 7/10)

v3.3 (10 % - 1/10)

v4.0 (0 % - 0/14)

v4.1 (0 % - 0/7)

v4.2 (0 % - 0/12)

v4.3 (0 % - 0/18)

Core Profile
v3.0 (100 % - 23/23)

v3.1 (100 % - 8/8)

v3.2 (100 % - 10/10)

v3.3 (30 % - 3/10)

v4.0 (0 % - 0/14)

v4.1 (0 % - 0/7)

v4.2 (0 % - 0/12)

v4.3 (0 % - 0/18)

So OpenGL 2.1 in compatibility profile or 3.2 in Core profile if you want it to run on OSX 10.8 (I gather this holds for 10.7 too)

Time flies like a bird. Fruit flies like a banana.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Ecumene (51 views)
2017-09-30 02:57:34

theagentd (76 views)
2017-09-26 18:23:31

cybrmynd (183 views)
2017-08-02 12:28:51

cybrmynd (182 views)
2017-08-02 12:19:43

cybrmynd (189 views)
2017-08-02 12:18:09

Sralse (197 views)
2017-07-25 17:13:48

Archive (747 views)
2017-04-27 17:45:51

buddyBro (881 views)
2017-04-05 03:38:00

CopyableCougar4 (1429 views)
2017-03-24 15:39:42

theagentd (1319 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!