tharsis-dimgui 0.1.8-alpha

A fork of dimgui used in Tharsis and related projects


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:


This package provides sub packages which can be used individually:

tharsis-dimgui:demo - demo

tharsis-dimgui:memory - memory

tharsis-dimgui

dimgui

This is a (temporary?) fork of dimgui, the D port of the [imgui] OpenGL GUI library.

Homepage of the original dimgui: https://github.com/d-gamedev-team/dimgui

dimgui is an [immediate-mode] GUI library.

Main differences from dimgui

  • Simple text input widget
  • Minor bugfixes
  • Added an optional build configuration to enable dimgui to work with Derelict by adding this to dub.json of a dimgui-based project:
  "subConfigurations": {
      "tharsis-dimgui": "derelict-gl-library",
  },

Examples

Use [dub] to build and run the example project:

# Shows a nice demo of the various UI elements.
$ dub run dimgui:demo

# Shows how to properly handle memory management.
$ dub run dimgui:memory

Note: You will need to install the [glfw] shared library in order to run the example.

Real-world examples

dimgui is used in the following projects:

  • [dbox] - The 2D physics library uses dimgui for its interactive test-suite.

Documentation

The public API is available in the [imgui.api] module.

Memory Management

For efficiency reasons [imgui] will batch all commands and will render the current frame once imguiRender is called. Calls to UI-defining functions such as imguiLabel will store a reference to the passed-in string and will not draw the string immediately.

This means you should not pass in memory allocated on the stack unless you can guarantee that:

  • The memory on the stack will live up to the point imguiRender is called.
  • The memory passed to the UI-defining functions is unique for each call.

An example of both improper and proper memory management is shown in the [memory] example.

Building dimgui as a static library

Run [dub] alone in the root project directory to build dimgui as a static library:

$ dub
  • The original [imgui] github repository.

License

Distributed under the [zlib] license.

See the accompanying file license.txt.

Authors:
  • Mikko Mononen
  • Adrien Herubel
  • Andrej Mitrovic
Sub packages:
tharsis-dimgui:demo, tharsis-dimgui:memory
Dependencies:
none
Versions:
0.1.10 2015-Aug-31
0.1.9 2015-Jul-10
0.1.8-alpha 2014-Oct-09
~master 2015-Aug-31
Show all 4 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 299 downloads total

Score:
1.5
Short URL:
tharsis-dimgui.dub.pm