Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (591)
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 1422 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 https://github.com/mattdesl/lwjgl-basics/wiki, but it does not explain almost anything related to modern OpenGL rendering and is focusing on shaders.

Check out my Devblog! Smiley
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:

http://www.opengl-tutorial.org/
http://www.arcsynthesis.org/gltut/ (Java ports here)
http://open.gl/
http://tomdalling.com/blog/category/modern-opengl/

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.
http://www.lwjgl.org/wiki/index.php?title=Main_Page

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>?

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

JGO Coder


Medals: 4
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:
https://github.com/mattdesl/lwjgl-basics

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  
 
 
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.

trollwarrior1 (34 views)
2014-11-22 12:13:56

xFryIx (73 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (40 views)
2014-11-12 21:09:33

kovacsa (66 views)
2014-11-07 19:57:14

TehJavaDev (70 views)
2014-11-03 22:04:50

BurntPizza (68 views)
2014-11-03 18:54:52

moogie (83 views)
2014-11-03 06:22:04

CopyableCougar4 (82 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!