Hi,
I have a scene that can be manipulated by user interaction. When there changes to the orientation, I draw the scene in an encoded fashion to an FBO, which works well.
I can’t figure out how to call this encoding upon the first draw though. I don’t want to call the encoding during every paint event, only those that change orientation of the scene.
I thought I could call my FBO encoder as the last call of initializeGL, but this is not working, I get an illegal framebuffer operation in this case.
- How can I draw to an FBO as a one off upon initialization?
Of course I can make a first_pass flag in paintGL and do it from there, but it seems messy to have a statement in paintGL that is only used to call a function once. - Why can’t I draw from the last line of initializeGL? It seems the context is valid, but something prevents the draw to the FBO from working.
Hope someone can assist!
Soren