Pages: 1
  Print  
Author Topic: Embedding Enigma into GUI  (Read 2495 times)
Offline (Unknown gender) Mangolion
Posted on: November 24, 2014, 12:23:04 PM
Member
Joined: Sep 2014
Posts: 19

View Profile Email
Is there anyway I can display Enigma inside a GUI component such as those in QT?
Logged
Offline (Unknown gender) TheExDeus
Reply #1 Posted on: November 24, 2014, 02:22:50 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Not easily no. It would be faster to embed QT in ENIGMA.
Logged
Offline (Unknown gender) Mangolion
Reply #2 Posted on: November 24, 2014, 11:33:05 PM
Member
Joined: Sep 2014
Posts: 19

View Profile Email
Not easily no. It would be faster to embed QT in ENIGMA.

Is that sarcasm or suggestion?
Logged
Offline (Unknown gender) lonewolff
Reply #3 Posted on: November 24, 2014, 11:46:12 PM
"Guest"


Email
Who knows?  :D
Logged
Offline (Male) Goombert
Reply #4 Posted on: November 25, 2014, 10:25:10 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
Quote from: Mangolian
Is 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.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) lonewolff
Reply #5 Posted on: November 25, 2014, 03:38:13 PM
"Guest"


Email
Just do that  :o   :D
Logged
Offline (Unknown gender) Mangolion
Reply #6 Posted on: November 25, 2014, 09:54:11 PM
Member
Joined: Sep 2014
Posts: 19

View Profile Email
what about wxWidget?
Logged
Offline (Male) Josh @ Dreamland
Reply #7 Posted on: November 26, 2014, 12:44:05 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Goombert
Reply #8 Posted on: November 26, 2014, 06:06:21 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
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.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) DaSpirit
Reply #9 Posted on: November 26, 2014, 08:56:11 AM

Member
Location: New York City
Joined: Mar 2013
Posts: 124

View Profile
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.
Logged
Pages: 1
  Print