<div dir="ltr"><div>HI Dae Woo Ryu,</div><div><br></div><div>The callback you have shown should be sufficient, but will require you to do a dirtyDisplayList() on the geomtry to get it to update if you have display lists enabled. I'd recommend disabling display lists for this type of work though, a call to geometry->setUseDisplayLists(false) should be sufficient.</div><div><br></div><div>However, if you are comfortable writing your own shaders by far the most efficient way to animate texture coordinates is to do it within the vertex shader. You can use the osg_SimulationTime uniform that the OSG provides to get the current time. Have a look at the OpenSceneGraph/examples/osgdrawinstanced/osgdrawinstanced.cpp to see an example of this in action.<br></div><div><br></div><div>Robert.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 30 Jul 2019 at 08:43, Dae Woo Ryu <<a href="mailto:osgforum@tevs.eu">osgforum@tevs.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi ,robertosfield<br>
<br>
Thank you for reply.<br>
<br>
<br>
I want to continue moving the Texture like the code below.<br>
<br>
But the coordinates of the texture do not seem to update continuously.<br>
<br>
I want the Texture to be updated continuously.<br>
<br>
<br>
Code:<br>
virtual void operator()(osg::Node*, osg::NodeVisitor* nv)<br>
{<br>
if (nv->getFrameStamp())<br>
{ <br>
_texcoords2 = dynamic_cast<osg::Vec2Array*>(_geom->getTexCoordArray(0));<br>
<br>
for (unsigned int u = 0; u < _texcoords2->size(); u++)<br>
{<br>
_texcoords2->at(u).x() += 0.001f;<br>
_texcoords2->at(u).y() += 0.001f; <br>
}<br>
<br>
<br>
<br>
....<br>
<br>
<br>
<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Dae Woo Ryu[/code]<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=76538#76538" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=76538#76538</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">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>
</blockquote></div>