Hi all, Thanks Ulrich that both options supplied seemed to work ok, but the latter does seem more appropriate. I cant see the values from glGetActiveUniformsiv, so not even sure if it is returning any values, don't believe it is. There is a check earlier in the code for GL_UNSIGNED_INT_ATOMIC_COUNTER, but I have just checked and it gets skipped over when stepping through with debugger, which leaves atomiccountermap not set. If I understood correctly!
Cheers Martin -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ulrich Hertlein Sent: 04 April 2012 23:43 To: OpenSceneGraph Users Subject: Re: [osg-users] problem with svn (atomic counter?) Hi guys, On 5/04/12 6:05 , Martin Naylor wrote: > if (_extensions->isShaderAtomicCounterSupported()) > { > std::vector<GLint> bufferIndex( atomicCounterMap.size(), 0 ); > std::vector<GLuint> uniformIndex; > for (AtomicCounterMap::iterator it = atomicCounterMap.begin(), > end = atomicCounterMap.end(); > it != end; ++it) > { > uniformIndex.push_back(it->first); > } Coming to think of it, I believe the whole block should check if atomicCounterMap is not empty. It does not need to be called if GL_UNSIGNED_INT_ATOMIC_COUNTER is supported but not used. <code> if (_extensions->isShaderAtomicCounterSupported() && !atomicCounterMap.empty()) { std::vector<GLint> bufferIndex( atomicCounterMap.size(), 0 ); std::vector<GLuint> uniformIndex; </code> Cheers, /ulrich _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

