lwjgl for opengl 2.0

Started by dinu, August 19, 2017, 05:59:40

Previous topic - Next topic

dinu

What is the latest version of lwjgl working with opengl 2.0 (my graphics card doesnt support 3 and newer)
I know of 0.95 but I hope there are newer ones

kappa

LWJGL doesn't require any particular version of OpenGL, instead you target the version of OpenGL you wish to use using LWJGL by only using API's available in that particular version of OpenGL.

Therefore its perfectly possible to target and only use OpenGL 2.0 using the latest version of LWJGL. You just use the API calls in the class GL20 and classes numbered below it (e.g GL11, GL13, GL15, etc). API's for any versions of OpenGL higher than that are stored in classes numbered higher and you simply avoid using them if you only want to use a maximum of OpenGL 2.0 (e.g. OpenGL 4.6 api's will be in GL46).

LWJGL 3.1.3 at present supports all versions of OpenGL from 1.1 to 4.6.

dinu

Quote from: kappa on August 19, 2017, 06:58:14
LWJGL doesn't require any particular version of OpenGL, instead you target the version of OpenGL you wish to use using LWJGL by only using API's available in that particular version of OpenGL.

Therefore its perfectly possible to target and only use OpenGL 2.0 using the latest version of LWJGL. You just use the API calls in the class GL20 and classes numbered below it (e.g GL11, GL13, GL15, etc). API's for any versions of OpenGL higher than that are stored in classes numbered higher and you simply avoid using them if you only want to use a maximum of OpenGL 2.0 (e.g. OpenGL 4.6 api's will be in GL46).

LWJGL 3.1.3 at present supports all versions of OpenGL from 1.1 to 4.6.
So what arguments should I put in the constructor of the org.lwjgl.opengl.ContextAttribs?

kappa

For basic stuff, if you are targeting OpenGL 2.0 you shouldn't need to put any ContextAtrribs unless you are targeting OpenGL 3.2+. Better to start with some basic LWJGL examples to get an idea on how it all works.