mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- test code removal.
This commit is contained in:
parent
a936629cec
commit
7cbffc7c14
1 changed files with 0 additions and 21 deletions
|
@ -212,27 +212,6 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
int texture_index = glGetUniformLocation(hShader, "texture2");
|
||||
if (texture_index > 0) glUniform1i(texture_index, 1);
|
||||
|
||||
|
||||
GLint binaryLength;
|
||||
void* binary;
|
||||
FILE* outfile;
|
||||
GLenum binaryFormat;
|
||||
//
|
||||
// Retrieve the binary from the program object
|
||||
//
|
||||
glGetProgramiv(hShader, GL_PROGRAM_BINARY_LENGTH, &binaryLength);
|
||||
binary = (void*)malloc(binaryLength);
|
||||
glGetProgramBinary(hShader, binaryLength, NULL, &binaryFormat, binary);
|
||||
|
||||
//
|
||||
// Cache the program binary for future runs
|
||||
//
|
||||
outfile = fopen(name, "wb");
|
||||
fwrite(binary, binaryLength, 1, outfile);
|
||||
fclose(outfile);
|
||||
free(binary);
|
||||
|
||||
|
||||
glUseProgram(0);
|
||||
return !!linked;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue