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.
70 lines
1.4 KiB
70 lines
1.4 KiB
5 years ago
|
Content-Type: text/x-zim-wiki
|
||
|
Wiki-Format: zim 0.4
|
||
|
Creation-Date: 2020-02-03T23:30:41-08:00
|
||
|
|
||
|
====== CanvasState ======
|
||
|
|
||
5 years ago
|
[[/doc/sfml_rust/canvas/canvas_state/struct.CanvasState.html|Documentation]]
|
||
5 years ago
|
|
||
|
===== Details =====
|
||
|
|
||
|
The gist of this class is basically draw everything 2D and have all the resources to do so. It holds binary buffer blobs for resources, it's own compiled shaders, render_pass, and all of the vertex buffers in order to draw those binary buffer blobs.
|
||
|
|
||
|
**window_size_dependent_setup** is currently hosted inside this class. If a second graphics class is added I will add some shared library for this to live.
|
||
|
|
||
5 years ago
|
**render_pass **the render pass is created with our depth stencil/color data **D32Sfloat_S8Uint **attachment for the render output. This is highly shader dependent. Also depends on the DynamicState
|
||
5 years ago
|
|
||
|
|
||
|
===== Interface =====
|
||
|
|
||
|
Generally there is a get for handle and pointer and a load (or create) for each of the stored items.
|
||
|
|
||
|
The class then interacts with these stored items by taking and executing a list of operations to perform on them.
|
||
|
|
||
|
CanvasFrame
|
||
5 years ago
|
Going to need some interface for getting vertices.
|
||
|
Some interface for getting the texture or image
|
||
|
|
||
5 years ago
|
|
||
|
--------------------
|
||
|
|
||
|
===== Data =====
|
||
|
|
||
|
**Borrowed:**
|
||
|
queue
|
||
|
device
|
||
|
|
||
|
**Owns:**
|
||
|
render_pass
|
||
|
[[CanvasImage]]
|
||
5 years ago
|
[[VKProcessor:CanvasTexture]]
|
||
5 years ago
|
[[CanvasFont]]
|
||
|
CompiledGraphicsPipeline
|
||
|
colored_vertex_buffer
|
||
|
image_vertex_buffer
|
||
|
text_instances
|
||
|
|
||
|
--------------------
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|