Stop screen from disappearing when using OpenWindowedScreen with OpenGL subsystem

Share your advanced PureBasic knowledge/code with the community.
Axeman
User
User
Posts: 89
Joined: Mon Nov 03, 2003 5:34 am

Stop screen from disappearing when using OpenWindowedScreen with OpenGL subsystem

Post by Axeman »

If you are using OpenWindowedScreen with the OpenGL subsystem and find that the screen is initially not displayed then make sure you call FlipBuffers() after you have finished creating all your UI gadgets on the window. Adding UI gadgets to a window with an OpenGL screen attached seems to cause the screen to become hidden until FlipBuffers() is called.

Something else to bear in mind is that you can add a windowed screen onto the various types of container gadgets. Just use the output from GadgetID() for the container gadget instead of WindowID().