Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking for a GUI toolkit that is easy to use and cross-platform. Another major requirement of the GUI is that it should support zoom and pan. For example, I should be able to zoom in on a picture and enlarge buttons.
Something like this:
http://eaglemode.sourceforge.net/video.html
But it should have Windows support also (which to the best of my knowledge Eagle Mode doesn't have).
From what I understand, QT is a good UI and it can draw right on top of the OGL window. I think it resets the matrix before drawing the buttons. If I can prevent that reset, the GUI can be zoomed along with the rest of the items. Is there a simple hack to do just that?
Thanks,
This is doable in Qt 4.4 and above using the Qt Graphics View Framework. It makes it very easy to make these types of interfaces, since Widgets can now be placed on the scene (QGraphicsScene) using QGraphicsWidget and QGraphicsLayout.
The framework supports zooming, panning, rotating, etc - with animation.
Take a look at Piccolo2D, which has Java and .NET bindings.
It is the successor of Pad++, which was well ahead of its time:
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm currently developing an OpenGL application and I want to use Qt for the other stuff. I want to use OpenGL like I use it with GLFW and without Qt functions. Just normal OpenGL. I cant find any site which uses Qt like id like to. So I only want to use Qt for the Windows and creating context and so on, but use OpenGL for the rest.
Thanks for your time.
There is an old-school QOpenGLWidget that will create an OpenGL context. That will give a window with an area to draw on.
Other option is the Scene Graph - OpenGL Under QML - pretty much the same, but it also allows to have QML user interface (buttons, edits, etc.) above your OpenGL rendering.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I would like to create a window using open GL but i can't find any good tutorial, can anybody tell me one?
Once the window will be create, i want to insert a picture on it!
This isn't how openGL works (inserting pictures inside).
To draw a picture you will need to create a quad and then assign a texture to it.
For a tutorial, google Hello Triangle openGL then move from that point forward.
This question is aleready asked several times before. As MichaelCMS mentioned. This is not how OpenGL works. You can do this (creating a window and insert a picture) with Qt too.
See here, here or here.
Creating a window doesn't depend on OpenGL. You can use GLUT or the Qt Libarys to do this platform independent. There exist a lot of tutorials for this.
For a GLUT-tutorial, see here, here or here.
For a tutorial for Qt, see here. Qt offers a lot of own classes for a easier use of OpenGL too.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to find out what's the best way to display a custom design GUI for a windows application? (I wouldn't mind cross-platform compatibility but windows is enough for now ;) )
I tried using DirectX but the problem with DX is, that you are forced to either use textured quads or render shapes other than quads or triangles with a lot of vertices... I'd prefer NOT to use bitmaps due to the limited resolution. Also a problem with DirectX is, that it doesnt run on systems without a compatible graphics card...
I don't want to use any librarys like Qt or such... I want to do it by myself, I just don't know where to start... Basicly what I'd like to have as a result is something like the GUI of NI's Traktor... (picture below) I have noticed that Traktor runs basicly everywhere (so I think it does not rely on GPU). Any suggestions?
You could do all your drawing in WM_PAINT
Use BeginPaint
Create your object
SelectObject
Draw your stuff or what ever
Then DeleteObject
You can even make a colour Transparent
If you want to draw your GUI in a different shap
Use SetLayeredWindowAttributes set the colour that you want transparent
Also look up Custom Draw
There are alot of examples out there
If you want to stick with windows, you can use GDI.
I'd prefer NOT to use bitmaps due to the limited resolution.
You can always create bitmaps dynamically. There are lots of open source libraries to help with the drawing, or you can use GDI for this again.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Like the title says, I'm looking for a library that's platform-agnostic and lightweight, for the purpose of displaying buttons, slider bars, check boxes, etc. in OpenGL. Ideally, something that is not directly coupled with OpenGL is best (ie. so that I may replace the rendering with DirectX if need be).
My 'ideal' library would have an event system that supports callbacks or something similar. This is a nice-to-have, but not absolutely required.
I looked into Qt and wxWidgets and both seem very heavy. CEGUI looks like a mess of code. Most other libraries I seen are GLUT based.
There's Dear IMGUI
https://github.com/ocornut/imgui
It's completely graphics API agnostic. It just builds vertices. Its up to you to render them.
There's also nuklear inspired by Dear ImGUI.
You might want to have a look at a game engine such as Irrlicht which provides OpenGL, DirectX and Software renderers and supports a 2D GUI System with Buttons, Lists, Edit boxes. See the feature page to learn more about its capabilities and the user interface sample to try this specific UI feature.
Irrlicht is open source and works on many platforms. From the feature page it supports:
Windows 98, ME, NT 4, 2000, XP, XP64, Vista, CE
Linux
OSX
Sun Solaris/SPARC
All platforms using SDL
Neither wxWidgets nor Qt draw in OpenGL; they don't use OpenGL rendering commands to draw. They allow you to create OpenGL windows, but the regular GUI controls (buttons, lists, etc) are not drawing through OpenGL. They're drawn through the native drawing mechanism of your platform of choice.
You are generally not going to find very many standalone GUI libraries that actually do their rendering in OpenGL. The only one I know of is CeGUI, which fits all of your requirements but you dismissed as being "a mess of code." Everything else is generally going to be "heavyweight", because it's part of a game engine.
Now, if you're not looking for something that actually draws using OpenGL commands, but is simply something that you can use alongside an OpenGL window, then things open up somewhat. However, your dismissal of wxWidgets as being "very heavy" is disconcerting, because GUI libraries aren't really going to get much lighter weight than that. A good GUI system requires a lot of stuff.
The smallest cross-platform GUI library that supports making an OpenGL window is probably FLTK. And even that's pretty big.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have a complex drawing on a Gtk DrawingArea widget and I wish to provide the user with a way to select a rectangle on it to expand for a closer view. I have managed to get the necessary mouse button events sorted out so that the rectangle can be selected, but it would be desirable to have the actual rectangle drawn on the display, moving around along with the mouse. I need to know how one does this without disturbing the underlying drawing (i.e. so I can erase the temporary rectangle as it changes size and shape without having to redraw the underlying picture).
Could someone tell me the correct name for this effect (so that I can google it) or does anyone know of an example, or a keyword to search the Gtk documentation?
Thank you.
You are looking for the Rubber Band technique.