Sign in to follow this  
EnlightenedOne

Helping Demystify JOGL

Recommended Posts

Hi there I am running a 64bit i7 machine with netbeans 64bit and im trying to use JOGL lets get to the issues with JOGL. JOGL has a OpenGL approved release that I think is a standard installed through the plugins menu. This was done using all those files that look like this net-java-nboglpack-glsleditor.nbm when you unpack them to be added. I can tell you im being told that my netbeans is using JOGL 1.1.1a with my ATI Radeon HD 4800 Series graphics card and that the little demonstration page in OpenGL settings works. Why do all the tutorials on the net seem so incoherent in the packages they use to run this stuff? The majority of them use imports from a base of net.jogl files wheras in this newer im assuming version import com.sun.opengl all the files are in there however the files dont all match up there are components in the net import some people have that I havent got an equivlent available for such as the object type "GLRenderer". Sounds pretty important. Can anyone link in any up to date tutorials for JOGL learners? Now we get onto the really crucial points that are halting me from starting to learn JOGL I cant compile it properly. I get a "Can't load IA 32-bit .dll on a AMD 64-bit platform" Im on an intel machine for starters. I havent found a 64bit version nor do I want a 64bit version of JOGL so that I can run it on most PC's but I cant find where to switch my compiler to a 32bit build selecting Application Windows (i586) in the new project menu doesn't seem to get me anywhere as I get the same compiling error. So I cant run anything I attempt to develop. Then back onto another important topic the JOGL.dll file required to run the java program that needs to be put with the programs exe to run. as a java program in byte code it makes alot of sense to me to embed the library statically into my exe to remove the requirement of it being installed into the correct place and so my lecturers dont have to install my applications through an installer rather than just clicking and going. Is this what everyone is doing when I download demonstrations of the power JOGL can provide in web demos? To sum up heres a list of my issues. *Theres multiple incoherent sdk's for it *It wont compile as a 32bit application when I have a 32bit JOGL.dll or at all for that matter. *The tutorials are all clashing in information I cant find any using the newer seeming model. *Theres a dll file that has to come with the installer for the program to run and I would rather just make the two files one. Im very keen learner I need to complete a sprite based networked application in two months and my lecturer has less knowledge of JOGL than I do I am dreading learning JOAL when im done getting this thing running :p why isnt there a repository of stuff like DirectX has for developing JOGL/JOAL applications although the plugins did it for me before I found them I attempted to add files to the Java versions I have on here without adding the lib references to the netbeans because nowhere has stated you need to add the include files. Thats the first thing they tell you in Direct X tutorials universally. Can anyone help me get this stuff running? are these issues common to JOGL learners? is JOGL still being developed or has it been scrapped? I have no idea what its community is doing. Finally why does the processor type seem to matter to JOGL at all? its a compiler that compiles all of its code to byte code additionally the processors operations are all standard to 64 and x86 machines anyway so this is a job for an OS to manage independently. Im sure Project Kenai is where the files I installed via came from but their download section is empty. I am confident an armada of Java loving JOGL fanatics are going to flame this thread as you do so please write out a detailed explanation answering one of these questions as you make your way to the door :p Many thanks for reading EnlightenedOne

Share this post


Link to post
Share on other sites
Hello there,

Concerning the tutorials for JOGL: if you are already experienced with OpenGL, working with jogl will not be hard, since it's API is pretty close to the actual native OpenGL calls (e.g. glColor3f()). So learning to work with jogl is mostly learning OpenGL.

Getting started with JOGL is not that hard either. The easiest way to get an OpenGL window up and running, is to create a GLCanvas object, add a GLEventListener to it and then add the canvas to a JFrame. The GLEventListener will be handling your typical OpenGL callback functions such as resize, init, display etc. So basically do something like this



// Create implementation of GLEventListener
public class Renderer implements GLEventListener {

// Implementation of GLEventListener Interface (e.g. display)
public void display(GLAutoDrawable drawable) {
// Get the gl2 profile
GL2 gl = drawable.getGL().getGL2();

// Display some points
gl.glBegin(GL_POINTS);
gl.glVertex3f( 2, 1, 1);
gl.glVertex3f( 1, 2, 1);
gl.glVertex3f( 1, 1, 2);
gl.glEnd();
}

public static void main(String[] args) {
// Create OpenGL canvas
GLCanvas canvas = new GLCanvas();
canvas.addGLEventListener( new Renderer() );

// Create frame and add canvas to it
JFrame frame = new JFrame();
frame.add( canvas );
}
}



Share this post


Link to post
Share on other sites
Quote:
Original post by EnlightenedOne
I am confident an armada of Java loving JOGL fanatics are going to flame this thread as you do so please write out a detailed explanation answering one of these questions as you make your way to the door :p

Sure thing. AMD and Intel both designed lines of 64-bit processors meant to supersede the i386 line and instruction set. AMD's design worked as an extension to the existing x86 instruction set, knownas AMD64. In contrast, Intel'sinstruction set -- IA64, also known as Itanium, was dramatically different from the x86 instruction set. This had the effect of *slam*

Share this post


Link to post
Share on other sites
Quote:
It has been scrapped. I suggest that you move along to LWJGL instead.


In what sense has JOGL been scrapped? I thought they were recently taken up in the Java specifications (JSR-231). Hence, using jogl cannot be a bad idea can it?

Share this post


Link to post
Share on other sites
Quote:
Original post by EnlightenedOne
Finally why does the processor type seem to matter to JOGL at all? its a compiler that compiles all of its code to byte code additionally the processors operations are all standard to 64 and x86 machines anyway so this is a job for an OS to manage independently.


JOGL contains the jogl.jar and some native libraries. The native libs are different for 32bit vs 64bit and must fit to the JRE/JDK being used. So if you are running your application with a 32bit JRE, then you also have to use the 32bit bit version of JOGL for you platform. For 64bit JRE you need 64bit JOGL. There are 32bit and 64bit JOGL versions for Windows as well as Linux.

Quote:
Original post by EnlightenedOne
Im sure Project Kenai is where the files I installed via came from but their download section is empty.


Looks like they are working on a version 2, which is not finished yet. But you can find all the version 1 releases on the original site:
https://jogl.dev.java.net/servlets/ProjectDocumentList?folderID=11509&expandFolder=11509&folderID=11509

Share this post


Link to post
Share on other sites
Quote:
Original post by SenjuDahr
Quote:
It has been scrapped. I suggest that you move along to LWJGL instead.


In what sense has JOGL been scrapped? I thought they were recently taken up in the Java specifications (JSR-231). Hence, using jogl cannot be a bad idea can it?

In the sense that Sun discontinued the project and let the developers go. It's also not hosting Jogl on Kenai any more so those files are almost certainly obsolete by now.

Just switch to LWJGL. It's more mature and has much more active development.

Share this post


Link to post
Share on other sites
Quote:

In the sense that Sun discontinued the project and let the developers go. It's also not hosting Jogl on Kenai any more so those files are almost certainly obsolete by now.

Just switch to LWJGL. It's more mature and has much more active development.


Thanks for pointing that out to me :-) I'll take a look at LWJGL then.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this