Hi Marcin,
Thank you for your suggestion, I tried but there is still some error:
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
I use the below code to attach the texture2DMS:
m_NormalSampler->setTextureSize(width, height);
m_NormalSampler->setDataVariance(osg::Object::DYNAMIC);
m_NormalSampler->setInternalFormat(GL_RGB10_A2);
m_NormalSampler->setSourceFormat(GL_RGBA);
m_NormalSampler->setSourceType(GL_FLOAT);
this->attach(osg::Camera::COLOR_BUFFER0, m_NormalSampler.get());
m_LinearDepthSampler->setTextureSize(width, height);
m_LinearDepthSampler->setDataVariance(osg::Object::DYNAMIC);
m_LinearDepthSampler->setInternalFormat(GL_FLOAT_RG16_NV);
m_LinearDepthSampler->setSourceFormat(GL_RGBA);
m_LinearDepthSampler->setSourceType(GL_FLOAT);
this->attach(osg::Camera::COLOR_BUFFER1, m_LinearDepthSampler.get());
m_DiffuseSampler->setTextureSize(width, height);
m_DiffuseSampler->setDataVariance(osg::Object::DYNAMIC);
m_DiffuseSampler->setInternalFormat(GL_RGBA);
m_DiffuseSampler->setSourceFormat(GL_RGBA);
m_DiffuseSampler->setSourceType(GL_FLOAT);
this->attach(osg::Camera::COLOR_BUFFER2, m_DiffuseSampler.get());
even I changed the three internal format to the same GL_RGBA, there is also the
error codes above.
I use stateset->setTextureAttributes(0, tex2DMS, StateAttribute::ON); to load
the texture.
And also have two openGL error during drawing:
"GL_INVALID_ENUM"
and "GL_OUT_OF_MEMERY"
Do you have some tips? I really want AA in my deferred render, thanks!
Thank you!
Cheers,
Kai
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27418#27418
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org