LearnJUCEOpenGL
LearnJUCEOpenGL copied to clipboard
Shader BinaryData include
This is a great project for introducing OpenGL concepts. I initially had a little trouble with with reading the shader files with the declared MainComponent::parse_shaders()
Issue
Shader files fail to load from MainComponent::parse_shaders()
Fix
Currently the shader files are checked in the producer project to compile
Suggested fix is to embed the shaders as a binary resource. They are then included in the JUCE Library Code
directory and accessible as BinaryData. This simplifies the shader parsing to
MainComponent::ShaderProgramSource MainComponent::parse_shaders()
{
return { BinaryData::Vert_vert, BinaryData::Frag_frag };
}