I tried to modify the gfx library, to be able to use FreeBasic commands
even in the OpenGL mode. With my modified version, it is possible, by
setting a flag with ScreenControl, to render the graphic page of FreeBasic
over the openGL screen (using a quad with a texture). This feature could be
activated in a new thread, so the rendering will happen as with other
driver (not recommended), or it can happen each time the command flip is
called. Real color mode (32 and 16 bit) and paletted color modes are
supported.
To enable 2d rendering when Flip is called:
screencontrol 150,1
To enable automatic 2d rendering:
screencontrol 150,2
To set a zoom factor of 2:
screencontrol 151,2
The patch does not work correctly on windows, because glEnableClientState must be used, not glEnable. This is the fix
Merged in Git (also see https://github.com/freebasic/fbc/pull/40).