Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Easy GUI for 3D engine


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
15 replies to this topic

#1 kolarz3   Members   -  Reputation: 164

Like
1Likes
Like

Posted 24 June 2013 - 02:18 AM

I search easy GUI library for DirectX (vs2010). I looking for wxwidgets and qt but they seem complexity. Do you known some other ?



Sponsor:

#2 BitMaster   Crossbones+   -  Reputation: 4222

Like
2Likes
Like

Posted 24 June 2013 - 02:40 AM

There is CEGUI (lots of features but also more on the complex side and a bit dependency heavy) and libRocket (rather lightweight and simple but the project seems to have stalled for a long time now - what is there seems to be working though).
 
If by "GUI library" you mean basic window management and context creation though, I would suggest SFML or GLFW.

 

Edit: nevermind, missed the DirectX part.


Edited by BitMaster, 24 June 2013 - 02:42 AM.


#3 Karsten_   Members   -  Reputation: 1633

Like
1Likes
Like

Posted 24 June 2013 - 03:37 AM

wxWidgets generally supports OpenGL rendering much better than DirectX and the library is simple but unfortunately it is messy as hell with years of cruft. It was also based on the design of MFC in the early days (when two stage construction was "a good idea") making it a bit horrid.

 

Since Qt requires an external parser to compile (it isnt 100% standard C++), people don't realize this yet but in ~10 years it is going to be as hard as Borland VCF C++ projects to compile.

 

So my suggestions...

 

There is a version of GLUT for DirectX called DXUT (in the DirectX SDK Samples). If you are confident enough to load your own textures / sounds / shaders etc... without SDL or other frameworks, then I highly recommend it. Since DXUT (and GLUT) is extremely small, it also keeps your software portable to other platforms at a later date (such as that crippled Windows 8 Metro stuff). If you don't want to write your own texture loading stuff then you can still use standalone libraries (FreeImage, DevIL/OpenIL, even SDL just for images).

 

Since you are using DirectX (with a GUI toolkit), you are probably only interested in the Windows platform. Since C++/CLI or C++/CX are "Microsoft standards" then perhaps you might want to try using Winforms to create the DX rendering context using those compilers? The rest of your code can remain 100% standard C++. If you don't mind constantly asking Microsoft (every 30 days) for a developer license, then you might want to use the Windows 8 Metro framework as a GUI / rendering context too.


Edited by Karsten_, 24 June 2013 - 03:39 AM.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#4 RealNoname   Members   -  Reputation: 157

Like
1Likes
Like

Posted 24 June 2013 - 05:48 AM


If by "GUI library" you mean basic window management and context creation though, I would suggest SFML or GLFW.
 
Edit: nevermind, missed the DirectX part.

I agree with GLFW (OpenGL only), but why not SFML? Like SDL, it's capable of managing a window with attached DirectX device/context. Basically every framework will do, as long, as you can acquire a valid handle pointer - that's all what is required to properly initialize a direct3d device. 



#5 BitMaster   Crossbones+   -  Reputation: 4222

Like
1Likes
Like

Posted 24 June 2013 - 07:40 AM

I have no experience in using SFML in combination with DirectX. I felt it safer to just redact that piece of uncertain information than offer pure speculation. However, while we are doing speculation: at least GLFW 3 seems to be able to return the native window handle. If it's possible to prevent the GL context creation (with the appropriate window hints), using GLFW for DirectX should be doable too with little extra work.



#6 AllEightUp   Moderators   -  Reputation: 4234

Like
3Likes
Like

Posted 24 June 2013 - 11:48 AM

Since Qt requires an external parser to compile (it isnt 100% standard C++), people don't realize this yet but in ~10 years it is going to be as hard as Borland VCF C++ projects to compile.

 

That's an awfully large leap of opinion.  I'm personally a fan of Qt and if I could see any reason that this comment were true, I would look at other libraries, but the comparison to Borland VCF is highly inappropriate and misleading.  Qt continues to update the library to incorporate the new C++ features such that signals/slots can be used with C++11 lambda/functional if desired, Qt is not diverging further from standards which is quite a large difference.  As to the moc pass, it is effectively nothing more than extraction of reflection information (plus a couple other items) which is not tied to any specific version of C++, special extensions or other things which is again highly different than a library written against a custom closed source compiler/RAD tool.  All said and done, Qt and C++ are merging closer together, not diverging away from each other so your worries are likely unfounded.  (No absolutes, anything "could" happen; we could all be writing games in Basic in 10 years seems about as likely.)

 

As to the other libraries (non-DX based though), you can see an example of integration of multiple libraries in the sources for my articles:  https://code.google.com/p/a8u-tutorial-sources/

Incorporated into that right now:

 

C++11 libraries, lamda, ranged for in use.  (Would probably have problems with VC2010 unfortunately but could be corrected.)

SFML for window handling.

libRocket for the gui.

Lua for scripting.  (Integrated with libRocket and some preliminary bits of the game.)

Physfs for archive packs.  (librocket and everything else is integrated into this already.)

Qt5 for the editor wrapper.  (Just started, not integrated with the game itself yet.)

 

It would not take much to replace the minimal OpenGL use with DX, I've not done any real rendering except the integration with libRocket for the moment.



#7 Steve_Segreto   Crossbones+   -  Reputation: 1538

Like
-4Likes
Like

Posted 25 June 2013 - 12:48 AM

I recant.


Edited by Steve_Segreto, 25 June 2013 - 09:59 AM.


#8 BitMaster   Crossbones+   -  Reputation: 4222

Like
2Likes
Like

Posted 25 June 2013 - 12:57 AM

Qt is non-standard garbage and going the way of the dinosaur fast. Best bet is to use a Microsoft approved offering, like DXUT.


Considering a whole OpenSource community lives around Qt (KDE), I find such a flamebaity post without any evidence to back it up ... extremely difficult to believe.

#9 BitMaster   Crossbones+   -  Reputation: 4222

Like
1Likes
Like

Posted 25 June 2013 - 01:01 AM

libRocket for the gui.


I checked out libRocket in the past but it always looked inactive to me. The last news on their web page is from 2011 and the forum is not exactly active but not completely dead either. Do you have any more experience with that project? Are they still actively developing?

#10 Steve_Segreto   Crossbones+   -  Reputation: 1538

Like
1Likes
Like

Posted 25 June 2013 - 01:11 AM

 

Qt is non-standard garbage and going the way of the dinosaur fast. Best bet is to use a Microsoft approved offering, like DXUT.


Considering a whole OpenSource community lives around Qt (KDE), I find such a flamebaity post without any evidence to back it up ... extremely difficult to believe.

 

 

It's not really flamebaity, Qt is very difficult to compile/build for Windows platform, has many non-standard tools and code, looks like crap compared to officially approved GUI technologies for Windows  and seems to have compatibility issues with Windows 7 and above. For Linux Qt is the one-eyed man in the land of the blind. Everywhere else its just a one-eyed man smile.png

 

I meant also that mouse-based GUIs are going the way of the dinosaur fast.

 

http://www.kde.org/community/history/qtissue.php


Edited by Steve_Segreto, 25 June 2013 - 01:33 AM.


#11 BitMaster   Crossbones+   -  Reputation: 4222

Like
2Likes
Like

Posted 25 June 2013 - 01:43 AM

It's not really flamebaity, Qt is very difficult to compile/build for Windows platform, has many non-standard tools and code, looks like crap compared to officially approved GUI technologies for Windows  and seems to have compatibility issues with Windows 7 and above.


I have built the commercial and OpenSource version of Qt using MSVC and MinGW. I have even built and successfully linked Qt statically using the static runtime even though that's not officially supported. It's not the simplest of builds but far from the worst I have seen and much simpler than some I had to deal with.
One part of my day job is looking after a Qt-based application. I have not experienced any compatibility issues with either Windows 7 or Windows 8 so far. Maybe in the more arcane corners, but all the normal stuff works without issues.
The only 'non-standard' tool you usually have to deal with is the moc'er. Especially using CMake it integrates into the build process absolutely seamlessly. I don't see much chance for problems down the future either: the C++ standard committee seems extremely reluctant to add anything to the language that breaks existing code, so the worst thing you might have to deal with is that you cannot use some C++XY constructs in your headers you need to moc. And even that is doubtful because parsing the moc'er does is rather lazy and accepts a lot of things that are obviously not valid C++.

While the look of Qt4 is nothing to write home about I haven't really found anyone complaining about it either, unless of course you force a non-native look on it. Qt5 is on a completely different page but I don't have enough experience there yet to comment about it.

Edited by BitMaster, 25 June 2013 - 01:44 AM.


#12 kolarz3   Members   -  Reputation: 164

Like
0Likes
Like

Posted 25 June 2013 - 06:08 AM

All this stuff is rendering by Direct3D. Can you give some library that operates on rendered texture (like Unity3D)?



#13 BitMaster   Crossbones+   -  Reputation: 4222

Like
0Likes
Like

Posted 25 June 2013 - 06:22 AM

So, if I understand you correctly you look for some in-game UI? You are not looking for something to create and manage the application window?

 

In that case, both CEGUI and libRocket still appear reasonable solutions. CEGUI comes directly with a DirectX renderer, you might have to implement one for libRocket, not sure (but that should be rather simple).


Edited by BitMaster, 25 June 2013 - 06:23 AM.


#14 Steve_Segreto   Crossbones+   -  Reputation: 1538

Like
1Likes
Like

Posted 25 June 2013 - 10:08 AM

DXUT



#15 cdoty   GDNet+   -  Reputation: 502

Like
0Likes
Like

Posted 25 June 2013 - 12:40 PM

I checked out libRocket in the past but it always looked inactive to me. The last news on their web page is from 2011 and the forum is not exactly active but not completely dead either. Do you have any more experience with that project? Are they still actively developing?

 

 

I started using libRocket, with SFML/OpenGL rendering, two weeks ago, and I like a lot of the features and available controls. It's also fairly easy to add custom controls and expand existing controls.

 

The initial learning curve was a bit steep, it's a bit incomplete in places (ie I had to add a row selection indicator to the data grid), and similar to using HTML & CSS, it takes some trial and error to get things laid out correctly.

 

Data and event binding are really easy to setup, and it's easy to customize the look of the data. The code is well organized, so it's easy enough to add additional functionality. And, once you understand the paradigm, it's fairly easy to layout a dialog or UI.

 

I've only ran into one significant snag, and that was trying to use two data grids in a single window. I could easily use a data grid and a data selection element. I could have done something wrong, or there might be some formatting requirements that I didn't understand. I ended up not really needing it, so I didn't spend much time trying to figure it out.

 

I looked at a lot of the GUI libraries available, and can't find one with an advanced data grid control. Many have a list control, but very few have a data grid control, and only libRocket had support for data binding.


Edited by cdoty, 25 June 2013 - 12:43 PM.

Check out Super Play, the SNES inspired Game Engine: http://www.superplay.info


#16 AllEightUp   Moderators   -  Reputation: 4234

Like
0Likes
Like

Posted 25 June 2013 - 02:52 PM

 

libRocket for the gui.


I checked out libRocket in the past but it always looked inactive to me. The last news on their web page is from 2011 and the forum is not exactly active but not completely dead either. Do you have any more experience with that project? Are they still actively developing?

 

It definitely seems like the library dev has slowed down if not stopped completely.  On the other hand, there are a number of branches with useful fixes and modifications on github where others have continued the work.  So, while the main branch may seem pretty well dead, go snoop around the other branches, there's some interesting stuff.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS