<div dir="ltr">You should eitehr use OSL-1.6 or use our branch of OSL where we backported alignment fix to the 1.5.x series [1].<div><br></div><div>Mutex thing is hard to deduct from just a code, but see what&#39;s standalone Cycles does.</div><div><br></div><div>You can not create SVM or OSL shaders, you create shading node tree which is then being compiled with a shader compiler which corresponds to a shading system settings.</div><div><br></div><div>[1] <a href="https://github.com/Nazg-Gul/OpenShadingLanguage/tree/blender-fixes">https://github.com/Nazg-Gul/OpenShadingLanguage/tree/blender-fixes</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 1:39 AM, haggi krey <span dir="ltr">&lt;<a href="mailto:haggi@haggi.de" target="_blank">haggi@haggi.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, I&#39;ve done a smapp step forward. My cycles test still crashes at<br>
the end.<br>
But I wanted to build a complete scene, one triangle, one light, one camera.<br>
Unfortunatly I have no idea how to create and assing a new shader. My<br>
code looks like this:<br>
<br>
     Shader *shader = new Shader();<br>
     shader-&gt;name = &quot;diffuse_bsdf&quot;;<br>
     scene-&gt;shaders.push_back(shader);<br>
<br>
The standalone code is not really helpful with this. Shadingsystem is<br>
default what means SHADINGSYSTEM_SVM.<br>
So how do I correctly create a svm shader (or osl shader) and assign it<br>
to my triangle?<br>
Any hints would be nice.<br>
<div class="HOEnZb"><div class="h5"><br>
haggi<br>
<br>
_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div><span style="color:rgb(102,102,102)">With best regards, Sergey Sharybin</span></div></div>
</div>