Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (778)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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  
  Moving from OpenGL 1.x to shaders and modern OpenGL - any tutorials?  (Read 3796 times)
0 Members and 1 Guest are viewing this topic.
Offline Mac70
« Posted 2013-02-08 15:53:41 »

Like in topic. I want to move from OpenGL 1 to modern OpenGL and learn shaders, so I am searching for tutorials. Does anybody know any tutorials which can help me?

I have currently tried, but it does not explain almost anything related to modern OpenGL rendering and is focusing on shaders.
Offline davedes
« Reply #1 - Posted 2013-02-08 16:16:17 »

The "programmable pipeline" refers to the dependency on shaders to do anything (fog, lights, etc). If you understand shaders, then you will have a much easier time understanding how the entire pipeline comes together.

Typical next steps would be to learn about matrices, VBOs, FBOs, and how to compile your own shaders. If you are working in 2D, then it basically involves re-writing the LibGDX or lwjgl-basics API (ShaderProgram, SpriteBatch, FrameBuffer etc). There are plenty of C/C++ that will go into more detail on these subjects, mostly regarding 3D: (Java ports here)

There are also plenty of 3.2+ tutorials on the LWJGL wiki. These won't enforce object-oriented practices (like using a Texture or ShaderProgram class to minimize duplication) but they will get the point across.

All of these tutorials require "core profile" and new versions of GLSL. They won't work on a lot of older computers and won't translate to GL ES (i.e. iOS, WebGL or Android). However, they will help you understand the pipeline, and after that you can work on learning ES-specific techniques.

Offline Mac70
« Reply #2 - Posted 2013-02-08 16:46:40 »

So... If I have my own OpenGL 1.1 sprite loader and displayer, the only change I should add is shaders support, I am excluding half of potential players if I will move to OpenGL 3.0>?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline StonePickaxes

JGO Coder

Medals: 5
Projects: 2

Nathan Kramber

« Reply #3 - Posted 2013-02-08 17:52:17 »

If you decide to use a minimum version of OpenGL in the 3.x range, then yes, you will be eliminating possible customers. However, it's their fault for trying to play games on an old computer, haha.

Check out my website!
Offline davedes
« Reply #4 - Posted 2013-02-08 18:38:24 »

My tutorials are compatible with GL 2.0+ (my computer doesn't support 3+). The shader code (i.e. #version 120 or less) will work with 2.0 as well as ES (Android, iOS, WebGL).

If your goal is to use a more efficient sprite renderer which supports shaders, then I would suggest just using lwjgl-basics as a 3rd party library in your game. If you are really crazy and keen to re-invent the wheel by dealing with all of the lovely GL boilerplate, you can look through the API source code as a reference. It's as minimal as you can get:

The best solution is obviously to use LibGDX as your GL wrapper (instead of LWJGL), which will allow you to support a variety of devices. But for whatever reason, some people are afraid to use 3rd party libraries... Roll Eyes

Pages: [1]
  ignore  |  Print  

hadezbladez (358 views)
2018-11-16 13:46:03

hadezbladez (191 views)
2018-11-16 13:41:33

hadezbladez (361 views)
2018-11-16 13:35:35

hadezbladez (90 views)
2018-11-16 13:32:03

EgonOlsen (2191 views)
2018-06-10 19:43:48

EgonOlsen (2226 views)
2018-06-10 19:43:44

EgonOlsen (1384 views)
2018-06-10 19:43:20

DesertCoockie (2022 views)
2018-05-13 18:23:11

nelsongames (1674 views)
2018-04-24 18:15:36

nelsongames (2312 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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!