GithubHelp home page GithubHelp logo

codingmadness / rlimgui-cs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raylib-extras/rlimgui-cs

0.0 0.0 0.0 311 KB

A Raylib-cs integration with DearImGui

License: zlib License

C# 100.00%

rlimgui-cs's Introduction

rlImGui-cs

A Raylib-cs integration with DearImGui

rlImgui-cs provides a backend for Dear ImGui using Raylib for C# using https://github.com/mellinoe/ImGui.NET

Building

rlImGui-cs is is a shared library that uses raylib-cs and ImGui.Net

Setup

Using rlImGui in your code is very easy. Once you have included the library, or source files for rlImGui and ImGui in your project, simply do the following.

using Raylib_cs;
using rlImGui_cs;
using ImGuiNET;


// before your game loop
rlImGui.Setup(true);	// sets up ImGui with ether a dark or light default theme

// inside your game loop, between BeginDrawing() and EndDrawing()
rlImGui.Begin();			// starts the ImGui content mode. Make all ImGui calls after this

rlImGui.End();			// ends the ImGui content mode. Make all ImGui calls before this

// after your game loop is over, before you close the window

rlImGui.Shutdown();		// cleans up ImGui

Examples

There are two example programs in the examples folder.

Simple

This is the most simple use of ImGui in raylib, it just shows the ImGui demo window. image

Editor

This is a more complex example of ImGui, showing how to use raylib 2d and 3d cameras to draw into ImGui windows using render textures. image

Images

Raylib textures can be drawn in ImGui using the following functions

rlImGui.Image(Texture2D image);
rlImGui.ImageSize(Texture2D image, int width, int height);
rlImGui.ImageRect(Texture2D image, int destWidth, int destHeight, Rectangle sourceRect);

rlimgui-cs's People

Contributors

jeffm2501 avatar chrisdill avatar swcreeperking 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.