You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trac3r-rust/notes/Home.txt

142 lines
3.8 KiB

5 years ago
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2020-02-03T22:11:42-08:00
====== Home ======
[[~/source/Trac3r-rust/doc/sfml_rust/index.html|Documentation Root]]
Main Systems:
[[~/source/Trac3r-rust/doc/sfml_rust/sprite/index.html|Spri]][[~/source/Trac3r-rust/doc/sfml_rust/sprite/index.html|te]]
[[VKProcessor:CanvasContainerClasses]]
Docs
[[VkProcessor]] [[~/source/Trac3r-rust/doc/sfml_rust/vkprocessor/struct.VkProcessor.html|===========]]
[[VKProcessor:CanvasState|CanvasState]] [[~/source/Trac3r-rust/doc/sfml_rust/canvas/canvas_state/index.html|===========]]
[[VKProcessor:DynamicVertex|DynamicVertex]] ===========
[[VKProcessor:CompuState|CompuState]] [[~/source/Trac3r-rust/doc/sfml_rust/compute/compu_state/struct.CompuState.html|===========]]
5 years ago
--------------------
=== Trac3r : A program to convert images to 2D toolpaths ===
TODO:
+ Text rendering is half implemented.
+ Need generalized interface for render (image, texture, text)
+ Currently using local copies of a few libraries:
shade_runner
vulkano/vulkano-win
vulkano/vulkano-shaders
vulkano/vulkano
--------------------
====== Warming Up ======
Currently I'm getting my bearings again on this project.
=== canvas ===
I made a maybe(?) good change to the heirarchy of the canvas. Hiding the construction of handles from anything outside.
Currently, canvas is separated out to
* A state container: CanvasState
* An Interface class CanvasFrame
* `Managed` objects. Aka, everything that CanvasState holds
CanvasText is just laying around until I use it...
Shader pipeline objects exists in one level of managed
Handle and Buffer objects exists in the base managed level
== Do I commit to the all handles in handles.rs? ==
FYI The shader API is actually pretty badass
load_shader::<GenericShader, ColorVertex2D>("shadername", a, b);
--------------------
So right now it looks like I am having some trouble in the drawing of the CanvasFrame I've crafted.
It is seriously just a Vector of VertexTypes. Which should be fine
--------------------
===== Links =====
Dynamic Keys in HashMap
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=b4630cf98afa88fc0fbffdb0112af1c1
VertexDefinition
https://github.com/tomaka/vulkano-examples/blob/81f5a4eb3c5f3fcc6a194d3c41e53b2bc66f7add/gltf/gltf_system.rs#L687-L795
pub enum Content {
Text(String),
Number(u32),
}
impl From for String {
fn wrap(self) {
Content::Text(self)
}
}
impl From for u32 {
fn wrap(self) {
Content::Number(self)
}
}
fn any_content<T>(value : T) where T : IntoContent {
let content : Content = value.wrap();
}
├── canvas
│   ├── canvas_frame.rs
│   ├── canvas_state.rs
│   ├── managed
│   │   ├── canvas_text.rs
│   │   ├── gpu_buffers.rs
│   │   ├── handles.rs
│   │   ├── mod.rs
│   │   └── shader
│   │   ├── dynamic_vertex.rs
│   │   ├── generic_shader.rs
│   │   ├── mod.rs
│   │   ├── shader_common.rs
│   │   └── text_shader.rs
│   └── mod.rs
├── compute
│   ├── compu_frame.rs
│   ├── compu_state.rs
│   ├── managed
│   │   ├── compu_buffer.rs
│   │   ├── compu_kernel.rs
│   │   ├── compu_sprite.rs
│   │   ├── handles.rs
│   │   └── mod.rs
│   └── mod.rs
├── main.rs
├── sprite.rs
├── util
│   ├── mod.rs
│   ├── timer.rs
│   ├── vertex_2d.rs
│   └── vertex_3d.rs
└── vkprocessor.rs
null)