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

Reply via email to