some startup questions about Jogl

well im just asking if there are differences (maybe some neat wrappers) in jogl than in ogl itself… and if yes could u give me some references (tutorials) or whatever to read…
well if not ill see if i can find the std ogl solutions while reading all the ogl stuff (redbook and whatever)

well uhm… have to start reading :wink:

There are some extensions to opengl that allows you to use non pow 2 textures. But if you want others to run your game it is wise to stick to pow 2 for now. As not all card/driver combos has those extensions yet.

You can only call OpenGL functions from one thread. I don’t use JOGL so I’m not completely sure how things stick together. There is probably an easier way than using the Animator and GLEventListener.

well yeah but one problem i will shurely get is if i draw in a texture (a quadrat) and draw this texture onto the screen it wont be a quadrat anymore it would be a rect… :confused:
but thats a general ogl problem i think so there should be an answer out there… somewere :wink:

Well, if I’ve understood your question, apart from the windowing stuff that each platform handles a bit differently (Java, Win32, X) there isn’t much difference. You should pay attention to the fact that you must be in the correct thread to run gl code. I mean, using C I used to put my mouse handling routines (that used gl functions) in the mouse callback. That’s not possible with JOGL so I just raise a flag and handle them inside display, before anything else.
Last thing, I just find a nuissance that we have to double the gl. Can’t they remove it from the method calls? So we write:
gl.Enable(GL.DEPTH_TEST);
instead of:
gl.glEnable(GL.GL_DEPTH_TEST);

@SDV
just use correct texture coordinates and viewport ratio while drawing your textures to the screen. http://nehe.gamedev.net/ is a great resource for that kind of stuff.

Basically you can store a 1024x768 image in a 1024x1024 texture, ignoring the lower 200+ lines. This would waste some texture memory, but if this is a problem depends on your application.

If you plan to use textures for model texturing you will do a lot of image-customizing anyway (like slicing your texture to save context-switches), so it will be no extra effort to store the textures in pow2 right away.

@dvm
use static imports and don’t call the instance gl.

current.glEnable(DEPTH_TEST)

looks much better :wink:

SDV, take a look at a recent discussion about non-pow-2 textures:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1110639195