<div dir="ltr"><div>Thank you very much, those hints did the job. <br><br></div><div>I will try to better explain my question the next time. I intended to disable the shader / program.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-25 9:10 GMT+01:00 Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Bruno,<br>
<br>
Your question is a bit vague. If you use a shader you have total
control over the colors. <br>
If my interpretation of your question is correct, you want to
disable the shader. There is no real "disable" it, you have to
bind a empty program instead. (simply don't assign any shader).<br>
<br>
Cheers<span class="HOEnZb"><font color="#888888"><br>
Sebastian <br>
<br>
</font></span></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>
<div>
<div>Hello,<br>
<br>
</div>
I have one single root node in my scene graph. I have a
vertex array and a color array. I susually use them in
conjunction to see my vertices with the original colors,
with<br>
<br>
ret->setColorArray(m_colors);<br>
ret->setColorBinding(osg::Geometry::BIND_PER_VERTEX);<br>
<br>
<br>
</div>
Now I am adding the option for custom shaders. This is done
with osg::Programs, and adding the program to the stateset of
the root node.<br>
<br>
osg::ref_ptr<osg::Program> program = new
osg::Program;<br>
program->setName(m_name);<br>
program->addShader(new osg::Shader(osg::Shader::VERTEX,
m_vertex));<br>
program->addShader(new
osg::Shader(osg::Shader::FRAGMENT, m_fragment));<br>
<br>
</div>
Now I want to reset this, and assign the original colors I have
in the color Array back again. How can I do this? Do I have to
create a new shader for applying the custom colors in the color
array? Or can I reset this in a simpler fashion?<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><span class=""><pre>_______________________________________________
osg-users mailing list
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</span></blockquote>
<p><br>
</p>
</div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>