OpenGL GUI anyone? Updated on 11/17/05

Started by
206 comments, last by Alpha_ProgDes 17 years, 9 months ago
Sorry for the lack of updates, lately I've been very busy (pulling 12-14 hours long shifts :-/).
Abraham Lopez got in touch with my via email and it seems that he's got a new port to Linux up and running, I'll be posting a link to it later tonight (if I ever go back to my place :-/).
Peace
Advertisement
Nice work! Keep up the good work, and keep posting updates to this!
Thank you all for your precious feedback [smile]
I updated the main post with new stuff, go fetch it [wink]
Hey, glad to see the great work, might actually use it for my current project thanks to your awesome decision to use the Zlib license (which I definitely recommend to the rest of the developers on this website).

My question is, why did you write your own XML parser? There are great, license compatible libraries out there that are already complete and ready to use. I grabbed a copy of your code and I'm currently in the process of porting it to TinyXML, a great, small, Zlib licensed core XML parser. It has an impressively small footprint, and is very fast.

If you'd like my port to TinyXML, I can commit it back, just ask. I'm trying to register to the site currently, but something in their ASP broke (don't ask me, I gave up web developing a bit ago). If you'd like to contact me, you can reach me at awalton@gmail.com.

Thanks again for the good work!

Andrew
Quote:Original post by Anonymous Poster
My question is, why did you write your own XML parser? There are great, license compatible libraries out there that are already complete and ready to use. I grabbed a copy of your code and I'm currently in the process of porting it to TinyXML, a great, small, Zlib licensed core XML parser. It has an impressively small footprint, and is very fast.


Hey, I'd LOVE to see this ported to TinyXml. I use TinyXml in my game so having to compile another XML parser in with it doesn't seem to appealing to me :-/ I've also modified TinyXML to read from PHYSICS_FS instead of the normal file access means, this allows me to load my XML from Zip files and all that jazz.

This project has certainly come on a long way since I last checked it out. I'd recommend that you guys get a SF.net project sorted out to allow others to join and contribute.

I'm going to download this tonight and try to see how well it integrates within my game (4E4 entry). I'm at a stage now where a GUI will be useful, if only for health bars and menu screens (but I do have other plans [wink]). The TinyXML based version is something I'd love to see in the future.

EDIT: I've just taken a cursory glance and fear that too many of the supporting systems will conflict with my architecture [sad]. Things such as having a global Logger, for example and having textures stored differently will unfortunately mean I can't use it straight from the box. Things such as keyboard input, mouse input and textures are all handled very specifically to this project; it'd be useful for people like me to be able to hook up some form of 'coupling' class to an abstract interface used by your GUI... My texture classes may not be like yours, but using a proxy class and an interface I'd probably be able to make them behave like them, for example.

With a bit of work, this will go a long way :)

Keep it up!

[Edited by - evolutional on July 13, 2005 6:51:26 AM]
Well, it does suck this won't work for you, but where my project was a baby when I ran into this, it's absolutely great for me!

Porting to TinyXML is going to take a lot of work, but it's going quickly. I'm going to add a global object to use as a go between the GUI toolkit and TinyXML so that it doesn't take very much code modification. You'll get what I mean when you see the code.

Also, there are other little things I disagree with in the code, but I'm going to bring them up here first before I go changing the whole world around just to fit my needs better. Why, for example, did you bother to write your own string class? Speed? The STL has an alright string class, and I tend to use it for most of my work (better than const char * splattered throughout the code, and having to constantly check sizes, use memcpy, etc, etc). I'm a big fan of doing things the proper OO way, verses the C++ way, so I guess it's a personal preference deal, but I digress.

I think it would also be possible to open up the log interface so that you can plug in your own global log interface if you like (for example, my game uses a flatfile to log instead of XML simply because a log reader doesn't need the metadata XML provides).

I'm very happy I ran into this project. :)

[edit uno] Question to JavaCoolDude:
What extensions in OpenGL required you to need GLee? I'm pretty new to OpenGL (having been a DirectX guy in my prior tiddling with graphics, though I'd never really cared for them before), and I'm unfamiliar with all of the function families, but I can't percieve linking such a fat library for just a few function calls. I also want to mention straight forward how much I really don't like the fact that all of OpenGL is still functional programming and how objects seem to be an afterthought; this was definitely something that DirectX got right, even if it was at the cost of performance initially. *shakes fist*

TinyXML port is going along nicely, though a lot of code refactoring has happened, and I'm not sure if you'll like it. We'll probably have to sort things out if we do ever decide to merge the two.

[Edited by - ciroknight on July 13, 2005 3:14:16 PM]
Greetings fellow developers, glad to see some enthusiasm and brain storming going in here[smile]

My question is, why did you write your own XML parser? There are great, license compatible libraries out there that are already complete and ready to use. I grabbed a copy of your code and I'm currently in the process of porting it to TinyXML, a great, small, Zlib licensed core XML parser. It has an impressively small footprint, and is very fast.

My decision to write my own and "crappy" XML loader came from the fact that up until you guys have mentioned TinyXML, I've never ran across a samll XML parsing library that would not add 2 or 3 more megs to my rendering engine.
Porting my stuff (shall I say our stuff now [wink]) to TinyXML now that we're approaching the 1.0 release milestone seems like a wonderful suggestion, I'm all for it.

@evolutional:
Sup man, I think the problems lies in the lack of use of namespaces, something that could be easily fixed. I propose GLGUI:: or GUIUtils::, but again the group vote is more suitable for coming up with things like that.

@ciroknight:

I wrote my own String class because I wanted to perform things like adding a string and a scalar with a simple operator rather than resorting to another global function that would do that for me.
Plus, I'm the self-proclaimed champion of "reinvent the wheel, do it now" :D
GLee is there because I needed few extra GL tokens and functions for my texture class that have yet to make it to an official GL.h release.

I'm looking forward to see what your port over to tiny xml will look like, keep us all updated.
Peace.
Hey JavaCoolDude. Really great stuff. We are already planning on using it for our university project.

If I have any spare time, I am going to see if I can make a nice gui editor for this wonderful program. I think that with a gui editor, it will become a really big thing.
Quote:Original post by ciroknight
Also, there are other little things I disagree with in the code, but I'm going to bring them up here first before I go changing the whole world around just to fit my needs better. Why, for example, did you bother to write your own string class? Speed? The STL has an alright string class, and I tend to use it for most of my work (better than const char * splattered throughout the code, and having to constantly check sizes, use memcpy, etc, etc). I'm a big fan of doing things the proper OO way, verses the C++ way, so I guess it's a personal preference deal, but I digress.


JavaCoolDude, I think this is very important. Your project has the potential to become a big hit, but I think you need to try and use as many standardized things as possible. Using STL and TinyXML is a good start. If you use STL, then if other programmers want to help, they will be able to get comfortable really quickly.

Also I was wondering if .NET is an ok language to write the GUI editor in? I thought that once we get the .NET C++ one working, we can make the GUI editor using your GUI library itself.
Quote:Original post by JavaCoolDude
@evolutional:
Sup man, I think the problems lies in the lack of use of namespaces, something that could be easily fixed. I propose GLGUI:: or GUIUtils::, but again the group vote is more suitable for coming up with things like that.


Nah, I don't think that will do it... The issue is that I have my own Texture classes and Managers, just as I have my own Keyboard/Mouse managers and system. To use the GUI as it stands I'd have to have TWO texture managers (one for the GUI, one for the game) and TWO input managers which work in a similar, yet different way.

However, if you customised your GUI to accept an interface class for things such as textures, texturemanagement, events, etc there is a good chance that I could hook up an adapter or bridge class to allow my system to work with yours (bridge might actually be more appropriate). I could hook up a special TextureManagerAdaptor class based off GUI::ITextureManager for my manager to interact with your GUI system.

Anyway, it's just an idea - I'll definitely take another look at this if I ever start afresh with another project though.

Keep up the good work!

[Edited by - evolutional on July 14, 2005 10:52:55 AM]

This topic is closed to new replies.

Advertisement