When using glslc --targe-env="vulkan1.1" -fentry-point="mainColor" test.frag
, I get the error
test.frag: error: Linking fragment stage: Missing entry point: Each stage requires one entry point
test.frag content :
#version 450
layout (location=0) in vec4 color;
layout (location=0) out vec4 fragColor;
void mainColor()
{
fragColor = color;
}
void mainWhite()
{
fragColor = vec4(1, 1, 1, 1);
}
What am I doing wrong ?
How to fix this compilation error ?
What am I doing wrong?
See Support multiple entry points in a single module #605:
and OpenGL Shading Language 4.60 Specification (HTML) - 3.8.2. Dynamically Uniform Expressions and Uniform Control Flow
How to fix this compilation error?
Declare the
main()
function.