Hi,
I inherited some code to read back texture data. This works fine on Linux
platform but seg fault on Windows. Following is the list of the code segments,
......
// create and configure the texture that we're going
// to use as target for render-to-texture (depth)
m_texture = new osg::TextureRectangle;
m_texture->setTextureSize(m_size.width, m_size.height);
m_texture->setInternalFormat(GL_RGBA32F_ARB);
m_texture->setSourceType(GL_FLOAT);
m_texture->setSourceFormat(GL_RGBA);
m_texture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::NEAREST);
m_texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::NEAREST);
m_texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP);
m_texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP);
....
// receive the data every iteration
float *m_buffer = new float[m_size.width* m_size.height*4];
m_texture->getTextureObject( m_contextID )->bind();
glGetTexImage( m_texture->getTextureTarget(), 0,
GL_RGBA, GL_FLOAT, &m_buffer[0] );
The code seg fault when call to glTexImage. Did anyone have the save problem or
am I
missing steps on Windows.
...
Regards,
weiliang
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33206#33206
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org