glPopAttrib and glPushAttrib on GLES for rendering fbo to a qquickitem
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
- opengl calls here
How do I handle these attributes?
You are right I thought it was strange also.
Here is my explanation.
Lets say we have a text list.
qt pushes the view of the text list on to the stack.
It will then draw the surrounding window.
it will pop it off at the end and draw it to the area we want our qquickitem.
To ensure the text list is drawn last.
so what we are doing is popping it off early modify it and push it back for qt to draw it at a later stage.
At least that’s what I can gather from qquickitem
now my question is how does qt do this for GLES systems because it must do it somehow?