Pages: 1
Author Topic: Embedding Enigma into GUI  (42,578 Views)
Offline (Unknown gender) Mangolion

Member
Joined: Sep 2014
Posts: 19
View profile
Posted on: November 24, 2014, 05:23:04 PM
Is there anyway I can display Enigma inside a GUI component such as those in QT?
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #1 Posted on: November 24, 2014, 07:22:50 PM
Not easily no. It would be faster to embed QT in ENIGMA.
Offline (Unknown gender) Mangolion

Member
Joined: Sep 2014
Posts: 19
View profile
Reply #2 Posted on: November 25, 2014, 04:33:05 AM
Quote from: TheExDeus on November 24, 2014, 07:22:50 PM
Not easily no. It would be faster to embed QT in ENIGMA.

Is that sarcasm or suggestion?
Offline (Unknown gender) lonewolff
Guest


Email
Reply #3 Posted on: November 25, 2014, 04:46:12 AM
Who knows?  :D
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #4 Posted on: November 25, 2014, 03:25:10 PM
Quote from: MangolianIs that sarcasm or suggestion?
No he is serious, you'd just have to link the Qt libraries, create a window system and a widget system powered by Qt. You'd probably want to just go ahead and make a Qt graphics system as well since it uses ANGLE to make its OpenGL work on outdated hardware like Studio does. But not all of that is necessary you could just attach the current graphics systems to a Qt window and widget system, it all depends on what you want to do. But a full blown Qt port of ENIGMA would actually be pretty easy, it wouldn't be much to port our GL code at all.
Offline (Unknown gender) lonewolff
Guest


Email
Reply #5 Posted on: November 25, 2014, 08:38:13 PM
Just do that  :o   :D
Offline (Unknown gender) Mangolion

Member
Joined: Sep 2014
Posts: 19
View profile
Reply #6 Posted on: November 26, 2014, 02:54:11 AM
what about wxWidget?
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #7 Posted on: November 26, 2014, 05:44:05 AM
Creating a Qt window system wouldn't be that hard. You could tweak the code to allow you to specify an existing Qt widget to contain the GL context. You'd create the GL context in a new Bridges directory, Qt-OpenGL. There are plenty of existing systems to use as reference.

Same goes for wx.
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #8 Posted on: November 26, 2014, 11:06:21 AM
Yes but my recommendation would be to just make a QtGL powered graphics system by porting GL3, it wouldn't be hard either, 95% of the code would stay exactly the same and it would work on older computers where ANGLE supplements Direct3D9 as well.
Offline (Unknown gender) DaSpirit

Member
Joined: Apr 2013
Posts: 124
View profile
Reply #9 Posted on: November 26, 2014, 01:56:11 PM
I can say that combining ENIGMA and Qt would not be easy. However, I recommend you don't do this right now, because the OpenGL classes in Qt are on their way to being deprecated. A viable alternative is going to appear in Qt 5.4, which is currently in beta.

Now, the reason it would not be easy is because of the way Qt makes you call OpenGL functions. In Qt, you cannot call any OpenGL function globally. The OpenGL functions are provided in a class instance (they chose this design because they automate switching the context themselves). You'd have to work around that. However, I'm not sure if there are any other easier ways. I'm not familiar with the new classes they're introducing.
Pages: 1