GLCanvas creation w/ GL3.3 core sample?

classic Classic list List threaded Threaded
6 messages Options
BIS
Reply | Threaded
Open this post in threaded view
|

GLCanvas creation w/ GL3.3 core sample?

BIS
Hi, guys -

Are there any official code samples illustrating the creation of a GLCanvas with a desktop GL3.3 core context? I have found some samples of GL3 JOGL code online, but I'm not sure they really indicate best practices. I'd really like to see something that I knew illustrated the proper intended usage.

Thanks as always -
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas creation w/ GL3.3 core sample?

gouessej
Administrator
Hi

elect has some samples using OpenGL 3 and 4 but some of them rely on his third party libraries:
https://github.com/elect86/jogl-samples

https://github.com/elect86/modern-jogl-examples

https://github.com/elect86/helloTriangle
Julien Gouesse | Personal blog | Website
BIS
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas creation w/ GL3.3 core sample?

BIS
Thanks for the links - this should give me what I'm looking for. This is one of the sets of examples I'd seen before posting the question (having investigated your links re: GLM substitutes in Java). Good to know it has the stamp of approval.  (I don't anticipate any trouble porting the new GL app code itself, it was just the JOGL set-up/context creation I was uncertain about.)

Thanks again for your time.


DR
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas creation w/ GL3.3 core sample?

gouessej
Administrator
BIS wrote
Good to know it has the stamp of approval
There are some minor issues with this code, it doesn't respect all good practices and I personally reject the use of third party libraries duplicating more or less what could or should be done by JOGL but elect has done an excellent job in porting tons of modern examples to JOGL.
Julien Gouesse | Personal blog | Website
BIS
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas creation w/ GL3.3 core sample?

BIS

gouessej wrote
...  I personally reject the use of third party libraries duplicating more or less what could or should be done by JOGL ...

You know, this kind of goes back to my question about the math libraries. Does JOGL itself have matrix/vector math functionality similar to GLM? (That isn't deprecated from the forward-compatible contexts?) I'd just as soon use built-in capability, if possible, but I would like to stick to forward compatible stuff exclusively.

And thanks for the continued help.


Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas creation w/ GL3.3 core sample?

gouessej
Administrator
You can look at the classes in the package "com.jogamp.opengl.math". The classes of this package are less complete than the third party libraries JGLM and JOML but we'll probably reduce the gap in the future. These libraries are tiny, I really think that JOGL should provide similar features without becoming "bloated".
Julien Gouesse | Personal blog | Website