Giter Club home page Giter Club logo

tharsis-dimgui's Introduction

tharsis-dimgui

shield

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
  • Depends on Derelict for OpenGL instead of glad-drey.

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

Links

  • The original imgui github repository.

License

Distributed under the zlib license.

See the accompanying file license.txt.

tharsis-dimgui's People

Contributors

andrejmitrovic avatar kiith-sa avatar john-colvin avatar trvb avatar drug007 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.