Add Sentry build tags (#3765)

This commit is contained in:
Adrian Cojocaru
2025-08-27 23:18:41 +03:00
committed by GitHub
parent afd95b5766
commit 426e519665
4 changed files with 39 additions and 6 deletions

View File

@@ -106,11 +106,15 @@ void checkCompileStatus(GLuint shader) {
GLint maxLength = 0;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &maxLength);
// The maxLength includes the NULL character
std::vector<GLchar> errorLog(maxLength);
glGetShaderInfoLog(shader, maxLength, &maxLength, errorLog.data());
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, errorLog.data());
throw Error(std::string(errorLog.begin(), errorLog.end()));
if (maxLength > 0) {
// The maxLength includes the NULL character
std::vector<GLchar> errorLog(maxLength + 1);
glGetShaderInfoLog(shader, maxLength, &maxLength, errorLog.data());
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, errorLog.data());
throw Error(std::string(errorLog.begin(), errorLog.end()));
} else {
throw Error("checkCompileStatus failed to get error string");
}
}
}