Hi Juan, Thanks for your reply. I'm still having problems trying to make use of texelFetchBuffer with your code.
Why texture pixel format are you using? I'm using an integer texture format. Not sure if OSG's allocateImage method behaves ok in this case. I am creating the texture the following way: Code: bbp::RTNeuron::TextureBuffer *tb = new bbp::RTNeuron::TextureBuffer(); tb->setInternalFormat(GL_RGBA8UI); // 4 bytes per pixel, R-G-B-A format as per EXT_texture_integer formats specification osg::Image *image = new osg::Image(); image->allocateImage(128*128, 1, 1, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, 1); // note: width=(128*128), height=1 tb->setImage(0, image); In my fragment shader, right now, here is what I'm doing for a quick test: Code: #version 150 compatibility #extension GL_EXT_gpu_shader4 : enable uniform samplerBuffer tex; void main(void) { if (textureSizeBuffer(tex) == (128*128)) // size in pixels gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); // red (as I am expecting) else gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); // green } The result is always green here, not red as I am expecting. Is there anything I am doing wrong with your code? Regards Fred ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35795#35795 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org