3 releases
0.1.2 | Dec 6, 2020 |
---|---|
0.1.1 | Dec 6, 2020 |
0.1.0 | Dec 6, 2020 |
#2165 in Game dev
165KB
2K
SLoC
Rust-FNA3D
Re-exports of fna3d
See the repository for more information.
lib.rs
:
fna3d items in a hierarchy
Just a collection of re-exports.
Unexported items: fna3d::linked_version
Texture
GPU buffer
TODO: provide with derive
macro for vertices
Drawing
Rendering cycle
As described in crate::Device
, one rendering pass is as follows:
Device::clear
- for each draw call:
- (set shader matrix)
- apply pipeline
Device::apply_effect
(mojo::Effect
)Device::set_vertex_buffer_data
(crate::buf
)Device::verify_sampler
(pip::SamplerState
)Device::apply_vertex_buffer_bindings
(VertexBufferBinding
)Device::draw_indexed_primitives
: (range of vertex buffer and index buffer)
And call Device::swap_buffers
at the end of a frame.
Blending
Pipeline (SamplerState
+ DepthStencilState
+ RasterizerState
)
Rendering to frame buffer or offscreen (render target)
crate::Device::clear
is a pass action.
MojoShader
Window
Dependencies
~4.5–7MB
~166K SLoC