Clean up
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m55s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
Aiden
2026-05-12 18:03:54 +10:00
parent f43b6f6519
commit 5fb4607d8c
2 changed files with 0 additions and 37 deletions

View File

@@ -37,41 +37,6 @@ RuntimeShaderRenderer::~RuntimeShaderRenderer()
ShutdownGl(); ShutdownGl();
} }
bool RuntimeShaderRenderer::CommitFragmentShader(const std::string& fragmentShaderSource, std::string& error)
{
RuntimeShaderArtifact artifact;
artifact.shaderId = "runtime-fragment";
artifact.displayName = "Runtime Fragment";
artifact.fragmentShaderSource = fragmentShaderSource;
return CommitShaderArtifact(artifact, error);
}
bool RuntimeShaderRenderer::CommitShaderArtifact(const RuntimeShaderArtifact& artifact, std::string& error)
{
if (artifact.fragmentShaderSource.empty())
{
error = "Cannot commit an empty fragment shader.";
return false;
}
if (!EnsureStaticGlResources(error))
return false;
GLuint vertexShader = 0;
GLuint fragmentShader = 0;
GLuint program = 0;
if (!BuildProgram(artifact.fragmentShaderSource, program, vertexShader, fragmentShader, error))
return false;
DestroyProgram();
mProgram = program;
mVertexShader = vertexShader;
mFragmentShader = fragmentShader;
mArtifact = artifact;
AssignSamplerUniforms(mProgram);
return true;
}
bool RuntimeShaderRenderer::CommitPreparedProgram(RuntimePreparedShaderProgram& preparedProgram, std::string& error) bool RuntimeShaderRenderer::CommitPreparedProgram(RuntimePreparedShaderProgram& preparedProgram, std::string& error)
{ {
if (!preparedProgram.succeeded || preparedProgram.program == 0) if (!preparedProgram.succeeded || preparedProgram.program == 0)

View File

@@ -16,8 +16,6 @@ public:
RuntimeShaderRenderer& operator=(const RuntimeShaderRenderer&) = delete; RuntimeShaderRenderer& operator=(const RuntimeShaderRenderer&) = delete;
~RuntimeShaderRenderer(); ~RuntimeShaderRenderer();
bool CommitFragmentShader(const std::string& fragmentShaderSource, std::string& error);
bool CommitShaderArtifact(const RuntimeShaderArtifact& artifact, std::string& error);
bool CommitPreparedProgram(RuntimePreparedShaderProgram& preparedProgram, std::string& error); bool CommitPreparedProgram(RuntimePreparedShaderProgram& preparedProgram, std::string& error);
bool HasProgram() const { return mProgram != 0; } bool HasProgram() const { return mProgram != 0; }
void UpdateArtifactState(const RuntimeShaderArtifact& artifact); void UpdateArtifactState(const RuntimeShaderArtifact& artifact);