Fix vertex attributes (#527)

* Use proper enum types for vertex attributes descriptions

Positions, normals and texture coordinates are always given in integer
or floating point formats, never as RGB.
Also replace a couple of constants with sizeof().

* Use proper function names when specifying vertex attributes
This commit is contained in:
Alberto Mardegan 2025-01-14 21:29:03 +03:00 committed by GitHub
parent 3edd72d33e
commit 58925bcf5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 81 additions and 75 deletions

View file

@ -114,6 +114,12 @@ static inline void GXPosition3f32(const f32 x, const f32 y, const f32 z) {
GXWGFifo.f32 = z;
}
static inline void GXNormal3s16(const s16 x, const s16 y, const s16 z) {
GXWGFifo.s16 = x;
GXWGFifo.s16 = y;
GXWGFifo.s16 = z;
}
static inline void GXNormal3f32(const f32 x, const f32 y, const f32 z) {
GXWGFifo.f32 = x;
GXWGFifo.f32 = y;