Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Best Documented OpenGL bindings for Java?

Started by Luckless Jul 3, 2006 at 1:48 PM 7 replies 1.9k views
Original Post
Luckless
Luckless
For the last few weeks, I have been trying to get into 3D programing, however most guides to JOGL, LWJGL and that are all "Ok, here is a basic program that does stuff, don't worry about how it works, just follow along, you can stumble around later trying to work out just what we're talking about, because clearly no one wants to spend days reading background info before they see something on screen!" What is the easiest way to get started, learning the basics (draw and texture simple shapes) in a clear manner that lets you know WHY something works. (lack of ogl being OOP doesn't make it easier) Does anyone have a link to docs clearly explaining how to use the state machine, and how/why it works that way? And does the Red/Blue book cover things the same for a Java Binding as it does for standard C? Or are they more of an annoyance to use with Java? Thank you. (if mods feel this would do better in the main OGL forum, then feel free to move it there. I figured most people that knew the Java and OGL would be more likely to see here)
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
justo
justo
its important to remember the apis are just bindings...both lwjgl and jogl are almost exact copies of regular opengl calls, so the usual opengl sources (red book, nehe, etc) will do you fine. the only niggling issues are with things like buffers replacing arrays in the original C, and that should be pretty quick to pick up (i think lwjgl has a pretty good wiki entry on using them).
Son of Cain
Son of Cain
As already explained above, the red book and all OpenGL references are valid when using a binding - simply because these projects are bindings, and not APIs themselves.

The only differences you will find between JOGL and LWJGL are Sun's support for JOGL and some design differences. When it comes down to documentation, both have to document the parameters of the OpenGL API. Since documenting OpenGL itself isn't their responsibility, all you have is a referece in each method's doc, in order to help you recognize which method you're invoking in the underlying API, and what effect each parameter has, etc..

About the buffer/array issue, there's a commotion in the community requiring support for structs on the Java language. That would allow to map the input data for OpenGL directly in memory, and so benefiting performance and making programing in this paradigm quite easier.

Cas is the one who started the talks, so he's obviously the one suited to clarify this matter, but certainly we should look into it and take a side - if such benefits are indeed valid for the gaming community, we should try to achieve them.

Son Of Cain
a.k.a javabeats at yahoo.ca
Ezbez
Ezbez
Some of the easiest to use documentation for OpenGL calls that I have found are actually those made for PyGL. I frequently use them for both C and Python OpenGL functions. You can find them here.

Hope that helps.
GentlemanHal
GentlemanHal
Hi,

"The Red Book Examples using JOGL

This page contains ported C examples from the OpenGL Programming Guide (affectionately known among graphics programmers as the "red book"). They were ported using javax.media.opengl extension library."

Linky.

:)


- Chris
"More computing sins are committed in the name of efficiency than for any other single reason - including blind stupidity" - William Wulf "Any fool can write code that a computer can understand. Good programmers write code that a human can understand"
mako_5
mako_5
NeHe has a lot of tutorials of OpenGL, many of which have been ported to different languages, including several Java bindings of OpenGL. You'll find them at the end of each tutorial. Keep in mind that some of the stuff covered will not work exactly the same (e.g. some font stuff, etc.) as given in the tutorial but is ported correctly (and usually documented) in the source. I won't say which I use (to make you lean toward one binding or another), but I would suggest just giving a few a try before deciding on one. May cost you a few days dev time, but save you being stuck having learned a bad binding later on.
Luckless
Luckless
oh, right, forgot to post a thanks. Rated you all up but didn't say anything.

Been reading an online copy of OGL programing guide. And I must say, getting up around chapter 3 it become painful to keep going in one sitting. (and it isn't eyestrain painful) So, now to skip around it, finding interesting parts to read first.

That or I'm just going to skip reading that, and go for the straight docs. I'm not actually in a hurry to finish anything, so reinventing the wheel sounds fun! Screw efficiency, lets see just how many minutes it can take me to render a few untextured quads. Then I'll get back to you all to ask how much of a second it should be taking. :P
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
GentlemanHal
GentlemanHal
Hi,

Thanks for the rate up :)

Also you may want to take a look at the jMonkey Engine (jME) which is a scene graph api. It sits on top of any rendering api (currently only lwjgl) and generally does a lot of helpful things for you. Meaning you wouldn't actually need to learn OpenGL as you'd be working at a higher abstraction level.

Of course if you want to learn OpenGL for the sake of learning, jME wouldn't help you there :P but if just want to make games I'd check it out for sure.


- Chris
"More computing sins are committed in the name of efficiency than for any other single reason - including blind stupidity" - William Wulf "Any fool can write code that a computer can understand. Good programmers write code that a human can understand"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.