Couple questions

How do I get out of the unit coordinate system where 1 is the side of the screen?

How do I use glVertexPointer? I use

    buffer = DoubleBuffer.wrap(array);
    gl.glVertexPointer(2,GL.GL_DOUBLE, 0, buffer);

But it says Argument “ptr” was not a direct buffer…

Also, all the methods don’t have any documentation (from netbeans). How can I get netbeans to display documentation and not label everything as arg0, arg1, arg2, etc. instead of meaningful names.

@question 1:
I’m not sure what you mean. Generally coordinate systems are tied into what projection matrix that you use. For purposes of display 2D graphics, an ortho projection would give you that control (but any 3d shapes would look oddly distorted).

@question 2:
No offense intended, but you seem to be a beginner with regards to open gl. Vertex pointers can be a little complicated, and I would recommend getting the hang of drawing things other ways first (such as glVertex/glNormal, etc. or using display lists). If you really want to use glVertexPointer, read http://www.java-gaming.org/index.php/topic,18710.0.html as it shows how to use them (ignore the parts about binding buffers and substitute the actual nio buffer instead of the id).

@question 3 (or 2B):
jogl requires that all buffers be direct and native ordered. Direct buffers are actual blocks of memory (like a C array). When you’re using DoubleBuffer.wrap(array) it creates an array-backed buffer, which isn’t direct. What you want to do instead is create buffers using jogl’s BufferUtil class (with methods like newFloatBuffer(size)). You would then need to fill them on your own (performance would be better if you created those buffers once and used them to store your data instead of using arrays and wrapping them in buffers for each draw call).

HTH

This depends on how you set up your project. In a normal netbeans project, you use the Library Manager (Tools->Library) to attach a javadoc archive to your jogl library. But you could also just install the opengl pack to have the jogl examples and documentation available (you should remove all jogl/gluegen libraries from netbeans before doing it).

Cool. I got everything working with your suggestions, thanks for the help. And yes I am very new to this (and graphics programming too), so I’m reading over the openGL book.

Update: Got javadoc working, but every method says “Interface to C language function” without any description. Is there any javadoc that has this?

No there isn’t. Since the whole opengl binding is more or less packed in the GL interface, the javadoc would be way too massive. You can open the description in your system browser by clicking the green webpage icon on top of the doc popup. You can then see, that some gl functions are linked to the “official” C GL documentation pages. Unfortunately most of documentation for the advanced functionality is burried in some extension docs, which are not linked at the moment.