[−][src]Crate fna3d
Wrapper of FNA3D, the graphics library for FNA
See fna3h as an alternative.
See examples to get started.
What is fna3d
?
fna3d
is a wrapper around fna3d-sys
, which is Rust FFI to FNA3D generated with bindgen.
FNA3D is the 3D graphics library for FNA written in C99 in 2020. FNA is a reimplementation of XNA. XNA is a famous game framework.
What does Rust-FNA3D do?
Device
is reference counted and it drops FNA3D device when they go out of scope.
Other changes are trivial; they're just for improvements to the default output of bindgen
:
- Wrapping the original API with rusty types: slices, enums and booleans
- Wrapping some legacy API (XNA-compatibility API) with more meaningful one
Details are noted in this file on GitHub.
Re-exports
pub use bitflags; |
pub use fna3d_sys as sys; |
Modules
img |
|
mojo | MojoShader types and some helpers |
utils | Helpers |
Structs
BlendState | |
ClearOptions |
|
Color | 24 bits RGBA color |
DepthStencilState | Pipeline |
Device | FNA3D device |
RasterizerState | Pipeline |
RenderTargetBinding | Offscreen rendering |
SamplerState | Specifies texture sampling method |
SdlWindowFlags | Newtype of untyped SDL_WindowFlags, which is used for SDL_CreateWindow |
Enums
Blend |
|
BlendFunction |
|
BufferUsage | Vertex/index buffer component, which hints optimization of memory placement |
ColorWriteChannels |
|
CompareFunction |
|
CubeMapFace | Cube map texture data component |
CullMode |
|
DepthFormat |
|
DisplayOrientation |
|
FillMode |
|
IndexElementSize | 16 bits | 32 bits |
PresentInterval |
|
PrimitiveType | Specifies primitive type used for drawing |
RenderTargetType | 2D | Cube |
RenderTargetUsage |
|
SetDataOptions | How vertex or index buffer data will be flushed during a SetData operation. |
StencilOperation |
|
SurfaceFormat |
|
TextureAddressMode |
|
TextureFilter |
|
VertexElementFormat |
|
VertexElementUsage |
|
Functions
get_drawable_size | After your window is created, call this to check for high-DPI support. |
linked_version | Version of FNA3D in use |
prepare_window_attributes | Selects the most suitable graphics rendering backend for the system, then provides the application with context-sensitive bitflags for the OS window. |
Type Definitions
Buffer | Opaque struct that represents index or vertex buffer |
Effect | Opaque struct that represents FNA3D effect |
PresentationParameters | |
Query | Opaque object to run occlusion queries |
Rect | Scissor rect or region of |
Renderbuffer | Opaque struct that represents FNA3D render buffer |
Texture | Opaque struct that represents 2D or 3D texture data stored in GPU memory |
Vec4 | Used to represent color |
VertexBufferBinding |
|
VertexDeclaration |
|
VertexElement |
|
Viewport | The view bounds for render-target surface |