tlorach / nvFX

Generic Effect system for Graphic API's (OpenGL and DirectX)
280 stars 53 forks source link

Prototype function gives error if it returns not void #4

Open Neill3d opened 10 years ago

Neill3d commented 10 years ago

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