graphics

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 3e9f66df4fb36a32eba35da53d64be5d4e0b2b15
parent 474dc21f6f628f90fc93b1059b8d44b2f0cc9634
Author: Brian Swetland <swetland@frotz.net>
Date:   Tue, 10 Sep 2013 04:55:22 -0700

matrix: trivial ivec4 type

Diffstat:
Mcommon/matrix.h | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/common/matrix.h b/common/matrix.h @@ -39,6 +39,20 @@ void __mat4_set_ortho(float m[16], float left, float right, class mat4; +struct ivec4 { + union { + int v[4]; + struct { + int x, y, z, w; + }; + }; + ivec4(int a, int b, int c, int d) : x(a), y(b), z(c), w(d) {}; + ivec4() {}; + void set(int a, int b, int c, int d) { + x = a; y = b; z = c; w = d; + }; +}; + class vec4 { union { float v[4];