restructure
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "GLExtensions.h"
|
||||
#include "../../runtime/RuntimeShaderArtifact.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
struct RuntimePreparedShaderProgram
|
||||
{
|
||||
std::string layerId;
|
||||
std::string shaderId;
|
||||
std::string sourceFingerprint;
|
||||
RuntimeShaderArtifact artifact;
|
||||
GLuint program = 0;
|
||||
GLuint vertexShader = 0;
|
||||
GLuint fragmentShader = 0;
|
||||
bool succeeded = false;
|
||||
std::string error;
|
||||
|
||||
void ReleaseGl()
|
||||
{
|
||||
if (program != 0)
|
||||
glDeleteProgram(program);
|
||||
if (vertexShader != 0)
|
||||
glDeleteShader(vertexShader);
|
||||
if (fragmentShader != 0)
|
||||
glDeleteShader(fragmentShader);
|
||||
program = 0;
|
||||
vertexShader = 0;
|
||||
fragmentShader = 0;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user