Any GUI library for LWJGL with OpenGl 3.2?

Started by Unsteady, August 18, 2013, 18:50:16

Previous topic - Next topic

Unsteady

Dear community,

I'm trying to make my own game using OpenGl version 3.2, but I need some library to make a GUI. All GUI libraries mentioned in LWJGL Wiki space (TWL, Nifty Gui, Gooei and Feng Gui) use OpenGL pipeline possibilities which are incompatible with 3.2 version. Is there any solution for OpenGl 3.2+ version? If there is no any existing library, maybe someone could explain in two words a concept how to create GUI using native OpenGl 3.2 functionality?


Cornix

What exactly do you want? Like windows, scrollbars, buttons and stuff like that?

Unsteady

Yes. I need windows, scrollbars, buttons and other stuff, but I don't have any idea how it can be implemented using OpenGl 3.2.

quew8

Well for the visual stuff (which is the only things OpenGL would do) you would have to put the visual data in a vbo. Each component would have a transform associated with it which in most cases would just be its position. For most visual changes (like buttons being depressed) I think changing the texture (either by binding a different texture or manipulating tex coords in shader) would be sufficient. For others you would need to have sub-components with their own transform. (Like in a slider - you have the rail and then the actual slider as a sub-component). Then you have container components that have a list of components drawn inside. As you go down the component tree you concatenate transforms together. Maybe best to implement your own matrix stack.

I recommend trying to model the library after a GUI library you already use - Swing or AWT or JavaFX.

Unsteady

Thank you for your answer.

Now I know a concept, next quest for me will be visual data representation in a VBO.

delt0r

Use compatibility mode/profile whatever its called with something like TWL. There is only one computer that doesn't support opengl 3.2+ comparability and that is a fairly old version of Mac OSX with an older card as well. All device manufactures have stated that they have no intention of ever dropping support for comparability profiles. Far too much still uses it. 
If you want a plot read a book and leave Hollywood out of it.

quew8

No offence, but if we don't innovate because older, slower methods still work, then whats the point? We might as well not bother learning OpenGL 3.2+ at all. 

delt0r

Its not slower and spending 6 months writing something you didn't need to it not the best way to spend your time.
If you want a plot read a book and leave Hollywood out of it.

Cornix

You could take the time and write it so others dont need to anymore.
If its good work, it can become the next big GUI library which does use OpenGL 3.2.
It has to start somewhere; sometimes you have to make the first step yourself.

quew8

@Cornix +32

And I meant slower as in more computationally expensive (or whatever the right word is) , which deprecated methods certainly are, rather than slower to program and implement.