Creating a standalone application

Hi.

I am required for a graphics course to use openGL, however the lecturer is familiar with the C bindings / api / library et al. I would very much like to do my project in Java (as C is the spawn of Satan), however I have a few questions before I approach him with it.

My first is the most important, without a yes to this I cant continue.

Is it possible to create my program, using JOGL, without the assessor having to install any extra libraries etc.?

To expand on that, he requires a standalone executable. He has (I assume) the libraries required to run openGL from Visual Studio in C, but If i were to give him a file (perhaps a .jar) could I include all the libraries etc he would require in one place so that he wouldn’t have to install anything extra, and he could just run my program.

Apparently the bindings are very similar to openGL in C, and as such, does it still use an OO Approach? the C code I have looked at regarding openGL looks far more confusing that it needs to be. I was wondering if there will still be individual classes for each item drawn etc.

Basically my two main concerns are A) I need the lecturer to have ne excuses to give me as to why he cant accept it in Java (He does program in Java anyway) and B) Is it significantly different to warrant the extra effort using JOGL and creating an application that he can assess.

Thank you for your time.

Mitch.

P.S. the brief says I require the source code and “an executable copy of the program that will run in situ from the disk”, so assuming I can fulfil these criteria he will hopefully have nothing to complain about.

You are probably going to have to bite the bullet and write it in c.

I did a course in graphics at my university (cs4751), and the first thing I noticed is that everything needs to work. For you, for the marker, and for the prof. Whatever he says is the default for their system is probably going to be what you need to use in order for all 3 parties to function. I would give you 20:1 odds that your department does not have jogl installed, and wont install it if you ask nicely.

As for the standalone thing, it is possible to create a ‘standalone’ jar executable, or a jnlp web launch thing, but both of these require that you have jogl installed to run them. So I would think that you are stuck with c.

C is where I learned opengl, and let me tell you, if you prof gives you a decent template… c is actually much easier to code IMO. The c opengl implementation using glut is as simple as you could possibly get in terms of an opengl app. As long as you’re given a makefile and the correct libraries you should be alright.

:frowning: Good job I have been whilst I was waiting…

Of course, and I’m not scared of the hard work. I would like to be as proficcient at as many languages as possible, but I am on a very reduced timeframe and am familiar with Java, and as such would save me the day its going to take me to learn C (This is due Tuesday). He wont install jogl, i knew this, i was just wondering if the libraries could be included in a jar or equiv so he didnt have to install them.

As they require jogl to be installed seperately it looks like I’m stuck with C. The template we have been given is impossible to understand, and has absolutely no comments bar the introduction (author etc). I’m sure the code is sound, but you can imagine someone who hasn’t looked at openGL before crapping themselves. I think half of my problem is Java spoonfeeds you a little, which is great, but I cant find any API docs (Javadocs style) and the visual studio IDE is far from the releases like netbeans eclipse.

Anyway, thanks for your comment. Its taken me four hours but I have the beginnings of the grasping os how to warp a sphere, so, I guess just plodding along.

Cheers again!

Mitch.

You can give them a ZIP file that has everything in one folder. JOGL doesn’t need to be “installed”, you can included it with your code.

Include a batch file or shell script to launch the app with the appropriate classpath and native library path set.

But of course you need to ask the prof about it… if he is expecting a single .exe he may not bother to try anything else.