X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vg%2Fvg_platform.h;h=24882841f007746d2d1642538fa904936f6bbda8;hb=18aa936b41a102700b6fc9fc9f0ac49712a0fced;hp=bc610f6b9192f8818426e58c334a23d581430848;hpb=f17b92e32e2edae3692d5ea87844fbdf4a779952;p=fishladder.git diff --git a/vg/vg_platform.h b/vg/vg_platform.h index bc610f6..2488284 100644 --- a/vg/vg_platform.h +++ b/vg/vg_platform.h @@ -11,8 +11,22 @@ typedef int64_t i64; typedef unsigned int uint; -#define vg_min( A, B ) ((A)<(B)?(A):(B)) -#define vg_max( A, B ) ((A)>(B)?(A):(B)) +typedef int v2i[2]; +typedef int v3i[3]; +typedef int v4i[4]; +typedef float v2f[2]; +typedef float v3f[3]; +typedef float v4f[4]; +typedef v2f m2x2f[2]; +typedef v3f m3x3f[3]; +typedef v3f m4x3f[4]; +typedef v3f boxf[2]; + +// Resource types +typedef struct vg_tex2d vg_tex2d; + +#define vg_static_assert _Static_assert + #define vg_list_size( A ) (sizeof(A)/sizeof(A[0])) // THREADING @@ -24,7 +38,7 @@ typedef unsigned int uint; #define MUTEX_TYPE HANDLE #define MUTEX_INITIALIZER NULL #define MUTEX_SETUP(x) (x) = CreateMutex(NULL, FALSE, NULL) - #define MUTEX_CLEANUP(x) (CloseHandle(x)) + #define MUTEX_CLEANUP(x) (CloseHandle(x)) //TODO: Why is this defined but never used? #define MUTEX_LOCK(x) emulate_pthread_mutex_lock(&(x)) #define MUTEX_UNLOCK(x) (ReleaseMutex(x))