platformQT

Expanding and utilizing the engine via C++.
  • 1
  • 2
14 posts Page 1 of 2
elfprince13
Posts: 24
Joined: Mon Mar 09, 2015 3:41 am
 
by elfprince13 » Tue Mar 10, 2015 7:18 am
It's unification day, time to find your neighborhood alliance-friendly bar ;)

I just created a branch and deleted all of the existing platform* implementations, with the ambitious goal of creating a unified platform layer on top of Qt. https://github.com/elfprince13/Torque3D

I'll probably be taking it slow for now as I have a lot of other stuff going on, but this seems like a good experiment, and simplifying the codebase can only be a good thing.
buckmaster
DEVGRU
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Tue Mar 10, 2015 11:37 am
Oh wow. Ambition! I have to say my brief experience with Qt wasn't thrilling, but I'm interested to see where this goes!
Timmy
Posts: 378
Joined: Thu Feb 05, 2015 3:20 am
  by Timmy » Tue Mar 10, 2015 1:00 pm
Having used Qt with a former project (GUI based OpenGL app), i'm a massive fan of Qt (IMHO it's the best cross platform GUI API bar none). I am not 100% sure using it for T3D windowing/input is a great idea though (a world editor written in Qt would be awesome). Anyways not trying to knock your work, best of luck with it :mrgreen:
elfprince13
Posts: 24
Joined: Mon Mar 09, 2015 3:41 am
 
by elfprince13 » Tue Mar 10, 2015 11:13 pm
The thing is - it's not just a sweet cross-platform GUI library, it also handles threading / sockets / file-system abstraction. Switching all of that stuff over to use Qt is a huge reduction in the number of code paths to be maintained, and drastically reduces the risk of individual platforms falling unsupported again. Using SDL or whatever else as a window manager should still be fine, but there's really no reason in the modern era for us to use a homebrewed wrapper around sockets or mutexes, for example.
buckmaster
DEVGRU
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Tue Mar 10, 2015 11:47 pm
Definitely, that seems very reasonable. In that light, how does Qt differ from something like Boost? I'm not extremely familiar with the C++ ecosystem at this level :/. Something I didn't like about Qt was how it's not a library, but brings along a whole baggage of additional compile steps and so on - though to be fair CMake isn't exactly a walk in the park either.
elfprince13
Posts: 24
Joined: Mon Mar 09, 2015 3:41 am
 
by elfprince13 » Tue Mar 10, 2015 11:53 pm
The ridiculous amount of metaprogramming in boost makes compiling take way too long. So far I haven't had to add any additional compile steps for Qt - just download it and link. It even seems to play nicely with CMake. Right now I'm basically just scrolling through the linking errors to find what platform functions are missing, and adding Qt based implementations one at a time. Anyone else who thinks this is interesting is welcome to join in. Right now it looks like there's about 150ish functions to go. I expect most of this stuff will have straightforward mappings into Qt, so if we knock them off a few at a time we should be in good shape.
Hutch
Posts: 42
Joined: Tue Feb 03, 2015 11:12 pm
by Hutch » Wed Mar 11, 2015 6:52 am
yall do realize SDL2 has threading and stuff right? ...

Also, not to start a licensing war, but, I do have to mention that QT is under GPL/LGPL. :[ (Can't use lgpl code on ios if you guys ever decide to target it, as you have to static link on ios)
elfprince13
Posts: 24
Joined: Mon Mar 09, 2015 3:41 am
 
by elfprince13 » Wed Mar 11, 2015 7:28 am
yall do realize SDL2 has threading and stuff right? ...
Wait, really? When did it get all the goodies? Last time I looked at using SDL it was still only input/sound/graphics context.
Also, not to start a licensing war, but, I do have to mention that QT is under GPL/LGPL. :[ (Can't use lgpl code on ios if you guys ever decide to target it, as you have to static link on ios)
This is a fair point, though those of us who are planning on developing open source stuff don't care, and those of us who aren't can probably afford to pay for a commercial license for Qt (which is available).
JeffR
DEVGRU
Posts: 954
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Thu Mar 12, 2015 7:38 pm
I've barely done anything with either SDL or Qt.

Can anyone throw down a pro/con for each for the less-than-informed on the subject? All this talk has made me curious ;)
elfprince13
Posts: 24
Joined: Mon Mar 09, 2015 3:41 am
 
by elfprince13 » Thu Mar 12, 2015 9:19 pm
I'm apparently behind the times on SDL, but QT has:
  • Immense cross-platform support
  • GPL, LGPL, and commercial licensing options
  • Support for networking, file system abstractions, threading, native UI development (including OpenGL components, and D3D, afaik), a string class with good support for different encodings. Also has support for multimedia using native codec libraries, and WebKit.
  • The libraries are well modularized, so you don't have to link the whole thing to use some of them - e.g. you can use all of the low-level goodies for your dedicated server without needing to take the GUI stuff along for the ride
  • 1
  • 2
14 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 3 guests