-
Notifications
You must be signed in to change notification settings - Fork 1
/
utils.h
73 lines (59 loc) · 1.27 KB
/
utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef UTILS_H_INCLUDED
#define UTILS_H_INCLUDED
/*
*
* This is aheader file for some useful code.
*
*/
/*
*
* Include files for Windows, Linux and OSX
* __APPLE is defined if OSX, otherwise Windows and Linux.
*
*/
#ifdef __APPLE__
#ifndef GLFW_INCLUDE_GLCOREARB
#define GLFW_INCLUDE_GLCOREARB 1
#endif
#include <GLFW/glfw3.h>
#else
#include "opengl.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <vector>
#include <map>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <assert.h>
void Check(const char *);
char* filetobuf(char *file);
void CheckShader(int sp, const char *x); // New to check shader program
/*
Helper routines
*/
void print(glm::vec2 x);
void print(glm::mat2 x);
void print(glm::vec3 x);
void print(glm::mat3 x);
void print(glm::vec4 x);
void print(glm::mat4 x);
void print(const char *x);
void print(float x);
void print(int x);
void Print(glm::vec2 x);
void Print(glm::mat2 x);
void Print(glm::vec3 x);
void Print(glm::mat3 x);
void Print(glm::vec4 x);
void Print(glm::mat4 x);
void Print(const char *x);
void Print(float x);
void Print(int x);
void Print(void);
void delay(unsigned long ms);
char* filetobuf(char *file);
#endif // UTILS_H_INCLUDED