Hi Robert,
Yes, I am indeed changing the texcoord array at the indices relevant to the
part of the geometry I am texturing. :o
You can indeed see in the code that I am accessing the texArray using
(*texArray)[idx] ... which is actually short for
Code:
(*texArray)[ (*indices)[id] ]
8)
Hi Florian,
On 7 July 2016 at 15:02, Florian Castellane
wrote:
> I am modifying some indices of a texture coordinate array that correspond to
> a subset of my floor that is divided into several parts (here, we are working
> on the center part. Other
Hi everyone, thanks for the tips.
@Sebastian:
Code:
geometry->getPrimitiveSet(0)->setDataVariance(DataVariance::DYNAMIC) ;
did not solve the problem unfortunately. As Robert points out, I'm not sure
that is the problem here.
@Trajce:
Code:
texArray->getVertexBufferObject()->dirty();
Hi Florian,
I read your post but came away confused about what your are doing/how
you are going about things.
As a general note, DataVariance is not used in compile or uploading of
OpenGL data, just in giving hints to the operations like in
osgUtil::Optimizer or in the draw traversal for holding
I think it was something like tcoords->getVertexBufferObject()->dirty();
On Thu, Jul 7, 2016 at 2:15 PM, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:
> Hi Florian,
>
>> Hi Sebastian, thanks for the answer.
>>
>> Calling texArray->dirty() does not seem to be enough, since my
Hi Florian,
Hi Sebastian, thanks for the answer.
Calling texArray->dirty() does not seem to be enough, since my texture is not
displayed. I can confirm that my shader is being applied though - it just doesn't
seem to get the texture coordinates.
My custom geometry class
Hi Sebastian, thanks for the answer.
Calling texArray->dirty() does not seem to be enough, since my texture is not
displayed. I can confirm that my shader is being applied though - it just
doesn't seem to get the texture coordinates.
My custom geometry class (MyNameSpace::MyGeometry) does
Hi Florian
Calling dirty on the modified array should be enough. Are you sure you
set the useDisplayList to false and the useVertexBufferObject to true?
You don't need to call setTexCoordArray unless you want to assign a
different array.
I don't quite recall if you need to set the datavariance
Greetings fellow OSG users :)
There is a detail in my code that I found disturbing:
Code:
void applyTextureToCenter( MyNameSpace::SpecificNode* floor )
{
MyNameSpace::MyGeode* center = floor->getCenterGeode() ;
osg::StateSet* stateSet = center->getOrCreateStateSet() ;
9 matches
Mail list logo