-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.h
More file actions
72 lines (66 loc) · 2.29 KB
/
Copy pathutils.h
File metadata and controls
72 lines (66 loc) · 2.29 KB
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
////////////////////////////////////////////////////////////////////////////////
//3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
//
// A test trying out OpenGL 3.x's transform-feedback feature with some SDL2.x
// glue code to make it work on multiple platforms
//
// Copyright 2015-2016 Mirco Müller
//
// Author(s):
// Mirco "MacSlow" Müller <macslow@gmail.com>
//
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License version 3, as published
// by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranties of
// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
// PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program. If not, see <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
#ifndef _UTILS_H
#define _UTILS_H
#include <iostream>
#include <list>
#include <sstream>
#include <iterator>
#include <cassert>
#include <cmath>
#include <SDL.h>
#include <SDL_image.h>
#include <GL/glew.h>
#define GLSL(src) "#version 130\n" #src
void frustum (float a,
float b,
float c,
float d,
float e,
float g,
float* out);
void perspective (float a,
float b,
float c,
float d,
float* out);
void ortho (float left,
float right,
float bottom,
float top,
float nearVal,
float farVal,
float* out);
void checkGLError (const char* func);
void dumpGLInfo ();
GLuint createTexture (const char* filename);
GLuint loadShader (const char *src, GLenum type);
GLuint createShaderProgram (const char* vertexShaderSrc,
const char* fragmentShaderSrc,
bool link);
void linkShaderProgram (GLuint progId);
GLuint createVBO (GLsizeiptr size, const GLvoid* data, GLenum usage);
void updateVBO (GLuint vbo, GLsizeiptr size, const GLvoid* data, GLenum usage);
#endif // _UTILS_H