38 lines
774 B
C++
38 lines
774 B
C++
#pragma once
|
|
|
|
#include "GLExtensions.h"
|
|
#include "../../runtime/RuntimeShaderArtifact.h"
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
struct RuntimePreparedShaderProgram
|
|
{
|
|
std::string layerId;
|
|
std::string shaderId;
|
|
std::string passId;
|
|
std::string sourceFingerprint;
|
|
RuntimeShaderArtifact artifact;
|
|
RuntimeShaderPassArtifact passArtifact;
|
|
std::vector<std::string> inputNames;
|
|
std::string outputName;
|
|
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;
|
|
}
|
|
};
|