Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,389

More GUI Design


Josh

2,316 views

 Share

GUI* GUI::Create(window);

GUI* GUI::Create(context);

GUI* GUI::Create(texture);

 

A GUI created on a window would draw to the window, with no graphics context, and would be used for making 3D applications (like Leadwerks Editor). A GUI created on a context would use OpenGL drawing to render the GUI onto the context. A GUI created on a texture would require the user to manually input events and would be used for interfaces that appear in the 3D world, like a computer panel you can interact with in the game.

  • Upvote 6
 Share

5 Comments


Recommended Comments

What would really be the difference between window/context in this case? It seems both would handle input/events automatically and you still could make a 3D application with the context right?

Link to comment

I talked about this in the hangout but I guess I haven't actually written about it. I'm refactoring the window class to add direct drawing to windows without a 3D context, using the actual OS commands the native UI is drawn with. This avoids the little niggles that 2D-in-3D GUIs have, like FRAPS displaying the framerate on the window, the UI flashing on the first time it is rendered, little sections of corrupted graphics, dependence on a 3D card and drivers, etc.

 

The OS-level drawing commands also provide faster and higher quality text rendering, and built in features like word wrapping (although I had to write this custom for Linux).

 

This isn't really meant as a feature for you to use, but if you are writing any custom tools this would give you a consistent GUI on Windows, Mac, and Linux that is simple to use, something the entire open source community has failed to provide.

 

I want a custom UI for Leadwerks Editor, and the engine needs a GUI system, so this is a way of killing two birds at once, rather than developing two systems side-by-side, or trying to render the Leadwerks Editor interface with a 3D context.

Link to comment

That's what I was thinking you meant but my first thought was "Wow, that's a big goal". So basically you are replacing BMax with your own Lua/C++ based crossplatform GUI library and having the structure just flow into the GUI stuff for games (on the context) as well. If you can pull it off you could sell it separately probably as a crossplatform GUI library that's easy to use is always welcomed.

Link to comment

Plus a MaxGUI wrapper so I can just swap the BMX module out and the editor will recompile and work with no code changes. smile.png

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...