Archived
1
Fork 0
This repository has been archived on 2025-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
jgl-template/GLGameTemplate/myGL.h
2013-01-05 12:41:46 +01:00

35 lines
569 B
Objective-C

//
// myGL.h
// SkyRoads
//
// Created by Joshua Moerman on 12/22/12.
// Copyright (c) 2012 Vadovas. All rights reserved.
//
#ifndef SkyRoads_myGL_h
#define SkyRoads_myGL_h
#import <GLKit/GLKit.h>
#include <array>
namespace gl {
typedef std::array<GLfloat, 7> Vertex;
typedef std::array<Vertex, 8> Quad; //degenerate
Vertex translate(Vertex v, GLfloat x, GLfloat y, GLfloat z){
v[0] += x;
v[1] += y;
v[2] += z;
return v;
}
Vertex scale(Vertex v, GLfloat x, GLfloat y, GLfloat z){
v[0] *= x;
v[1] *= y;
v[2] *= z;
return v;
}
}
#endif