Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype function gives error if it returns not void #4

Open
Neill3d opened this issue Apr 4, 2014 · 0 comments
Open

Prototype function gives error if it returns not void #4

Neill3d opened this issue Apr 4, 2014 · 0 comments

Comments

@Neill3d
Copy link

Neill3d commented Apr 4, 2014

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;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant