A small refinement makes it possible to perform low level Opengl entirely within Oxygen compiled code, while maintaining operability with TBGL. Opengl must not be freed when Oxygen terminates - as would normally occur with the `terminate` command. If this happens a GPF will occur at the end of the program.
To resolve this I've unbundled terminate into freelibs, freestrings and freestatics.
So it is now possible to omit freelibs from the usual termination sequence.
[code=thinbasic]
sub finish() at #p0
'
'terminate ' STANDARD TERMINATION
'
'SPECIAL TERMINATE WHEN SHARING OPENGL WITH THINBASIC
'
'freelibs ' EXCLUDED
freestrings
freestatics
end sub
[/code]
This means we can run lengthy Opengl procedures at full wack in O2H and still have access to all the goodies in TBGL.
Charles
PS: This is demonstrated in PSVA9 but looks essentially the same as the PSVA8 Bellows above.
Bookmarks