Cycles: Code cleanup, make strict flags happy about disabled OSL

This commit is contained in:
Sergey Sharybin 2015-03-27 19:09:41 +05:00
parent d18e8ad1f3
commit 3d305b5a37
4 changed files with 27 additions and 18 deletions

View File

@ -543,6 +543,9 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
node = script_node;
}
#else
(void)b_data;
(void)b_ntree;
#endif
}
else if (b_node.is_a(&RNA_ShaderNodeTexImage)) {

View File

@ -653,6 +653,10 @@ void MeshManager::update_osl_attributes(Device *device, Scene *scene, vector<Att
}
}
}
#else
(void)device;
(void)scene;
(void)mesh_attributes;
#endif
}

View File

@ -860,75 +860,75 @@ void OSLCompiler::compile(OSLGlobals *og, Shader *shader)
#else
void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath)
void OSLCompiler::add(ShaderNode * /*node*/, const char * /*name*/, bool /*isfilepath*/)
{
}
void OSLCompiler::parameter(const char *name, float f)
void OSLCompiler::parameter(const char * /*name*/, float /*f*/)
{
}
void OSLCompiler::parameter_color(const char *name, float3 f)
void OSLCompiler::parameter_color(const char * /*name*/, float3 /*f*/)
{
}
void OSLCompiler::parameter_vector(const char *name, float3 f)
void OSLCompiler::parameter_vector(const char * /*name*/, float3 /*f*/)
{
}
void OSLCompiler::parameter_point(const char *name, float3 f)
void OSLCompiler::parameter_point(const char * /*name*/, float3 /*f*/)
{
}
void OSLCompiler::parameter_normal(const char *name, float3 f)
void OSLCompiler::parameter_normal(const char * /*name*/, float3 /*f*/)
{
}
void OSLCompiler::parameter(const char *name, int f)
void OSLCompiler::parameter(const char * /*name*/, int /*f*/)
{
}
void OSLCompiler::parameter(const char *name, const char *s)
void OSLCompiler::parameter(const char * /*name*/, const char * /*s*/)
{
}
void OSLCompiler::parameter(const char *name, ustring s)
void OSLCompiler::parameter(const char * /*name*/, ustring /*s*/)
{
}
void OSLCompiler::parameter(const char *name, const Transform& tfm)
void OSLCompiler::parameter(const char * /*name*/, const Transform& /*tfm*/)
{
}
void OSLCompiler::parameter_array(const char *name, const float f[], int arraylen)
void OSLCompiler::parameter_array(const char * /*name*/, const float /*f*/[], int /*arraylen*/)
{
}
void OSLCompiler::parameter_color_array(const char *name, const float f[][3], int arraylen)
void OSLCompiler::parameter_color_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/)
{
}
void OSLCompiler::parameter_vector_array(const char *name, const float f[][3], int arraylen)
void OSLCompiler::parameter_vector_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/)
{
}
void OSLCompiler::parameter_normal_array(const char *name, const float f[][3], int arraylen)
void OSLCompiler::parameter_normal_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/)
{
}
void OSLCompiler::parameter_point_array(const char *name, const float f[][3], int arraylen)
void OSLCompiler::parameter_point_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/)
{
}
void OSLCompiler::parameter_array(const char *name, const int f[], int arraylen)
void OSLCompiler::parameter_array(const char * /*name*/, const int /*f*/[], int /*arraylen*/)
{
}
void OSLCompiler::parameter_array(const char *name, const char * const s[], int arraylen)
void OSLCompiler::parameter_array(const char * /*name*/, const char * const /*s*/[], int /*arraylen*/)
{
}
void OSLCompiler::parameter_array(const char *name, const Transform tfm[], int arraylen)
void OSLCompiler::parameter_array(const char * /*name*/, const Transform /*tfm*/[], int /*arraylen*/)
{
}

View File

@ -252,6 +252,8 @@ ShaderManager *ShaderManager::create(Scene *scene, int shadingsystem)
{
ShaderManager *manager;
(void)shadingsystem; /* Ignored when built without OSL. */
#ifdef WITH_OSL
if(shadingsystem == SHADINGSYSTEM_OSL)
manager = new OSLShaderManager();