mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-15 23:48:31 +00:00
updating copyrights and readme
This commit is contained in:
parent
5f441b7b1d
commit
62d1bc5d5c
@ -175,18 +175,7 @@
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
Copyright {2021} the imgui-rs developers
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2020 The imgui-rs Developers
|
||||
Copyright (c) 2015-2021 The imgui-rs Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
[](https://github.com/imgui-rs/imgui-rs/actions)
|
||||
[](https://crates.io/crates/imgui)
|
||||
[](https://docs.rs/imgui)
|
||||
[](https://github.com/ocornut/imgui)
|
||||
[](https://github.com/ocornut/imgui)
|
||||
|
||||
(Recently under new maintenance, things subject to change)
|
||||
|
||||
@ -28,20 +28,24 @@ Window::new("Hello world")
|
||||
## Main library crates
|
||||
|
||||
- imgui: High-level safe API
|
||||
- imgui-glium-renderer: Renderer implementation that uses the `glium` crate
|
||||
- imgui-gfx-renderer: Renderer implementation that uses the `gfx` crate (_not
|
||||
the new gfx-hal crate_)
|
||||
- imgui-winit-support: Backend platform implementation that uses the `winit`
|
||||
crate (latest by default, but earlier versions are supported via feature flags)
|
||||
- imgui-glow-renderer: Renderer implementation that uses the `imgui` crate
|
||||
- imgui-glium-renderer: Renderer implementation that uses the `glium` crate
|
||||
- imgui-sys: Low-level unsafe API (automatically generated)
|
||||
|
||||
Additionally, the following are no longer maintained, but might work still:
|
||||
|
||||
- imgui-gfx-renderer: Renderer implementation that uses the `gfx` crate (_not
|
||||
the new gfx-hal crate_)
|
||||
|
||||
## Features
|
||||
|
||||
- Bindings for Dear ImGui that can be used with safe Rust. Note: API coverage
|
||||
is not 100%, but will keep improving over time.
|
||||
- Builder structs for use cases where the original C++ library uses optional
|
||||
function parameters
|
||||
- Easy integration with Glium / pre-ll gfx (renderer)
|
||||
- Easy integration with `glow`/ `glium`
|
||||
- Easy integration with winit (backend platform)
|
||||
- Optional support for the freetype font rasterizer
|
||||
|
||||
@ -72,10 +76,10 @@ responsibilities include the following:
|
||||
|
||||
The most tested platform/renderer combination is `imgui-glium-renderer` +
|
||||
`glium` + `imgui-winit-support` + `winit`, but this is not the only possible
|
||||
combination. There's also `imgui-gfx-renderer`, and you can find additional 3rd
|
||||
party crates that provide a wider support for more libraries (e.g. raw OpenGL,
|
||||
SDL2). You can also write your own support code if you have a more advanced use
|
||||
case, because **imgui-rs is not tied to any specific graphics / OS API**.
|
||||
combination. There's also `imgui-glow-renderer`, which will increasingly replace
|
||||
`glium`, and you can find additional 3rd party crates that provide a wider
|
||||
support for more libraries (e.g. raw OpenGL, SDL2). You can also write your own
|
||||
support code if you have a more advanced use case, because **imgui-rs is not tied to any specific graphics / OS API**.
|
||||
|
||||
## Compiling and running the demos
|
||||
|
||||
@ -85,7 +89,7 @@ cd imgui-rs
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Main examples are located in the imgui-examples directory.
|
||||
Main examples are located in the `imgui-examples` directory.
|
||||
|
||||
```bash
|
||||
# At the reposity root
|
||||
|
||||
@ -4,60 +4,69 @@ This document covers how to upgrade imgui-rs to a new version of the upstream C+
|
||||
|
||||
The process is much the same to build imgui-rs for a tagged release (as shown) as it is for any arbitrary revision (such as one on a different branch)
|
||||
|
||||
|
||||
## Step by step
|
||||
|
||||
1. Ensure the submodules are populated (`git submodule init` and `git submodule update --recursive`)
|
||||
|
||||
2. Check out the desired version of the `imgui-sys/third-party/imgui/` submodule
|
||||
|
||||
$ pwd
|
||||
.../imgui-sys/third-party/imgui
|
||||
$ git checkout v1.81
|
||||
Previous HEAD position was 58075c44 Version 1.80
|
||||
HEAD is now at 4df57136 Version 1.81
|
||||
```sh
|
||||
$ pwd
|
||||
.../imgui-sys/third-party/imgui
|
||||
$ git checkout v1.81
|
||||
Previous HEAD position was 58075c44 Version 1.80
|
||||
HEAD is now at 4df57136 Version 1.81
|
||||
```
|
||||
|
||||
3. Ensure `luajit` is installed, as this is required by cimgui's generator.
|
||||
|
||||
$ luajit --help
|
||||
$ luajit --help
|
||||
|
||||
4. Check out the `cimgui` project somewhere, as we use use the generator within this
|
||||
|
||||
$ git clone --recursive https://github.com/cimgui/cimgui.git /tmp/cimgui
|
||||
```sh
|
||||
git clone --recursive https://github.com/cimgui/cimgui.git /tmp/cimgui
|
||||
```
|
||||
|
||||
5. Ensure the `imgui` submodule within `cimgui` is pointing to the same revision as in `imgui-rs`
|
||||
|
||||
$ cd /tmp/cimgui/imgui
|
||||
$ git checkout v1.81
|
||||
HEAD is now at 4df57136 Version 1.81
|
||||
```sh
|
||||
$ cd /tmp/cimgui/imgui
|
||||
$ git checkout v1.81
|
||||
HEAD is now at 4df57136 Version 1.81
|
||||
```
|
||||
|
||||
6. Back in `imgui-rs/imgui-sys/third-party/` - run the `update-cimgui-output.sh` helper script to execute cimgui's generator
|
||||
|
||||
$ pwd
|
||||
.../imgui-sys/third-party
|
||||
$ ./update-cimgui-output.sh /tmp/cimgui/
|
||||
[...]
|
||||
copyfile ./output/cimgui.h ../cimgui.h
|
||||
copyfile ./output/cimgui.cpp ../cimgui.cpp
|
||||
all done!!
|
||||
```sh
|
||||
$ pwd
|
||||
.../imgui-sys/third-party
|
||||
$ ./update-cimgui-output.sh /tmp/cimgui/
|
||||
[...]
|
||||
copyfile ./output/cimgui.h ../cimgui.h
|
||||
copyfile ./output/cimgui.cpp ../cimgui.cpp
|
||||
all done!!
|
||||
```
|
||||
|
||||
This updates various files in the imgui-sys folder like `cimgui.cpp`, `definitions.json` and so on
|
||||
This updates various files in the imgui-sys folder like `cimgui.cpp`, `definitions.json` and so on
|
||||
|
||||
With this step, we now have new C bindings to the desired verison of Dear ImGui.
|
||||
With this step, we now have new C bindings to the desired verison of Dear ImGui.
|
||||
|
||||
7. Back in the root of the imgui-rs repo, run `cargo xtask bindgen`
|
||||
|
||||
$ cargo xtask bindgen
|
||||
```sh
|
||||
$ cargo xtask bindgen
|
||||
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
|
||||
Running `target/debug/xtask bindgen`
|
||||
Executing bindgen [output = .../imgui-rs/imgui-sys/src/bindings.rs]
|
||||
Success [output = .../imgui-rs/imgui-sys/src/bindings.rs]
|
||||
Executing bindgen [output = .../imgui-rs/imgui-sys/src/wasm_bindings.rs]
|
||||
Success [output = .../imgui-rs/imgui-sys/src/wasm_bindings.rs]
|
||||
Running `target/debug/xtask bindgen`
|
||||
Executing bindgen [output = .../imgui-rs/imgui-sys/src/bindings.rs]
|
||||
Success [output = .../imgui-rs/imgui-sys/src/bindings.rs]
|
||||
Executing bindgen [output = .../imgui-rs/imgui-sys/src/wasm_bindings.rs]
|
||||
Success [output = .../imgui-rs/imgui-sys/src/wasm_bindings.rs]
|
||||
```
|
||||
|
||||
This requires bindgen to be installed (`cargo install bindgen` should do it)
|
||||
This requires bindgen to be installed (`cargo install bindgen` should do it)
|
||||
|
||||
This step generates `imgui-sys/src/bindings.rs` which is used by `imgui/src/*`
|
||||
This step generates `imgui-sys/src/bindings.rs` which is used by `imgui/src/*`
|
||||
|
||||
8. Run `cargo build` and fix any errors caused by changes upstream (see next section)
|
||||
|
||||
@ -65,8 +74,9 @@ The process is much the same to build imgui-rs for a tagged release (as shown) a
|
||||
|
||||
10. Try running one of the examples
|
||||
|
||||
cargo run --example test_window_impl
|
||||
|
||||
```sh
|
||||
cargo run --example test_window_impl
|
||||
```
|
||||
|
||||
## Common sources of problems
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
name = "imgui-glow-renderer"
|
||||
version = "0.7.0"
|
||||
edition = "2018"
|
||||
authors = ["The imgui-rs Developers"]
|
||||
authors = ["jmaargh and the imgui-rs Developers"]
|
||||
description = "glow renderer for the imgui crate"
|
||||
homepage = "https://github.com/imgui-rs/imgui-rs"
|
||||
repository = "https://github.com/imgui-rs/imgui-rs"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user