File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 99#include " ShaderEngine.hpp"
1010#include " BeatDetect.hpp"
1111
12- #define GLSL_VERSION " 410"
12+ #ifdef USE_GLES
13+ #define GLSL_VERSION " 300 es"
14+ #else
15+ #define GLSL_VERSION " 410"
16+ #endif
1317
1418std::string v2f_c4f_vert (
1519 " #version "
@@ -94,6 +98,7 @@ ShaderEngine::ShaderEngine()
9498 SetupCg ();
9599#endif
96100
101+ // glValidateProgram needs a VAO for its checks
97102 GLuint m_temp_vao;
98103 glGenVertexArrays (1 , &m_temp_vao);
99104 glBindVertexArray (m_temp_vao);
@@ -105,6 +110,8 @@ ShaderEngine::ShaderEngine()
105110 UNIFORM_V2F_C4F_VERTEX_POINT_SIZE = glGetUniformLocation (programID_v2f_c4f, " vertex_point_size" );
106111 UNIFORM_V2F_C4F_T2F_VERTEX_TRANFORMATION = glGetUniformLocation (programID_v2f_c4f_t2f, " vertex_transformation" );
107112 UNIFORM_V2F_C4F_T2F_FRAG_TEXTURE_SAMPLER = glGetUniformLocation (programID_v2f_c4f_t2f, " texture_sampler" );
113+
114+ glDeleteVertexArrays (1 , &m_temp_vao);
108115}
109116
110117ShaderEngine::~ShaderEngine ()
You can’t perform that action at this time.
0 commit comments