LWJGL Tutorials

Started by ted_gress, December 05, 2016, 05:32:49

Previous topic - Next topic

ted_gress

Hi,

I am sure this question has been asked before, however, I haven't found an answer. I'm looking for a tutorial for OpenGL using LWJGL. I'm googled and yhoutubed
and I can't find anyt hing for the latest version. So can someone point me in the right direction?

CoDi

This guy made a ton of nice tutorial videos about OpenGL with LWJGL. You'll probably won't find that much on LWJGL3 yet. Did you check out the LWJGL3 demo suite already?

seventh-chord

Here are some resources you probably want to check out. There are, as far as I know, no complete tutorials for the latest version of LWJGL 3. There are however a lot of good resources:

The LWJGL wiki has a list of tutorials: https://github.com/LWJGL/lwjgl3-wiki/wiki/2.6.-Tutorial-Index. Some of these are at least partially outdated, so I would not recomend following them to the point, but they might provide valuable insight.

The LWJGL demo suite mentioned by CoDi contains a couple of example classes which explain how different core parts of LWJGL 3 work: https://github.com/LWJGL/lwjgl3-demos/tree/master/src/org/lwjgl/demo/intro

The LWJGL wiki contains a guide for installing/setting up LWJGL 3, in addition to introductions for some of the libraries: https://github.com/LWJGL/lwjgl3-wiki/wiki/1.4.-Install

For learning OpenGL, I would recomend learnopengl. The site uses c++, but after the first couple of tutorials, most of the code is OpenGL function calls, and thus will work independent of the programming language you use. Try getting a window running (Using examples from the LWJGL demo suite) and then skipping to the "Hello Triangle" example on learnopengl.

drokid

I am one of those guys who spend days just to be able to start working with lwjgl, and couldn't manage to do so yet. Rich documentation just makes it worse because most of them(even some related with lwjgl3) are deprecated.

I've worked with opengl before, and lwjgl2. When I couldn't manage to work in lwjgl3 I turned back to my old setup lwjgl2.
The current state of LWJGL can be very efficient but doesn't allow new people to start working with it.

I wanted to mention this here because I was so frustrated after spending days for nothing rather than working on my real problems.

Thanks for the suggestions though.

edit: This one looks promising, http://forum.lwjgl.org/index.php?topic=6179.0

Kai

Can you be a bit more concrete as to what exactly is deprecated and how things can be changed for the better?
Unless people actually say, *what exactly* they feel is deprecated the perceived situation will _never_ change. I make the firm assertion, though, that every "official" documentation you'll find on lwjgl.org and on the GitHub LWJGL3 Wiki, especially regarding how to setup LWJGL3, is up to date, and if followed precisely, you'll get a working setup in no time.

drokid

Yes, setting up the environment was clear, and also was showing a window.. I couldn't go further.

I skimmed through many things but as an example
I tried to port this basic code here http://wiki.lwjgl.org/wiki/LWJGL_Basics_3_(The_Quad).html
to lwjgl3 by the help of migration guide https://github.com/LWJGL/lwjgl3-wiki/wiki/2.6.6-LWJGL3-migration
Showing the window was ok but I couldn't show the quad, and since the exceptions are native I got stuck..

You may say I should use vertex buffers, yes I use them normally in my current code in lwjgl2 but I couldn't manage to port my code either. I got help from the samples in the intro package of demo-suite about vbs but I couldn't manage to handle 3d environment and camera I think.

I am aware that just a complain message without details is not much of a use, normally I would clear out problems and even try to fix if there is something I could help but I lost too much time and I don't have time and effort left to discuss the problems in detail and also I believe the problem is not something hidden, it is obvious; "newcomers" will struggle among useless documents and videos.

On lwjgl there is a nice setup document and general information, they are good but that's all. For tutorials and guide it directs to wiki https://github.com/LWJGL/lwjgl3-wiki/wiki
which just tells you to go and learn native opengl.. (I've done many things in opengl before so I consider myself who knows it but I couldn't continue with lwjgl, I might be a dummy that's ok but I guess there would be plenty of people like me) When people can't find things on official site we continue to search. I am not sure if http://wiki.lwjgl.org/ is active anymore but even if it is not we are not aware of it and spend time trying to find out something that works there. Also I couldn't find something on youtube that works for the latest lwjgl.

Anyway, the last link I sent looks promising, I hope it will do the thing.





Kai

I totally agree that http://wiki.lwjgl.org/ needs either one of those two:
- a total and thorough reworking for LWJGL 3
- a very prominent hint that everything written there _only_ applies to LWJGL 2

The reason why there is so little tutorials/demos/examples/guides for LWJGL 3 is that version 3 of LWJGL is quite new still in flux and no one so far had time to do a thorough guide for it. The 3D Game Development with LWJGL book is indeed a good place to start. But be aware that this book is supposed to explain how to implement 3D graphics concepts, such as "shadows", "frustum culling", "mouse picking" in LWJGL. It will not get into details about the mapping/binding scheme used by LWJGL to make OpenGL functions accessible.

I will try to work further on that "intro" package of the lwjgl3-demos suite to explain more of the LWJGL 3 design. Because, if you're familiar with OpenGL, then the binding scheme and how LWJGL handles native concepts (making OpenGL context current, handling memory, handling callbacks, ...) are the only things that could possibly get in your way.

drokid

Quote from: Kai on March 17, 2017, 14:46:31
I totally agree that http://wiki.lwjgl.org/ needs either one of those two:
- a total and thorough reworking for LWJGL 3
- a very prominent hint that everything written there _only_ applies to LWJGL 2

The reason why there is so little tutorials/demos/examples/guides for LWJGL 3 is that version 3 of LWJGL is quite new still in flux and no one so far had time to do a thorough guide for it. The 3D Game Development with LWJGL book is indeed a good place to start. But be aware that this book is supposed to explain how to implement 3D graphics concepts, such as "shadows", "frustum culling", "mouse picking" in LWJGL. It will not get into details about the mapping/binding scheme used by LWJGL to make OpenGL functions accessible.

I will try to work further on that "intro" package of the lwjgl3-demos suite to explain more of the LWJGL 3 design. Because, if you're familiar with OpenGL, then the binding scheme and how LWJGL handles native concepts (making OpenGL context current, handling memory, handling callbacks, ...) are the only things that could possibly get in your way.

Thanks, nice to hear that.

Gojira

I found this tutorial and thought it was decent looking.

http://www.songho.ca/opengl/index.html

Tutorials on OpenGL basics, the rendering pipeline, transforms, cameras, matrix math implementations, vertex arrays, display lists, vertex buffer objects, pixel buffer objects, frame buffer objects, tessellation, and what looks like a basic MVC description.