{"id":13765695,"url":"https://github.com/raylib-extras/rlImGui","last_synced_at":"2025-05-10T21:31:27.527Z","repository":{"id":39753794,"uuid":"414660280","full_name":"raylib-extras/rlImGui","owner":"raylib-extras","description":"A Raylib integration with DearImGui","archived":false,"fork":false,"pushed_at":"2025-03-11T00:24:00.000Z","size":3434,"stargazers_count":349,"open_issues_count":1,"forks_count":76,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-11T00:28:11.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raylib-extras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-07T15:38:50.000Z","updated_at":"2025-03-11T00:24:04.000Z","dependencies_parsed_at":"2024-02-15T17:26:32.798Z","dependency_job_id":"fde78c1b-f321-4d66-adae-84c6635a74e4","html_url":"https://github.com/raylib-extras/rlImGui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raylib-extras%2FrlImGui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raylib-extras%2FrlImGui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raylib-extras%2FrlImGui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raylib-extras%2FrlImGui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raylib-extras","download_url":"https://codeload.github.com/raylib-extras/rlImGui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253485094,"owners_count":21915953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:00:44.162Z","updated_at":"2025-05-10T21:31:27.521Z","avatar_url":"https://github.com/raylib-extras.png","language":"C","funding_links":[],"categories":["List"],"sub_categories":["Libraries and Frameworks"],"readme":"# rlImGui\n\u003cimg align=\"left\" src=\"https://github.com/raysan5/raylib/raw/master/logo/raylib_logo_animation.gif\" width=\"64\"\u003e\nA Raylib integration with DearImGui\n\nrlImgui provides a backend for [Dear ImGui](https://github.com/ocornut/imgui) using [Raylib](https://www.raylib.com/). \n\n# Building\nrlImGui is setup to use premake to generate a static library and examples for Visual Studio 2019. Premake can also be used to generate makefiles for linux. rlImGui can be used as a static library, or by direclty including the files into your game project.\n\nIf you wish to use premake, you will need to download the Premake5 executable for your platform from. https://premake.github.io/download\n\n# Setup\n\nUsing 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.\n```\n#include \"rlImGui.h\"\t// include the API header\n\n// before your game loop\nrlImGuiSetup(true); \t// sets up ImGui with ether a dark or light default theme\n\n// inside your game loop, between BeginDrawing() and EndDrawing()\nrlImGuiBegin();\t\t\t// starts the ImGui content mode. Make all ImGui calls after this\n\nrlImGuiEnd();\t\t\t// ends the ImGui content mode. Make all ImGui calls before this\n\n// after your game loop is over, before you close the window\n\nrlImGuiShutdown();\t\t// cleans up ImGui\n```\n\n# Examples\nThere are two example programs in the examples folder.\n\n## Simple\nThis is the most simple use of ImGui in raylib, it just shows the ImGui demo window.\n![image](https://user-images.githubusercontent.com/322174/136596910-da1b60ae-4a39-48f0-ae84-f568bc396870.png)\n\n\n## Editor\nThis is a more complex example of ImGui, showing how to use raylib 2d and 3d cameras to draw into ImGui windows using render textures.\n![image](https://user-images.githubusercontent.com/322174/136596949-033ffe0a-2476-4030-988a-5bf5b6e2ade7.png)\n\n# Extras\n\n## rlImGuiColors.h\nThis file has a converter to change Raylib colors into ImGui Colors\n\n## Font Awesome Icons\nSupport for Font Awesome 6 https://fontawesome.com/ is built into rlImGui and enabled by default. You can simply\n#include \"extras/IconsFontAwesome6.h\"\nTo use the ICON_FA macros for any icon in the free set.\n\nIf you wish to disable font awesome support you can #define NO_FONT_AWESOME\n\n\n# Images\nRaylib textures can be drawn in ImGui using the following functions\n```\nvoid rlImGuiImage(const Texture *image);\nvoid rlImGuiImageSize(const Texture *image, int width, int height);\nvoid rlImGuiImageSizeV(const Texture* image, Vector2 size);\nvoid rlImGuiImageRect(const Texture* image, int destWidth, int destHeight, Rectangle sourceRect);\nvoid rlImGuiImageRenderTexture(const RenderTexture* image);\nvoid rlImGuiImageRenderTextureFit(const RenderTexture* image, bool center);\n\nbool rlImGuiImageButton(const Texture *image);\nbool rlImGuiImageButtonSize(const char* name, const Texture* image, Vector2 size);\n```\n\n# C vs C++\nImGui is a C++ library, so rlImGui uses C++ to create the backend and integration with Raylib.\nThe rlImGui.h API only uses features that are common to C and C++, so rlImGui can be built as a static library and used by pure C code. Users of ImGui who wish to use pure C must use an ImGui wrapper, such as [https://github.com/cimgui/cimgui].\n\n# Low level API\nIf you would like more controll over the ImGui Backend, you can use the low level API that is found in imgui_impl_raylib.h. This is API follows the patterns of other ImGui backends and does not do automatic context management. An example of it's use can be found in imgui_style_example.cpp \n\n# Note for High DPI displays\nIf your system does a display scale, like 125% or %150, you will write code to handle that.\nIf you set the FLAG_WINDOW_HIGHDPI flag in raylib, that will create a frame buffer that is automatically scaled to fit your display. This makes it easy to define all your code in a 'normal' resolution, but has the disadvantage of making it harder to define other bufers in the native resolution. The most common side effect of this is that fonts look blury, because they are rendered at the non scaled resolution.\nrlImGui on non-apple platforms will scale the default fonts by the display scale to compensate, but if you have your own fonts, you will need to do the same.\nNote that apple platforms have several driver bugs with high DPI (retena displays), and rlImGui tries to compensate for them, but your results may vary or be inconsistent with other platforms.\n\nThe better option is to not use FLAG_WINDOW_HIGHDPI and let raylib run in the native resolution. You should then scale all your input values by GetWindowDPIScale.\n\nSome examples show how to scale hardcoded values by the display scale to compensate and make your GUI look good in any scale.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraylib-extras%2FrlImGui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraylib-extras%2FrlImGui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraylib-extras%2FrlImGui/lists"}