fix: android comptatibility
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
ShaderProgram::ShaderProgram() :
|
||||
programID(0), vertexShaderID(0), fragmentShaderID(0) {
|
||||
}
|
||||
@@ -112,6 +116,9 @@ int ShaderProgram::loadShader(const std::string& source, GLenum type) {
|
||||
char error[size];
|
||||
glGetShaderInfoLog(shaderID, size, &size, error);
|
||||
std::cout << error << std::endl;
|
||||
#ifdef ANDROID
|
||||
__android_log_print(ANDROID_LOG_ERROR, "TRACKERS", "Could not compile shader !\n %s", error);
|
||||
#endif
|
||||
}
|
||||
return shaderID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user