OPENGL User Interface Programming [closed]
I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen:
- openGL (I need 3D, blending, textures etc)
- wx/pywx - windowing, dialogs etc.
The last component - WX - raises the question. I can put together a very nice looking app (the prototypes look slick) - but when I need to interact with the user to ask questions, get input, I have to use WX. It makes the app look inconsistent to have traditional UI with traditional dialogs and combos and text entry on top of a full screen 3D app with blending, smooth motion, textures etc.
Has anyone developed a GUI using OpenGL and python? Can you share with me the toolkits and/or tricks you used? I need combos, text entry, buttons, radios, option buttons, tree view.
There are some toolkits out there, but they are either incomplete or old and unmaintained. A great example is pyUI (http://pyui.sourceforge.net/) - looks slick but untouched for years.
Asked by: Chester492 | Posted: 28-01-2022
This is not an answer, more of a plea: Please don't do that.
Your reimplemented widgets will lack all sorts of functionality that users will miss. Will your text-entry boxes support drag'n'drop? Copy/paste? Right-to-left scripts? Drag-select? Double-click-select? Will all these mechanisms follow the native conventions of each platform you support?
With Wx your widgets might look inconsistant with the app, but at least they'll look consistant with the OS which is just as important. And more importantly, they'll do what users expect.
(edit) Three posts, and -3 points? Screw this den of karma-whores. Original poster: I have implemented a basic set of widgets in OpenGL (for a game UI) and it was an endless nightmare of a job.Answered by: Lucas668 | Posted: 01-03-2022
In the latest releases of QT you can draw widgets into your OpenGL context, if you really would like to do something like that. Otherwise there is CEGui that is used in some game engines.
Implementing GUI Widgets yourself unless you want to edify yourself is a waste of your time, unless you would be satisfied with the most rudimentary of looks and functionality.Answered by: Hailey205 | Posted: 01-03-2022
Python + Qt + OpenGL - I surely believe any application can be written faster and better using python. QT4 is cross-platform, beautifull, implements everything you need from widgets (acessibility, etc...), and...it integrates with OpenGL. That means, you can simply have a widget that is a viewport to openGL stuff you render in your code.
Another 3D capable solution that would cover most things, but not so nioce on user interface is to extend Blender3D with a python script. It has the 3d capabilities and rendering , you script it in python all of the same, and it would be cross platform - and you get higher level tools for woriking with the 3D things than openGL alone. There are obvious drawbacks, mainly from the UI standpoint when compared with PyQT but it could be done.Answered by: Melissa135 | Posted: 01-03-2022
You might want to look at Clutter, it looks pretty cool. I haven't used it yet but I intend to in an upcoming personal project.Answered by: Michelle293 | Posted: 01-03-2022
Try Qt instead of wx.
QT is cross platform, and you can style things alot using CSS. It's extremely well documented and has excellent python bindings. In point of fact, I use the C++ documentation and not the PyQT documentation.Answered by: Carlos979 | Posted: 01-03-2022
Both wx and QT do an excellent job of creating an application that matches the OS look and feel. It is also possible to implment all the widgets yourself directly in openg, this slashdot post lists some of the sets available
http://ask.slashdot.org/askslashdot/02/12/24/1813219.shtml?tid=156 fox is probably the most developed but looks like windows on all platforms.Answered by: Audrey531 | Posted: 01-03-2022
Blender is the only app I know of with a GUI written fully in OpenGL... the only problem is it's in C++.
I'm a Python developer as well, but I'm just getting into using OGL
I honestly don't think there are any toolkits to develop a GUI in OGL...
the Blender developers are giving me runaround documentation instead of direct help... but I'll let you know what I figure out ;)
EDIT: here's a bit of documentation on PyOpenGL's functions: http://pyopengl.sourceforge.net/documentation/manual/reference-GLUT.htmlAnswered by: Fiona969 | Posted: 01-03-2022
"cegui" is a good choise there is also a gui editor called "ceed" to generate the layout xml files. cegui also has python bindings and its well documented and used in many game enginesAnswered by: Wilson572 | Posted: 01-03-2022
I believe I have found your answer ;)
I havn't yet tried it, but it seems quite promising. (I'll edit this if it doesn't work)
it uses Tk, PMW, and WX...
(not quite what I want)
you can give the CVS download a try...
(there's no released packages, but the CVS runs)
user interface - questions re: current state of GUI programming with Python
I recently did some work modifying a Python gui app that was using wxPython widgets. I've experimented with Python in fits and starts over last six or seven years, but this was the first time I did any work with a gui. I was pretty disappointed at what seems to be the current state of gui programming with Python. I like the Python language itself a lot, it's a fun change from the Delphi/ObjectPascal programming I'm used...
java - Programming a color by numbers type interface
I am a Fine Arts major trying to program an applet that viewers can use when they come to the gallery for my senior show. I am trying to program a color by numbers type paint/fill program based on images I create for my thesis. I was thinking that there would be a couple of images which the user gets to select in the beginning, and then they pick a color, and then select a shape on the screen, click, and my image g...
user interface - Python GUI Programming Using Tkinter
So I am creating a game, and now I have decided to add a GUI. The GUI code is shown as follows: master = Tk() master.wm_title("Main Menu") a = Button.grid(master, text = "DOMINATE!", command = difficulty) a.grid(row = 0, column = 0) a.pack() mainloop() b = Button.grid(master, text = "Patch Notes", command = changelog) b.grid(row = 0, column = 1) b.pack() mainloop() c = Button.grid(master, text = "Credits...
Python interface for R Programming Language
This question already has answers here:
django - How interface ( Object Oriented Programming concept) works in Python ? Also Please provide me some suitable example
Closed. This question needs to be more focused. It ...
user interface - GUI programming using Tkinter Python
I have a Tkinter GUI having 2 entry fields, 2 buttons ( initialization of these not shown in code). There is one more button (initialized in code) which performs the main task of performing change detection on two images. Also there is a progress bar. Now, when the task of change detection has been completed, I want to display the 4 images(pre, post, aligned, chng) returned by wave.changedetection() in...
python - What's a good resource for starting to write a programming language, that's not context free?
Closed. This question does not meet Stack Overflow guid...
python - Which is the most useful Mercurial hook for programming in a loosely connected team?
I recently discovered the notify extension in Mercurial which allows me quickly send out emails whenever I push changes, but I'm pretty sure I'm still missing out on a lot of functionality which could make my life a lot easier. notify-extension: https://www.mercurial-scm.org/wiki/NotifyExtension Which Me...
Socket programming for mobile phones in Python
I've written code for communication between my phone and comp thru TCP sockets. When I type out the code line by line in the interactive console it works fine. However, when i try running the script directly through filebrowser.py it just wont work. I'm using Nokia N95. Is there anyway I can run this script directly without using filebrowser.py?
functional programming - Pattern matching of lists in Python
I want to do some pattern matching on lists in Python. For example, in Haskell, I can do something like the following: fun (head : rest) = ... So when I pass in a list, head will be the first element, and rest will be the trailing elements. Likewise, in Python, I can automatically unpack tuples: (var1, var2) = func_that_returns_a_tuple()
python - Convert CVS/SVN to a Programming Snippets Site
I use cvs to maintain all my python snippets, notes, c, c++ code. As the hosting provider provides a public web- server also, I was thinking that I should convert the cvs automatically to a programming snippets website. cvsweb is not what I mean. doxygen ...
What are the benefits of using Python for web programming?
What makes Python stand out for use in web development? What are some examples of highly successful uses of Python on the web?
functional programming - Modify bound variables of a closure in Python
Is there any way to modify the bound value of one of the variables inside a closure? Look at the example to understand it better. def foo(): var_a = 2 var_b = 3 def _closure(x): return var_a + var_b + x return _closure localClosure = foo() # Local closure is now "return 2 + 3 + x" a = localClosure(1) # 2 + 3 + 1 == 6 # DO SOME MAGIC HERE TO TURN "var_a" of the closure into 0 # ...
Interested in Collective Programming for the web -- Ruby or Python or PHP?
Closed. This question is opinion-based. It is not c...
network programming - How do you determine if an IP address is private, in Python?
In Python, what is the best way to determine if an IP address (e.g., '127.0.0.1' or '10.98.76.6') is on a private network? The code does not sound difficult to write. But there may be more edge cases than are immediately apparent, and there's IPv6 support to consider, etc. Is there an existing library that does it? ...
c# - ORM (object relational manager) solution with multiple programming language support
Is there a good ORM (object relational manager) solution that can use the same database from C++, C#, Python? It could also be multiple solutions, e.g. one per language, as long as they can can access the same database and use the same schema. Multi platform support is also needed. Clarification: The idea is to have one database and access this from software written in several different pr...
Still can't find your answer? Check out these communities...
PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python