[osg-users] using image data on CPU side, from GLSL imageStore().

2016-07-07 Thread Daniel Lazaroff
Greetings, I am attempting to retrieve data from an image being written to in a geometry shader. The image contains unsigned ints that are the result of calculations done in the geometry shader (stored using the GLSL imageAtomicMin()). I setup an osg::Image and a osg::Texture1D in a similar

Re: [osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Florian Castellane
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();

Re: [osg-users] using image data on CPU side, from GLSL imageStore().

2016-07-07 Thread Florian Castellane
Hi Daniel, Here's a hint to get you started (haven't done that myself just yet) You may need to render your data into a texture, then get that texture from the GPU to the CPU using Code: glGetTexImage . Hope this helps. Best regards, Florian -- Read this topic online here:

Re: [osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Robert Osfield
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

[osg-users] TRISTRIP_GEOMETRY optimiser for QUAD STRIP

2016-07-07 Thread Christos Chatzivagias
Hi, Is there any way to run an optimiser that creates QUADS to QUAD_STRIP indices like tri strip visitor creates TRIANGLE_STRIP from triangles? ... Thank you! Cheers, Christos -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68046#68046

Re: [osg-users] Color Change Question

2016-07-07 Thread Sebastian Messerschmidt
Am 07.07.2016 um 00:05 schrieb Daniel Lecklider: Hi, At my work we use OSG for simulation purposes and I am looking to display a model with each of its individual parts/components displayed in a different color. Colors can mean a lot of different things. It can be vertex colors, material

Re: [osg-users] osgQt Coverity Scan reported issue, Qt experts please chip in.

2016-07-07 Thread Robert Osfield
Checked in more defect fixes last night the overnight Coverty Scan now reports just 4 remaining defects. I fixed one this morning so the only three left are in the glu tessellation codes. This means the "reported" defect density is now 0.01 defects per 1000 lines of code. Given Coverity pegs

Re: [osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Florian Castellane
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

Re: [osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Sebastian Messerschmidt
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

[osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Florian Castellane
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() ;

Re: [osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Sebastian Messerschmidt
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

Re: [osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Trajce Nikolov NICK
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

Re: [osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

2016-07-07 Thread Robert Osfield
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

[osg-users] Why ref_ptr node can not release memory immediatelly?

2016-07-07 Thread John Lee
Hi, In my appllication, there are many child nodes in my root node. When i dynamically remove its child node, i find the memory will not free immediatelly, it will free sometimes, maybe it will free when i keep removing a few child nodes, or it will free when i remove all child nodes? Why this