Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A pure C raylib backend for the immediate mode gui Dear ImGui, on top of cimgui

License

NotificationsYou must be signed in to change notification settings

alfredbaudisch/raylib-cimgui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A pure C raylib backend for the immediate mode guiDear ImGui, on top ofcimgui.

This Dear ImGui backend is heavily adapted from the excellent C++ raylib's Dear ImGui backendraylib-extras/rlImGui.

Building

  • cimgui can be linked both dynamically or statically to your raylib project.

    • Statically linking to cimgui requires linking-lstdc++.
  • Clone or install raylib somewhere.

  • Clone cimgui somewhere:

    git clone --recursive https://github.com/cimgui/cimgui.git    git submodule update --init --recursive
  • Include and link cimgui.
  • Buildrlcimgui.c alongside your project.

Building in a raylib project

Check the included example Makefile in the examples folder.

CIMGUI_PATH = /path/to/cimgui#...INCLUDE_PATHS += -I$(CIMGUI_PATH)#...LDFLAGS +=  -L$(CIMGUI_PATH)#...LDLIBS += -lcimgui -lstdc++# Build rlcimgui.c alongside the projectPROJECT_SOURCE_FILES ?= \    ../rlcimgui.c \    raylib_cimgui_demo.c#...# Build cimgui and Dear ImGui$(CIMGUI_PATH)/libcimgui.a:$(MAKE) -C $(CIMGUI_PATH) CXXFLAGS="-O1 -fno-exceptions -fno-rtti -std=c++11 -DIMGUI_DISABLE_OBSOLETE_KEYIO=1" static

Acknowledgments toLucrecious for some of the Makefile tips. Check his "Makefile.alternative" in the examples folder (requires adjustment, since Lucrecious' file is aimed at usingrlImGui).

Usage

See the included examples in the "examples" folder.

Example

To build and run the example, edit the paths in Makefile (CIMGUI_PATH and RAYLIB_PATH), then:

cd examplesmake./raylib_cimgui_demo.exe

Font Awesome Icons

Inspired by rlImGui, support for Font Awesome 6https://fontawesome.com/ is also built into raylib cimgui and enabled by default. You can simply#include "extras/IconsFontAwesome6.h" to use the ICON_FA macros for any icon in the free set.

The exampleraylib_cimgui_demo.c already includes usage for Font Awesome.

If you wish to disable font awesome support you can#define NO_FONT_AWESOME.

About

A pure C raylib backend for the immediate mode gui Dear ImGui, on top of cimgui

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp