Sign in to follow this  
Antony52

OpenGL A dilemma.

Recommended Posts

Ok I have to present a dissertation subject and I am thinking in building an in-game user interface. No I dont want to know how to build it and yes I am going to use OpenGL and yes I know how to use it. The problem is with what language. I know C and that is what I use all this time. Lately though my prof told me whether I would want to have a look at Java since JOGL exists or C# maybe. No I do not care which is the best however I would like to know which has the best implementation of OGL and is easier to build a prototype. Yeah yeah you are going to say stick with C but hey if ANYONE used the Java or C# approach give me an opinion on his/her quest. Please dont anyone post something like,"hey man this is OOP versus procedural" or "hey do you know java or any OOP language". My answer is yes I know OOP and used java but for a different non 3d related matter. Finally, the same prof suggested whether I would be willing instead of going that low level to use a 3d engine. However the fact remains that I should choose the language. So serious opinions please.

Share this post


Link to post
Share on other sites
I did a subject on Java3D while at uni - that was about 2 years ago now so they may have updated it but from what I remember it was all screengraph based. To get something on screen you create it then add it to the tree, and you can also add things like transorms or rotations and its ver heirachical. Once you get your head around the tree structures its a pretty good way todo things and I had no problems with it. I did have problems with speed (low framerates and the like) but I worked on an old computer and i'm sure they've updated the API since then so it might not be a problem anymore.

As you say your writing an in-game user interface then I would suggest useing something like SDL, there's no need to use 3D stuff at all for that. If you really want it though its very simple to get OpenGL working with SDL which is what I personally prefer to anything else (Java3D, DirectX etc). Its both easy to setup and crossplatoform, and for a GUI putting OpenGL into Otho mode and then rending quads to the screen is pretty simple, with the added bonus you can change backto perspective and have all the 3D content you like. I'm sure you can 2D stuff it in Java3D too but i never did. The tree structure isn't designed for gui's, its designed for enviroments and the like so from my limited POV its not really suited to gui's. As for c# never used it, but apparently its very good for win32 apps so it might be usefull. SDL is also great for windows and events and its cross platform so its my lib of choice but if your not after cross platform then something like c# is probably very tempting.

If your at all planning to extend your work to a full game or tech demo's etc its definatly worth staying with c/c++ because when you need the speed it will be there. However Java and C# are quit decent options for anything but really big stuff, so if it will make for faster development then go for it! As for Java vs C# from what I know they're almost identical except for a few function/lib names so its really upto you!

yay for my 2c

Share this post


Link to post
Share on other sites
When I tried using OpenGL with C#, I found that Java was more mature specifically for the use of OpenGL. That may have changed now; I haven't kept up. My recommendation: If you want to use C# (on Windows) go with Managed DirectX instead. If you want to use OpenGL, go with Java.

Share this post


Link to post
Share on other sites
Yep cross platform is a must have. That is why I use OGL the first place. SDL, hmm havent thought about it although I know it. Java is good with Jogl although we must all admit that documentation is lacking. As you said it is easy but hey i want to be marketable;) for the future right? So I thought C is ok but Java is a different thing. The thing is that I want to take this a step further. What I mean is this: games are great hey it is what started me to OGL anyway, however what if my user interface that I build based on OGL can be used for other apps apart from games. So to make my point I want my app to be marketable versatile if I can put it in such a way. So what combination will give me that, and stay cross platform always.

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