Skip to content

Prototype function gives error if it returns not void #4

@Neill3d

Description

@Neill3d

For example, this code returns error

GLSLShader
{

//
// Prototypes
//
vec3 Blend(in vec3 base, in vec3 blend);

}

GLSLShader global BlendNormal
{
vec3 Blend(in vec3 base, in vec3 blend) {
return blend;
}
}

This is one code works

GLSLShader
{

//
// Prototypes
//
void something();  // !! needs this function to make it work
vec3 Blend(in vec3 base, in vec3 blend);

}

GLSLShader global BlendNormal
{
vec3 Blend(in vec3 base, in vec3 blend) {
return blend;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions