Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (868)
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  
  LWJGL and GLSL Versions  (Read 4076 times)
0 Members and 1 Guest are viewing this topic.
Offline ionprogramming

Junior Newbie





« Posted 2015-12-01 12:00:47 »

Recently I've been working on a rendering engine in LWJGL and I've come across numerous issues with versions. So I am after advice on what would be the correct versions to use with this new project.

Firstly, LWJGL 2 or LWJGL 3? Version 2 is still current but version 3 is a complete rewrite and is still missing some utility classes; such as  GLU.gluPerspective(...);

After using LWJGL 2 for the compatibility, I have then come across more issues;

As I want to stick with modern OpenGL, I am using VBOs to render my faces. However when using GLSL to do some basic lighting, I have had to use GLSL 140 to ensure compatibility with the functions like normalise() and transform(). Then i had to enable GL_ARB_compatibility to let me access gl_Normal, gl_Vertex and gl_Color, Like so:

1  
2  
#version 140
#extension GL_ARB_compatibility : require


Basically all I'm asking is for some current advice, all the tutorials on the internet are different and outdated.


So, to my questions:

1) What LWJGL version would you recommend? is 3 complete enough to use in production?
2) What GLSL version should I use?
3) What are the replacements for the data I am using the compatibility layer to access?
4) Are there any nice up to date resources or tutorials for Modern OpenGL?


Thanks in advance for clarifying this for me. It's a steep learning curve
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #1 - Posted 2015-12-01 12:46:54 »

If you're doing something in 2D and I recommend OpenGL 3+ someone's going to shout at me, and if I recommend OpenGL 2+ and you're doing 3D someone's going to shout at me.

Need some context! What are you doing with it? In general I'd say learn OpenGL 2 and work yourself up. That way you learn the differences easier.

Offline theagentd
« Reply #2 - Posted 2015-12-01 13:42:02 »

Just use OpenGL 3.3 and GLSL 330. EDIT: Steam Hardware Survey says DX10 support is at 97.87% right now which, disregarding the earlĂ­est Intel GPUs (that are so weak they can barely glClear() the screen at 60 FPS) that never got OGL3 support, is the same as OGL3. Mac and Linux also supports OGL3.3 now.

LWJGL 3 has it's perks and quirks. Windows are more powerful in some ways but limited in others. There are problems with window icons and you can't switch between fullscreen and windowed mode without recreating the OpenGL context which unloads all your stuff. On the other hand you have working undecorated windows, more powerful V-sync settings and support for multiple windows.

Replace the built-in attributes with your own custom-defined attributes. Lighting parameters can be replaced with uniform shader variables and you have to do your own lighting calculations in the shader.

Myomyomyo.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ed_RockStarGuy
« Reply #3 - Posted 2015-12-01 14:16:46 »

If you're doing something in 2D and I recommend OpenGL 3+ someone's going to shout at me, and if I recommend OpenGL 2+ and you're doing 3D someone's going to shout at me.

Need some context! What are you doing with it? In general I'd say learn OpenGL 2 and work yourself up. That way you learn the differences easier.

If you doing stuff in 2D you need a Giphoscope Wink
Offline ionprogramming

Junior Newbie





« Reply #4 - Posted 2015-12-02 00:30:19 »

Thanks for all the advice guys,

Basically Im making a voxel based engine for a game idea of mine. I know you're all gonna thing "another one of those minecraft wannabes" but this game ideas been in my head for a long time and if anything it'll be following closer in graphics to CubeWorld than Minecraft.

Anyway thats besides the point. I'm making a 3D voxel engine and I guess I would just like to learn the most current version whilst still keeping compatibility open.

So I guess I'll use LWJGL3 and OpenGL 3.3 with GLSL 3.3 as well?
Offline Phased
« Reply #5 - Posted 2015-12-02 00:52:13 »

All your up to date tutorials are going to be in C++.

https://open.gl/

Has got fairly good tutorials to get you started.
Pages: [1]
  ignore  |  Print  
 
 

 
Riven (579 views)
2019-09-04 15:33:17

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

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

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

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

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

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

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

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

nelsongames (5114 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

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