# 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 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 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 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.

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627668
• Total Posts
2978540
• ### Similar Content

• Both functions are available since 3.0, and I'm currently using glMapBuffer(), which works fine.
But, I was wondering if anyone has experienced advantage in using glMapBufferRange(), which allows to specify the range of the mapped buffer. Could this be only a safety measure or does it improve performance?
Note: I'm not asking about glBufferSubData()/glBufferData. Those two are irrelevant in this case.
• By xhcao
Before using void glBindImageTexture(    GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format), does need to make sure that texture is completeness.
• By cebugdev
hi guys,
are there any books, link online or any other resources that discusses on how to build special effects such as magic, lightning, etc. in OpenGL? i mean, yeah most of them are using particles but im looking for resources specifically on how to manipulate the particles to look like an effect that can be use for games,. i did fire particle before, and I want to learn how to do the other 'magic' as well.
Like are there one book or link(cant find in google) that atleast featured how to make different particle effects in OpenGL (or DirectX)? If there is no one stop shop for it, maybe ill just look for some tips on how to make a particle engine that is flexible enough to enable me to design different effects/magic
let me know if you guys have recommendations.
• By dud3
How do we rotate the camera around x axis 360 degrees, without having the strange effect as in my video below?
Mine behaves exactly the same way spherical coordinates would, I'm using euler angles.
Tried googling, but couldn't find a proper answer, guessing I don't know what exactly to google for, googled 'rotate 360 around x axis', got no proper answers.

References:
Code: https://pastebin.com/Hcshj3FQ
The video shows the difference between blender and my rotation:

• By Defend
I've had a Google around for this but haven't yet found some solid advice. There is a lot of "it depends", but I'm not sure on what.
My question is what's a good rule of thumb to follow when it comes to creating/using VBOs & VAOs? As in, when should I use multiple or when should I not? My understanding so far is that if I need a new VBO, then I need a new VAO. So when it comes to rendering multiple objects I can either:
* make lots of VAO/VBO pairs and flip through them to render different objects, or
* make one big VBO and jump around its memory to render different objects.
I also understand that if I need to render objects with different vertex attributes, then a new VAO is necessary in this case.
If that "it depends" really is quite variable, what's best for a beginner with OpenGL, assuming that better approaches can be learnt later with better understanding?

• 10
• 10
• 10
• 12
• 22