Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
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 936 times)
0 Members and 1 Guest are viewing this topic.
Offline Axeman

Senior Member


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.

Check out my Devblog! Smiley
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:
https://github.com/mattdesl/lwjgl-basics/wiki

Here are some other modern tutorials that mostly focus on 3.2+ techniques:
http://open.gl/
http://www.arcsynthesis.org/gltut/ (Java ports)
http://www.opengl-tutorial.org/
http://tomdalling.com/blog/category/modern-opengl/

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 Kernel


Medals: 369
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 Member


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 Member





« 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 »

http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts

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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (16 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

atombrot (42 views)
2014-08-19 09:29:53

Tekkerue (41 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (26 views)
2014-08-16 06:20:21

Tekkerue (37 views)
2014-08-16 06:12:11

Rayexar (73 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!