a) It's the natural way to do it. You can copy/paste existing C/C++ code and it will just work (with static imports). All 3 bindings in LWJGL work like this (AL/GL/CL).

b) Context management is explicit with OpenCL. With OpenGL, whenever you call a static LWJGL method it will run on the current context of the current thread. So, there's never a need to pass instances around.

i am thinking of switching to LWJGL and have looked at some of the examples and i'm wondering, why does it use static methods? there's nothing similiar to a glautodrawable there. what the heck?

A lot of what JOGL added to it's 'OpenGL binding' has nothing to do with OpenGL at all, and makes little sense in procedural programming (as opposed to object oriented programming). When you look at C code, there are no abstraction layers, interfaces, threads... everything happens in your main-loop.

With LWJGL you can do exactly the same thing in Java... the way it was meant to be.

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

I've always thought Jogl should have been implemented in two parts - the raw opengl access layer (which is basically what LWJGL does) with static functions and then the jogl-specific object layer (GLEventListener et al) layered on top of that. The fact that jogl always shoved this completely made up API down your throat has always been one of my major gripes.

Then you get newcomers who start with Jogl and think that's the only way to do it and that they 'know' opengl, when really they don't. It's almost straight out of MS's embrace-extend-extinguish tactics book.

P.S. how would i load a texture from a java Graphics2D, image, or BufferedImage?my programs will handle textures by combining them into one big giant megatexture in java2d and then loading it into opengl.

P.S. how would i load a texture from a java Graphics2D, image, or BufferedImage?my programs will handle textures by combining them into one big giant megatexture in java2d and then loading it into opengl.

just curious. why are you loading your textures into one megatexture? is it for performance?

If you really want to do that sort of thing, maybe LWJGL isn't for you, you could instead have a look at Slick2D, it basically has a very similar api to Java2D and has all the advatages of using LWJGL for 2d games.

0. you said 2D games. i'm eventually gonna make a 3d fps1.my game's just gonna put everything into one giant vertex array, or when i figure out how to do one, VBO. a megatexture is the best way of having all the textures available2. did you notice i started my points off with 0 instead of 1?

Slick-utils will work for texture loading for 2d or 3d, but you probably don't want Slick2D - instead you might want to look at Ardor 3d ( http://ardor3d.com/ ) to stop you having to rewrite a whole 3d renderer yourself (unless that's what you really want of course. )

Slick-utils will work for texture loading for 2d or 3d, but you probably don't want Slick2D - instead you might want to look at Ardor 3d ( http://ardor3d.com/ ) to stop you having to rewrite a whole 3d renderer yourself (unless that's what you really want of course. )

Ardor3D is an excellent choice and has a proper support of both OpenGL bindings so that you can use the one you find the most reliable without using System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL","true");

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org