mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[Fix]: fix glmark2 crash
- deal with legacy GLSL syntax (attribute/varying/gl_FragColor/texture2D/etc.) - implement glGet GL_SHADER_SOURCE_LENGTH, and make sure returns original shader source - expose proper extensions (GL_ARB_depth_texture) - support env var MOBILEGL_LOG_FILE_PATH - unit tests to test against those changes
This commit is contained in:
@@ -58,8 +58,14 @@ namespace MobileGL {
|
||||
|
||||
void InitFile() {
|
||||
#if MOBILEGL_LOG_ENABLE_FILE
|
||||
if (!s_logFile && MOBILEGL_LOG_FILE_PATH && *MOBILEGL_LOG_FILE_PATH) {
|
||||
s_logFile = std::fopen(MOBILEGL_LOG_FILE_PATH, "w");
|
||||
if (!s_logFile) {
|
||||
const char* logPath = std::getenv("MOBILEGL_LOG_FILE_PATH");
|
||||
if (!logPath || !*logPath) {
|
||||
logPath = MOBILEGL_LOG_FILE_PATH;
|
||||
}
|
||||
if (logPath && *logPath) {
|
||||
s_logFile = std::fopen(logPath, "w");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -118,4 +124,4 @@ namespace MobileGL {
|
||||
#endif
|
||||
}
|
||||
} // namespace MG_Util::Debug
|
||||
} // namespace MobileGL
|
||||
} // namespace MobileGL
|
||||
|
||||
Reference in New Issue
Block a user