Crates.io | raylib_imgui_rs |
lib.rs | raylib_imgui_rs |
version | |
source | src |
created_at | 2024-11-15 22:19:47.76136 |
updated_at | 2024-12-02 00:14:15.436215 |
description | A Raylib integration with DearImGui in Rust! |
homepage | https://github.com/Fullbrik/raylib_imgui_rs |
repository | https://github.com/Fullbrik/raylib_imgui_rs |
max_upload_size | |
id | 1449675 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
[dependencies]
raylib_imgui_rs = "<Latest version here>"
use imgui::{Context, FontSource};
use raylib::prelude::*;
use raylib_imgui_rs::Renderer;
fn main() {
// Init raylib
let (mut rl, thread) = raylib::init()
.size(640, 480)
.title("Hello, World")
.build();
let mut imgui = Context::create();
imgui.fonts().add_font(&[FontSource::DefaultFontData { config: None }]);
let mut renderer = Renderer::create(&mut imgui, &mut rl, &thread);
while !rl.window_should_close() {
renderer.update(&mut imgui, &mut rl);
{
let ui = imgui.new_frame();
// Draw Imgui stuff here
}
{
let mut d = rl.begin_drawing(&thread);
d.clear_background(Color::WHITE);
// Draw raylib stuff here
renderer.render(&mut imgui, &mut d);
}
}
}