Added rect draw api
Added some new maths types Updated shaders to use new D_Rect structure Added rect buffers to frames Misc cleanup
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
V2f V2F(F32 x, F32 y) {
|
||||
V2f result = { x, y };
|
||||
return result;
|
||||
}
|
||||
|
||||
V3f V3F(F32 x, F32 y, F32 z) {
|
||||
V3f result = { x, y, z };
|
||||
return result;
|
||||
}
|
||||
|
||||
V4f V4F(F32 x, F32 y, F32 z, F32 w) {
|
||||
V4f result = { x, y, z, w };
|
||||
return result;
|
||||
}
|
||||
|
||||
R2f R2F(V2f min, V2f max) {
|
||||
R2f result = { min, max };
|
||||
return result;
|
||||
}
|
||||
|
||||
V3f V3f_Neg(V3f x) {
|
||||
V3f result = { -x.x, -x.y, -x.z };
|
||||
return result;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#define Assert(exp) assert(exp)
|
||||
#define StaticAssert(exp) static_assert(exp, #exp)
|
||||
|
||||
#define ArraySize(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#define Min(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
@@ -87,6 +87,18 @@ struct Mat4x4FInv {
|
||||
Mat4x4F inv;
|
||||
};
|
||||
|
||||
typedef struct R2f R2f;
|
||||
struct R2f {
|
||||
V2f min;
|
||||
V2f max;
|
||||
};
|
||||
|
||||
function V2f V2F(F32 x, F32 y);
|
||||
function V3f V3F(F32 x, F32 y, F32 z);
|
||||
function V4f V4F(F32 x, F32 y, F32 z, F32 w);
|
||||
|
||||
function R2f R2F(V2f min, V2f max);
|
||||
|
||||
function V3f V3f_Neg(V3f x);
|
||||
function V3f V3f_Scale(V3f x, F32 s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user