www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Question 2: Extendible OpenGL GUI library

reply janderson <askme me.com> writes:
Thanks for all your answers on my previous network library question.

The second thing I'm looking for is an extensible, portable GUI library. 
  Eventually I want and need the ability to improve and add my own types.

The most important control I need is a multi-line textbox which I can 
add functionality to as I need it.

I was thinking that openGL would be cool (although not necessary) as I'd 
be able to do some neat iphone like stuff (and 3D GUI's) one day in the 
future.  So it would be nice if these gui's were made out of 3D polygons 
or renderable on a texture.

So far luigi looks like my best option: 
http://www.dsource.org/projects/luigi

I want to avoid writing my own GUI library because I know I do I'll 
never get this project done.  I'd rather not port something, although I 
will do if its worth it.

What do you use?
What libraries do you suggest and why?

-Joel

PS - Does anyone know if its possible to render controls like scintilla 
on to a openGL texture?
Apr 13 2008
next sibling parent reply Jacob Carlborg <doobnet gmail.com> writes:
janderson wrote:
 Thanks for all your answers on my previous network library question.
 
 The second thing I'm looking for is an extensible, portable GUI library. 
  Eventually I want and need the ability to improve and add my own types.
 
 The most important control I need is a multi-line textbox which I can 
 add functionality to as I need it.
 
 I was thinking that openGL would be cool (although not necessary) as I'd 
 be able to do some neat iphone like stuff (and 3D GUI's) one day in the 
 future.  So it would be nice if these gui's were made out of 3D polygons 
 or renderable on a texture.
 
 So far luigi looks like my best option: 
 http://www.dsource.org/projects/luigi
 
 I want to avoid writing my own GUI library because I know I do I'll 
 never get this project done.  I'd rather not port something, although I 
 will do if its worth it.
 
 What do you use?
 What libraries do you suggest and why?
 
 -Joel
 
 PS - Does anyone know if its possible to render controls like scintilla 
 on to a openGL texture?

I suggest DWT http://www.dsource.org/projects/dwt , a D port of SWT (http://www.eclipse.org/swt/). It uses the operative systems functions to draw it's widgets. It's ported to windows and linux, if you use it don't forget the JFace port http://www.dsource.org/projects/dwt/wiki/JFace . You can draw opengl things inside a DWT shell (window) if it helps.
Apr 13 2008
parent Jacob Carlborg <doobnet gmail.com> writes:
Jacob Carlborg wrote:
 janderson wrote:
 Thanks for all your answers on my previous network library question.

 The second thing I'm looking for is an extensible, portable GUI 
 library.  Eventually I want and need the ability to improve and add my 
 own types.

 The most important control I need is a multi-line textbox which I can 
 add functionality to as I need it.

 I was thinking that openGL would be cool (although not necessary) as 
 I'd be able to do some neat iphone like stuff (and 3D GUI's) one day 
 in the future.  So it would be nice if these gui's were made out of 3D 
 polygons or renderable on a texture.

 So far luigi looks like my best option: 
 http://www.dsource.org/projects/luigi

 I want to avoid writing my own GUI library because I know I do I'll 
 never get this project done.  I'd rather not port something, although 
 I will do if its worth it.

 What do you use?
 What libraries do you suggest and why?

 -Joel

 PS - Does anyone know if its possible to render controls like 
 scintilla on to a openGL texture?

I suggest DWT http://www.dsource.org/projects/dwt , a D port of SWT (http://www.eclipse.org/swt/). It uses the operative systems functions to draw it's widgets. It's ported to windows and linux, if you use it don't forget the JFace port http://www.dsource.org/projects/dwt/wiki/JFace . You can draw opengl things inside a DWT shell (window) if it helps.

I started to use it mostly because I already knew SWT and I like the API. Of course I meant "operating system" when I wrote "operative system"
Apr 13 2008
prev sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
janderson wrote:
 Thanks for all your answers on my previous network library question.
 
 The second thing I'm looking for is an extensible, portable GUI library. 
  Eventually I want and need the ability to improve and add my own types.
 
 The most important control I need is a multi-line textbox which I can 
 add functionality to as I need it.
 
 I was thinking that openGL would be cool (although not necessary) as I'd 
 be able to do some neat iphone like stuff (and 3D GUI's) one day in the 
 future.  So it would be nice if these gui's were made out of 3D polygons 
 or renderable on a texture.
 
 So far luigi looks like my best option: 
 http://www.dsource.org/projects/luigi

It probably is, at least until H3r3tic's Hybrid gui lib gets released.
 I want to avoid writing my own GUI library because I know I do I'll 
 never get this project done.  I'd rather not port something, although I 
 will do if its worth it.

I felt the same way when I started writing luigi. And unfortunately for you, I still feel the same way today. :-) Meaning Luigi isn't actively maintained because I just needed some way to get some buttons and sliders on the screen, and now it does that. I would have used someone else's lib if there had been one to use. It only has 1-line text fields right now, though. No multiline. But I did write it with the idea of making it extensible in mind.
 PS - Does anyone know if its possible to render controls like scintilla 
 on to a openGL texture?

Possible? surely. Easy? Doubtful. I believe Qt has a nifty generic drawing context setup that allows you to use GL as the rendering surface for any Qt widgets. And I bet someone has ported Scintilla to be a Qt widget. So that's a possible existence proof. But it will not likely be easy to duplicate that. --bb
Apr 13 2008
parent reply janderson <askme me.com> writes:
Bill Baxter wrote:
 janderson wrote:
 So far luigi looks like my best option: 
 http://www.dsource.org/projects/luigi


 I felt the same way when I started writing luigi.  And unfortunately for 
 you, I still feel the same way today. :-)  Meaning Luigi isn't actively 
 maintained because I just needed some way to get some buttons and 
 sliders on the screen, and now it does that.  I would have used someone 
 else's lib if there had been one to use.  It only has 1-line text fields 
 right now, though.  No multiline.  But I did write it with the idea of 
 making it extensible in mind.
 
 --bb

Thanks. Does luigi use the frame buffer or triangles to render its gui? I'm simply wondering if I can apply 3D operations on the gui. Cheers -Joel
Apr 13 2008
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
janderson wrote:
 Bill Baxter wrote:
 janderson wrote:
 So far luigi looks like my best option: 
 http://www.dsource.org/projects/luigi


 I felt the same way when I started writing luigi.  And unfortunately 
 for you, I still feel the same way today. :-)  Meaning Luigi isn't 
 actively maintained because I just needed some way to get some buttons 
 and sliders on the screen, and now it does that.  I would have used 
 someone else's lib if there had been one to use.  It only has 1-line 
 text fields right now, though.  No multiline.  But I did write it with 
 the idea of making it extensible in mind.

 --bb

Thanks. Does luigi use the frame buffer or triangles to render its gui? I'm simply wondering if I can apply 3D operations on the gui.

That's a good question. I think I left that up to the Theme subclasses. For the windows-ish theme I'm pretty sure I use GL lines which won't look so good rotated around. But for the DXUT theme I'm pretty sure it's all textured quads. Hmm but the font is done using glbitmap. I think with a little work the Font interface could be implemented by some texture-based FT-using thing... like the text code from H3r3tic. --bb
Apr 13 2008
parent reply janderson <askme me.com> writes:
Bill Baxter wrote:
 janderson wrote:
 Bill Baxter wrote:
 janderson wrote:
 So far luigi looks like my best option: 
 http://www.dsource.org/projects/luigi


 I felt the same way when I started writing luigi.  And unfortunately 
 for you, I still feel the same way today. :-)  Meaning Luigi isn't 
 actively maintained because I just needed some way to get some 
 buttons and sliders on the screen, and now it does that.  I would 
 have used someone else's lib if there had been one to use.  It only 
 has 1-line text fields right now, though.  No multiline.  But I did 
 write it with the idea of making it extensible in mind.

 --bb

Thanks. Does luigi use the frame buffer or triangles to render its gui? I'm simply wondering if I can apply 3D operations on the gui.

That's a good question. I think I left that up to the Theme subclasses. For the windows-ish theme I'm pretty sure I use GL lines which won't look so good rotated around. But for the DXUT theme I'm pretty sure it's all textured quads. Hmm but the font is done using glbitmap. I think with a little work the Font interface could be implemented by some texture-based FT-using thing... like the text code from H3r3tic. --bb

Where can I find this H3r3tic thing you talk about. Is there an ETA? Cheers, -Joel
Apr 13 2008
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
janderson wrote:
 Bill Baxter wrote:
 janderson wrote:
 Bill Baxter wrote:
 janderson wrote:
 So far luigi looks like my best option: 
 http://www.dsource.org/projects/luigi


 I felt the same way when I started writing luigi.  And unfortunately 
 for you, I still feel the same way today. :-)  Meaning Luigi isn't 
 actively maintained because I just needed some way to get some 
 buttons and sliders on the screen, and now it does that.  I would 
 have used someone else's lib if there had been one to use.  It only 
 has 1-line text fields right now, though.  No multiline.  But I did 
 write it with the idea of making it extensible in mind.

 --bb

Thanks. Does luigi use the frame buffer or triangles to render its gui? I'm simply wondering if I can apply 3D operations on the gui.

That's a good question. I think I left that up to the Theme subclasses. For the windows-ish theme I'm pretty sure I use GL lines which won't look so good rotated around. But for the DXUT theme I'm pretty sure it's all textured quads. Hmm but the font is done using glbitmap. I think with a little work the Font interface could be implemented by some texture-based FT-using thing... like the text code from H3r3tic. --bb

Where can I find this H3r3tic thing you talk about. Is there an ETA? Cheers, -Joel

http://h3.team0xf.com/proj/ Looks like he's put it up on code.google since I last checked! http://h3r3tic.googlecode.com/svn/trunk/HybridGUI/ http://code.google.com/p/h3r3tic/downloads/list --bb
Apr 13 2008