<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">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<br>
Sebastian <br>
<br>
</div>
<blockquote
cite="mid:CAO-SbSurgVRFcq4fSFUfCFmr2By2cR+EMDd4w8K_eKLayHmPvQ@mail.gmail.com"
type="cite">
<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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>