10-17-2025, 02:41 PM
(10-17-2025, 12:09 PM)DSMan195276 Wrote:Yes thats exactly it!(10-17-2025, 12:27 AM)SMcNeill Wrote: I think it's as simple as just removing it from the displayorder.I think Unseen is actually talking about the fact that if you don't have a `SUB _GL` then you're not allowed to call any OpenGL functions anywhere in your code. IE. You're allowed to have a `SUB foo` that calls `_glBegin`, but the compiler will error on `_glBegin` being called if there's no `SUB _GL` elsewhere in the code. This gets messy if you're providing a library with optional OpenGL features and don't know if the code using it will have `_GL` defined.
I think the best approach would be to wrap all the OpenGL stuff in a `$IF EnableGL THEN` type of thing. That way the users can simply define `$LET EnableGL = 1` to get all the OpenGL functionality if they want it, and it will otherwise get excluded if they don't (avoiding the compilation issues).
Thanks for the responses though guys! I'm using the method steve suggested at the moment and using a flag to allow the sub to run...
Unseen

