-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from Zardoz89/fix_osx
Close issue #53
- Loading branch information
Showing
12 changed files
with
389 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
// Basic Vertex Shader | ||
#version 140 | ||
// Basic Vertex Shader Template with Model, View, Project matrixes | ||
#version 140 | ||
|
||
in vec3 in_Position; | ||
in vec3 in_Color; | ||
in vec2 in_UV; | ||
|
||
uniform mat4 in_Model; | ||
uniform mat4 in_View; | ||
uniform mat4 in_Proj; | ||
|
||
out vec3 ex_Color; | ||
|
||
void main(void) { | ||
gl_Position.xyz = in_Position.xyz; | ||
gl_Position.w = 1.0; | ||
out vec2 ex_UV; | ||
|
||
ex_Color = vec3(1.0, 0.0, 0.0); | ||
void main(void) { | ||
gl_Position = in_Proj * (in_View * (in_Model * vec4(in_Position, 1.0))); | ||
ex_Color = vec3(in_Color); | ||
ex_UV = in_UV; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Trillek Virtual Computer - glerror.hpp | ||
* Function/macros to debug OpenGL code | ||
*/ | ||
|
||
#ifndef __TR_GL_ERROR_HPP_ | ||
#define __TR_GL_ERROR_HPP_ 1 | ||
|
||
namespace trillek { | ||
/** | ||
* Check if there is a OpenGL error and display it | ||
* @param file Source file | ||
* @param line Source line | ||
*/ | ||
void tr_check_gl_error(const char *file, int line); | ||
} // End of namespace trillek | ||
|
||
#ifndef NDEBUG | ||
/** | ||
* Usage | ||
* [... some opengl calls] | ||
* glCheckError(); | ||
*/ | ||
#define check_gl_error() trillek::tr_check_gl_error(__FILE__,__LINE__) | ||
|
||
#else | ||
|
||
#define check_gl_error() | ||
|
||
#endif | ||
|
||
#endif // __TR_GL_ERROR_HPP_ | ||
|
Oops, something went wrong.