Jump to page: 1 24  
Page
Thread overview
OpenGL GUI or GUI with (renderer/API of choice)?
Dec 14, 2005
Chad J
Dec 14, 2005
Tom S
Dec 14, 2005
Craig Black
Dec 14, 2005
John Reimer
Dec 14, 2005
J C Calvarese
Dec 14, 2005
clayasaurus
Dec 14, 2005
John Reimer
Dec 15, 2005
clayasaurus
Dec 15, 2005
clayasaurus
Dec 14, 2005
Tom S
Dec 15, 2005
John Reimer
Dec 15, 2005
clayasaurus
Dec 15, 2005
Chad J
Dec 15, 2005
Tom S
Dec 15, 2005
Tom S
Dec 15, 2005
Chad J
Dec 15, 2005
Tom S
Dec 16, 2005
Chris Lajoie
Dec 16, 2005
Chris Lajoie
Dec 16, 2005
Tom S
Dec 16, 2005
Chad J
Dec 16, 2005
Tom S
Dec 16, 2005
Chad J
Dec 17, 2005
Trevor Parscal
Dec 15, 2005
James Dunne
Dec 15, 2005
James Dunne
Dec 15, 2005
Chad J
Dec 15, 2005
Sebastian Beschke
Dec 15, 2005
Chad J
Dec 15, 2005
Chris Lajoie
December 14, 2005
I have decided that I want to write my computer games in D, instead of C#, C++, or anything else.  That said, I will need a GUI toolkit for any game I want to make in D.  It has to use OpenGL, unless someone can tell me how to make OpenGL and some other GUI lib using a different renderer work in harmony in the same app, on the same window.  So far I have been unable to find any GUI libs that will work with both D and OpenGL, and I was wondering if one is available or in the works.

If there isn't a good OpenGL GUI around that works in D, I am probably going to code one myself.  I've decided that it would probably be easier to just port some C++ code from one of the OpenGL GUI libraries rather than do it from scratch.  One I am particularly interested in is CEGUI, or Crazy Eddie's GUI System (http://www.cegui.org.uk/modules/news/).  So far I like it.  It is skinnable, uses XML for said skinning, seems straightforward enough, and is used in games.  One thing caught my attention though: CEGUI can use different renderers to display the GUI.  It made me start to think, why not have a GUI that can use any renderer or basic API?  I get the feeling that most of the code in a GUI library deals with its behavior, accepting inputs, and deciding where to draw images, and only a small fraction is dedicated to actually rendering the images.  I'm thinking it might be possible to make a layer that would work between the GUI and the renderer, and allow people to write modules for the GUI system that tell it how to handle rendering.  That way all of the GUI code would be reused, and people who want a different API/renderer would just need to tell the GUI system how to draw an image to the screen.  Another problem I see with GUI lib reliance on APIs is input.  CEGUI handled that by having the coder inject mouse/keyboard events into it.  Such a library could have little or no reliance on any API, native or otherwise.  Please correct me if I'm wrong, or let me know if this sort of thing is happening already.

One last thing - I am unable to find a "search" option on this forum/newsgroup. Is there an easier way to look for things besides looking through the forum one page at a time?


December 14, 2005
Chad J wrote:

> One last thing - I am unable to find a "search" option on this forum/newsgroup.
> Is there an easier way to look for things besides looking through the forum one
> page at a time?

Use a standalone newsreader, Mozilla Thunderbird is not too shabby.

--anders
December 14, 2005
Chad J wrote:

> I have decided that I want to write my computer games in D, instead of C#, C++,
> or anything else.  That said, I will need a GUI toolkit for any game I want to
> make in D.  It has to use OpenGL, unless someone can tell me how to make OpenGL
> and some other GUI lib using a different renderer work in harmony in the same
> app, on the same window. So far I have been unable to find any GUI libs that
> will work with both D and OpenGL, and I was wondering if one is available or in
> the works.  

Well... in the works. I've been working on a 3d game engine for some time. Currently it uses OpenGL as its renderer (but I may add D3D later on). It's also got an early version of a GUI coded entierly in D. The project's forum can be found here:
http://dsource.org/forums/viewforum.php?f=54
There's a link to a GUI demo download, which shows a few of its features. The demo is buggy, which can be checked by either using the mouse wheel or both mouse buttons to select ListBox items. These were really minor and I've eliminated them already, but just be aware that the demo may crash.
I'm currently low on free time, so the GUI isn't completely separated from my engine, I'm working on enhancing my photon mapper and possibly adding some PRT calculation capabilities to it, plus I have to refactor some code, while being busy with university stuff. Ahh... lots of things on my head, but I'm really looking forward to separating the GUI from my engine and making it available to the public.



> One thing caught my attention though: CEGUI can use different
> renderers to display the GUI.  It made me start to think, why not have a GUI
> that can use any renderer or basic API?  I get the feeling that most of the code
> in a GUI library deals with its behavior, accepting inputs, and deciding where
> to draw images, and only a small fraction is dedicated to actually rendering the
> images.  I'm thinking it might be possible to make a layer that would work
> between the GUI and the renderer, and allow people to write modules for the GUI
> system that tell it how to handle rendering.  That way all of the GUI code would
> be reused, and people who want a different API/renderer would just need to tell
> the GUI system how to draw an image to the screen.  Another problem I see with
> GUI lib reliance on APIs is input.  CEGUI handled that by having the coder
> inject mouse/keyboard events into it.  Such a library could have little or no
> reliance on any API, native or otherwise.  Please correct me if I'm wrong, or
> let me know if this sort of thing is happening already.  

AFAIK you're completely right. I've seen CEGUI work with the Ogre engine, some simple OpenGL renderer - official demos, and in D3D from C# - On a seminar by a guy from PeopleCanFly (makers of Painkiller). The only thing that a GUI really needs is a simple graphics 'driver' which would draw a bunch of textured quads (and possibly load these textures in a special way) and a means of receiving input, just as you said.



-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O !M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y
------END GEEK CODE BLOCK------

Tomasz Stachowiak  /+ a.k.a. h3r3tic +/
December 14, 2005
Noone seemed to like the idea last time I mentioned it, but I think someone should port Qt to D.  Qt is full featured, cross platform, and includes good support for OpenGL.  I know from experience that it is a very good tool.  In fact, I would go so far as to say it is the best quality GUI framework available.

-Craig


December 14, 2005
Last I heard, Ant's DUI supported an OpenGL canvas.  It was working on Linux and Win32 for awhile.  With the change to dynamic module loaders driving DUI, though, I think the OpenGL canvas is incomplete again.

-JJR
December 14, 2005
In article <dnopb0$hq7$1@digitaldaemon.com>, Chad J says...
>One last thing - I am unable to find a "search" option on this forum/newsgroup. Is there an easier way to look for things besides looking through the forum one page at a time?

Try this page: http://www.digitalmars.com/advancedsearch.html

Searching for information about D is often an adventure. Here are some tips that I've compiled: http://www.prowiki.org/wiki4d/wiki.cgi?SearchingTips

jcc7
December 14, 2005
You can either
A) Try and use DUI over at dsource.org, which is essentially GTK for D
B) Roll out your own and become famous

As for a newsreader, go to mozilla.com and grab a hold of Thunderbird, it has search functionality and makes the newsgroup readable.

If you decide to roll your own, here are some more options

1) Work with the dsource.org community to try and make a standard OpenGL GUI for D. This way other D programmers interested in the same thing can give you support and be your advanced beta testers. I'll promise you at least two people will be interested in it. ;)

2) Make bindings for an already existing D OpenGL GUI. You can get C and C++ libraries to work in D, albeit C++ takes a little more effort as you bind from C++ --> C --> D.

Goodluck, for whichever path you may choose.
~ Clay
December 14, 2005
clayasaurus wrote:
> You can either
> A) Try and use DUI over at dsource.org, which is essentially GTK for D
> B) Roll out your own and become famous
> 
> As for a newsreader, go to mozilla.com and grab a hold of Thunderbird, it has search functionality and makes the newsgroup readable.
> 
> If you decide to roll your own, here are some more options
> 
> 1) Work with the dsource.org community to try and make a standard OpenGL GUI for D. This way other D programmers interested in the same thing can give you support and be your advanced beta testers. I'll promise you at least two people will be interested in it. ;)
> 
> 2) Make bindings for an already existing D OpenGL GUI. You can get C and C++ libraries to work in D, albeit C++ takes a little more effort as you bind from C++ --> C --> D.
> 
> Goodluck, for whichever path you may choose.
> ~ Clay

What about Terra? It is a GUI framework done fully in OpenGL, I believe. The project looked like it was getting off to a good start.  Maybe that's of interest here?

-JJR
December 14, 2005
clayasaurus wrote:
> You can either
> A) Try and use DUI over at dsource.org, which is essentially GTK for D
> B) Roll out your own and become famous

I don't get it. Why are you suggesting DUI ? Chad was certainly asking about a GUI that draws in a 3D api, not a general purpose system-level GUI like GTK or DWT, etc. Something just like CEGUI, Terra's GUI or my own.


-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O !M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y
------END GEEK CODE BLOCK------

Tomasz Stachowiak  /+ a.k.a. h3r3tic +/
December 15, 2005
Tom S wrote:
> clayasaurus wrote:
>> You can either
>> A) Try and use DUI over at dsource.org, which is essentially GTK for D
>> B) Roll out your own and become famous
> 
> I don't get it. Why are you suggesting DUI ? Chad was certainly asking about a GUI that draws in a 3D api, not a general purpose system-level GUI like GTK or DWT, etc. Something just like CEGUI, Terra's GUI or my own.
> 
> 

Because of this line:

"It has to use OpenGL, unless someone can tell me how to make OpenGL
and some other GUI lib using a different renderer work in harmony in the same app, on the same window."

It was just ambiguous enough so that we thought he meant a GUI that could access opengl.  Otherwise I agree... he was quite plain about what he really wanted.

-JJR
« First   ‹ Prev
1 2 3 4