Looking for tutorials for lwjgl 3.0

Started by FieryXJoe, January 15, 2015, 07:48:27

Previous topic - Next topic

FieryXJoe

Decided to try my hand at developing a game from scratch and LWJGL is fairly accessible to me. I am adept with java but as most of my experience has been with modding or classwork I have no experience working with graphics/rendering. Unfortunately any tutorials I can find appear to be referencing classes that don't exist so I assume they are for an old version. I doubt I will be able to figure out rendering on my own just going off of the base class given in the "Get Started" page of their site. So if anyone could point me to a tutorial on 2d rendering in 3.0.0 or just give me a rundown on the basic methods I will need to be working with, or even just tell me that all of those tutorials are in fact correct and I am just an idiot. It would be greatly appreciated.

Edit: One more question, in the class given in the "Get Started" section it calls methods such as "glfwSwapInterval(1);" without referencing an object, and without this method existing in this class or this class extending another, my current knowledge of Java doesn't allow for this to work and I can't make sense of how this still runs.

Cornix

Almost all methods of LWJGL are static methods. In the Get Started tutorial the static methods are probably imported using a static import. If you dont know what a static import is I would recommend doing some research on that.

Rendering something is done with OpenGL. You dont need any LWJGL tutorials for that. You only need LWJGL to create an OpenGL context (a window) and user input (mouse, keyboard, controllers, etc). LWJGL does also offer you bindings to the native OpenGL methods, these are typically done via static methods like:
GL11.glBegin(123);


If you already managed to construct an OpenGL context using LWJGL then all you need to do is to learn how to render with OpenGL. For this you can use any tutorial written for any language. The OpenGL methods are identical.

SilverTiger

For a tutorial on rendering with OpenGL I would advice you to get started with shaders instead of the fixed function pipeline.
This tutorial helped me a lot when I started to learn working with shaders: https://open.gl/.
Some time ago I started a tutorial on LWJGL3, but it is not finished yet, you could take a look here.