Declaring opengl modules in render

in my openglsurface i define some opengl functions like

Declare Sub glTexCoord2d Lib OpenGLLib (s As Double, t As Double)

which means every frame i have 40+ declares being run for ever frame, bad news. I read that they should live in a module, however if i cannot find a way to put them in a module that the render loop can see. ive created a module called gl, made a method and put them in which is what it seems to say in all the documentation then try to access them with gl. it does not find them. Anyone any ideas?

Create the module (you’ve done this)
For each declare add an External Method
Its basically a declare but defined in the module in a way you can just use them rather than redeclare them all the time

If i make a external module i cannot add code to it, i’m not sure where to put the declare line, is this in any method, or do i need to make the declare line a method itself, very confusing the documentation does not really help. if i say make a external method glbegin, i cannot add a normal method with its code, as it conflcts.

I think you misread what I wrote

Dont add an EXTERNAL MODULE

just a regular old MODULE

then add external METHODS (its in the popup menu of item you can add to a module)

What you add to that method declaration is the same info as in the declare

By making this PUBLIC then you can call it anywhere