Hi guys,
I’ve extended QQuickitem to create an area where I can call open gl calls directly.
Only problem is on GLES/ANGLE platforms I cant push and pop like so
This is the preprocess in my QSGSimpleTextureNode extended class
void ColorNode::preprocess()
{
if(m_fbo == NULL) return; //will happen a few times
QOpenGLContext::currentContext()->functions()->glUseProgram(0);
glPopAttrib();
m_fbo->bind();
//CCDirector::sharedDirector()->mainLoop();
opengl calls here
glPushAttrib(GL_ALL_ATTRIB_BITS);
m_fbo->release();
m_fbo->toImage().save("name.png","png");
}
Any ideas?
↧