[osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-16 Thread Dae Woo Ryu
Hi, As shown in the code below, I get the geometry information from the model of Openflight(.flt) format and move the coordinates of the vertices. But the texture doesn't move. How can I move a texture? **main** Code: ... osg::ref_ptr model = osgDB::readNodeFile("test/env_cloud.flt"); coneU

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-17 Thread Voerman, L.
Hi Dae, add _coord->dirty() after modification. Laurens. On Tue, Sep 17, 2019 at 3:16 AM Dae Woo Ryu wrote: > Hi, > > As shown in the code below, > I get the geometry information from the model of Openflight(.flt) format > and move the coordinates of the vertices. > But the texture doesn't move.

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-17 Thread Ulrich Hertlein
Hi Dae, On 17/9/19 03:16, Dae Woo Ryu wrote: > As shown in the code below, > I get the geometry information from the model of Openflight(.flt) format and > move the coordinates of the vertices. > But the texture doesn't move. > How can I move a texture? Depending on what you are trying to achie

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-17 Thread Dae Woo Ryu
hi Laurens. Thank you for the your reply. I've tried adding dirty() and it still doesn't work. Code: virtual void operator()(osg::Node*, osg::NodeVisitor* nv) { if (nv->getFrameStamp()) { _coord = dynamic_cast(_geom->getTexCoordArray(0));

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-17 Thread Trajce Nikolov NICK
You may need to call _coord->getBufferObject()->dirty() and do it outside of the for loop On Wed, Sep 18, 2019, 02:34 Dae Woo Ryu wrote: > hi Laurens. > Thank you for the your reply. > > I've tried adding dirty() and it still doesn't work. > > Code: > > virtual void operator()(osg::Node*, osg::N

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-20 Thread Dae Woo Ryu
hi NICK. Thank you for your reply. I did what you tried and nothing changed. Can you tell me another way? Here is the code I did. Code: virtual void operator()(osg::Node*, osg::NodeVisitor* nv) { if (nv->getFrameStamp()) { if (_coord

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-20 Thread Trajce Nikolov NICK
Hi, I don't think you should call _geom->setUseVertexBufferObjects(true); here. I bet the flt plugin is setting this on creation time. If you have a use case code you can share and the model it will help more for me to see what is going on On Fri, Sep 20, 2019 at 10:19 AM Dae Woo Ryu wrote: >

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-23 Thread Trajce Nikolov NICK
Here you go https://pastebin.com/2uuUC2zL Let me know if the url works for you. Otherwise I will post it here On Mon, Sep 23, 2019 at 8:57 AM Dae Woo Ryu wrote: > Hi, Nick > > The reason I did _geom-> setUseVertexBufferObjects (true) was because the > return value of _coord->getBufferObject()

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-24 Thread Dae Woo Ryu
Hi, Nick Thanks to you, I got a lot of knowledge. This time the Texture is moving as I want. Thank you so much. Have a good Time Trajce Nikolov NICK wrote: > Here you go > > > https://pastebin.com/2uuUC2zL (https://pastebin.com/2uuUC2zL) > > > Let me know if the url works for you. Otherw

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-24 Thread Trajce Nikolov NICK
Cool! I just revisited the part of the code to set the texture parameters and here is how it should be set more efficiently and more proper if the model have assigned texture attribute on any level in the scenegraph https://pastebin.com/P9z98FYS On Wed, Sep 25, 2019 at 3:14 AM Dae Woo Ryu wrote