Getting started with OGL

Started by Glyder, January 21, 2013, 02:04:12

Previous topic - Next topic

Glyder

Hello, I'm going direct to the point. I'm interested in learning the basics to advanced concepts of OpenGL. However, most of (if not all) the content about OpenGL (in my case, guides/tutorials) is designed for C/C++. Because of that I tried migrating from Java to C++. But I really disliked and got really lost in C++, the concepts of different compilers, debuggers, mingw mssys cmake bugged me a little bit.
- Can I "port" what I learn about OpenGL (for C/C++) to Java-LWJGL?
- Is LWJGL's OpenGL inferior to the original one? By Inferior I mean, lacking features or with lower performance.
I'm planning to buy books about OpenGL (e.g SuperBible 5th edition) and I'd get a bit frustrated if what I learn there can't be used with LWJGL :(
Thanks

quew8

LWJGL uses mostly direct jni (java native interface) calls to run opengl methods. Opengl is the same language to language, this is the original openGL (or at least the original 4.3). Hence, openGL methods are almost entirely the same (certainly names are) and the only difference are occasionally different parameters which make use of java's features and using Buffers (java.nio) rather than arrays.
You certainly can "port" opengl from C to java although I agree it can be tedious. My advice is to use the tutorials on this sites wiki: http://www.lwjgl.org/wiki/index.php?title=Main_Page for beginning to intermediate stuff. Once you understand the basics, I find it is easy to understand any openGL tutorial no matter what language it is written in.

Glyder

Thanks, that was quite the kind of answer I was expecting :D
However, my topic name is a little misleading, and I apologize.
I already know some basics, I can translate, rotate, scale, texture, create quads, triangles, cubes spheres, cylinders, etc...
But what I'm aiming to get started with is medium to advanced OpenGL.
The differences between regular OpenGL and LWJGL's was what I was really worried about.
But knowing that both are almost entirely the same was what I was expecting to hear, and thanks.

quew8

No problem, I linked you the wiki because I think its good to get a feel for using opengl in LWJGL even though its essentially the same. Stuff like where to find methods and the like. If you know that stuff however, you should be fine.