Files
video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/ShaderProgramCompiler.h
Aiden 08e039aebe
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 1m31s
CI / Windows Release Package (push) Successful in 2m6s
Shader compile thread seperation
2026-05-06 14:11:18 +10:00

25 lines
819 B
C++

#pragma once
#include "OpenGLRenderer.h"
#include "RuntimeHost.h"
#include "ShaderTextureBindings.h"
#include <string>
class ShaderProgramCompiler
{
public:
using LayerProgram = OpenGLRenderer::LayerProgram;
ShaderProgramCompiler(OpenGLRenderer& renderer, RuntimeHost& runtimeHost, ShaderTextureBindings& textureBindings);
bool CompileLayerProgram(const RuntimeRenderState& state, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage);
bool CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::string& fragmentShaderSource, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage);
bool CompileDecodeShader(int errorMessageSize, char* errorMessage);
private:
OpenGLRenderer& mRenderer;
RuntimeHost& mRuntimeHost;
ShaderTextureBindings& mTextureBindings;
};