Natasha England-Elbro
3d2a53d133
feat: glam support
11 months ago
Natasha England-Elbro
34532ae6b9
feat: add helpful constructors to matrix4
11 months ago
Natasha England-Elbro
97a1d12dda
feat: improve uniform API and rewrite Matrix API
11 months ago
Natasha England-Elbro
44ed48d2eb
feat: API for IVec
11 months ago
Ian Chamberlain
ce54649014
Add favicons/icons to rustdoc
12 months ago
Ian Chamberlain
31272895d7
Fixup right-handed coordinates and projection API
...
Since it's a builder, we should really consume self and return Self
instead of using &mut self. This makes it easier to convert into the
final matrix at the end of building.
1 year ago
Ian Chamberlain
0fbd4418d8
Minor cleanups
1 year ago
Ian Chamberlain
30964ba57a
Build fix for libctru 2.2.x
1 year ago
Ian Chamberlain
c47c5a93eb
Clean up texenv API a bit and add some docs
1 year ago
Ian Chamberlain
0e02f90442
Initial texenv implementation
1 year ago
Ian Chamberlain
d2b65c8ff1
Add safe wrapper for C3D_BindProgram
1 year ago
Ian Chamberlain
1fe11ce5de
Add a bunch of doc aliases for unsafe APIs
1 year ago
Ian Chamberlain
e1bba068d7
Fix normalize doctests to use proper math
1 year ago
Ian Chamberlain
3174e66e7e
Swap to `approx` for comparisons
...
Hide this impl behind a feature, which is always enabled for testing but
disabled by default for downstream crates. This feels a bit tidier to me.
1 year ago
Ian Chamberlain
f770f504b0
Add approximate equal impls and tests
...
More doctests instead of libtests.
For now, just FVec4, but FVec4 and matrices coming next.
1 year ago
Ian Chamberlain
4cc9a649fc
More fixes for debug print + matrix equality
1 year ago
Ian Chamberlain
8b7e8fe71b
Refactor matrix into new module
...
Fix up a couple test bugs and do some other refactor / cleanup
1 year ago
Ian Chamberlain
e2abfa300a
Implement more matrix operations
...
Also simplify FVec operations since it's a Copy type, but keep using
references for Matrix implementations. Use type-safe matrix multiplication
with other matrices and vectors.
1 year ago
Ian Chamberlain
4e0fc5a409
Define matrix as MxN with const generics
1 year ago
Ian Chamberlain
8cd28b7ca5
Use float-cmp for nicer assertions
1 year ago
Ian Chamberlain
163a42cc47
Fixup some mistaken API usage and tests
1 year ago
Ian Chamberlain
a120178a6c
Implement FVec types + operators
1 year ago
Ian Chamberlain
65941f671c
Major refactor of projection API
...
Finally, something that I don't think totally sucks. Pick some sane
defaults for some fields, and use generics to split between
orthographic and perspective implementations. It's still not perfect but
I think this looks a lot more ergonomic to use vs what I had before (and
compared to the C APIs).
1 year ago
Ian Chamberlain
2b1e1db28b
Refactor matrix API and add doctests etc
...
Also add some doc aliases for citro3d functions. We could probably stand
to add more aliases to other wrappers too.
1 year ago
Ian Chamberlain
dcab5508f9
Use a simple trait for binding uniforms
...
It's not much but it should be extensible enough to apply for other
uniform types. We might want a generic impl for &[u8] or something
as well to support custom uniform types, but that gets trickier.
1 year ago
Ian Chamberlain
974ee2b742
Consolidate matrix construction API
1 year ago
Ian Chamberlain
7084a22764
Minor docs and error handling cleanup
1 year ago
Ian Chamberlain
2301e5022c
Start porting <c3d/maths.h>, vectors and matrices
1 year ago
Ian Chamberlain
a06dc14a86
Actually use test_runner::run_gdb (I forgor)
1 year ago
Ian Chamberlain
cb43d185ca
cargo fmt
1 year ago
Ian Chamberlain
4752c65f41
Rename to citro3d-macros
...
Export as pub mod macros, add tests, and refactor error handling a bit
to make the logic simpler.
1 year ago
Tamara Schmitz
827fc7b983
update module and symbol names to match ctru-rs
1 year ago
Ian Chamberlain
7d5cd29c5e
Add pica200::include_shader macro using picasso
1 year ago
Ian Chamberlain
e47c414069
Use proper stereo perspective projection
...
Read + use the OS 3D slider value when projecting left+right eyes, and
use a mono perspective projection for the bottom screen.
2 years ago
Ian Chamberlain
5eaab0760a
Add a ton more docs where missing
2 years ago
Ian Chamberlain
f65da50b68
Add attrib docstrings and update some names
2 years ago
Ian Chamberlain
b05a1e3ff3
Fix up a few remaining clippy errors
2 years ago
Ian Chamberlain
4fa59ada84
Update example for 3D and new gfx APIs
2 years ago
Ian Chamberlain
c4e1287d36
Try to rework buffer info to be less error-prone
2 years ago
Ian Chamberlain
ceacc3387d
Minor naming cleanups
2 years ago
Ian Chamberlain
a645ba14df
Move draw call to Instance
...
Also add some notes about error handling for adding VBO data
2 years ago
Ian Chamberlain
ec91f7d2fe
Use the lifetime of the input VBO data
...
We can return a "handle" that stores the index + size of the VBO data,
as well as keeping a phantom borrow on the original data. By requiring
this handle as input during the call to draw arrays, we ensure the VBO
data lives long enough for the draw call.
2 years ago
Ian Chamberlain
704f6e58b7
First pass of safe buffer info API
2 years ago
Ian Chamberlain
3a2b3f4ffe
Address review comments
2 years ago
Ian Chamberlain
894eb66806
Update ctru-rs APIs based on split screen PR
2 years ago
Ian Chamberlain
340a38489c
Update citro3d to use upstream ctru_sys types
2 years ago
Ian Chamberlain
5ffde47b85
Use RefMut and fix some lints
2 years ago
Ian Chamberlain
1d35a44ede
Add a screen member to render::Target
...
This ensures the screen lives longer than the render target, and also
makes it a little more convenient to get the color format.
2 years ago
Ian Chamberlain
6ba85149d8
Use bytemuck instead of incorrect align_to
...
Std docs say that prorgams should not rely on `align_to` to return empty
prefix/suffix for correctess, only performance. `bytemuck` on the other
hand deals with alignment for correctness so let's use that.
3 years ago
Ian Chamberlain
4492b2d293
Implement some basic shader program types
3 years ago