Hi all,
If I have multiple GLDrawables (e.g. A main GLCanvas and a GLPbuffer) what sets the current context? GLDrawable.display()? getGL()?
Thanks
Hi all,
If I have multiple GLDrawables (e.g. A main GLCanvas and a GLPbuffer) what sets the current context? GLDrawable.display()? getGL()?
Thanks
display calls context.invokeGL which is where all the magic takes place. If a context switch needs to happen that is where it takes place.
Thanks a million. As a follow on question, where exactly should the pbuffer be created? Does it have to be created at construction (before the Animator starts)? Can you resize a pbuffer via resize() or will this make it poop out?
You can create a pbuffer anytime after you have created and called setVisible or show on your GLCanvas. Since Pbuffers are lazily created you will need to call display on your GLCanvas before the pbuffer is fully realized with a context of its own. Windows unfortunately requires another valid GL context before you can create a pbuffer. Hopefully that will be addressed at somepoint.