Merge pull request #361 from DrChat/misc_fixes

Misc fixes
This commit is contained in:
Ben Vanik
2015-07-21 20:22:00 -07:00
14 changed files with 246 additions and 149 deletions

View File

@@ -345,12 +345,13 @@ bool GL4Shader::CompileProgram(std::string source) {
// Note that we put the translated source first so we get good line numbers.
FILE* f = fopen(file_name, "w");
fprintf(f, "%s", translated_disassembly_.c_str());
fprintf(f, "\n\n");
fprintf(f, "/*\n");
fprintf(f, "%s", ucode_disassembly_.c_str());
fprintf(f, " */\n");
fclose(f);
if (f) {
fprintf(f, "%s", translated_disassembly_.c_str());
fprintf(f, "/*\n");
fprintf(f, "%s", ucode_disassembly_.c_str());
fprintf(f, " */\n");
fclose(f);
}
}
program_ = glCreateShaderProgramv(shader_type_ == ShaderType::kVertex