Although, getProcAddress is defined by an independent package, right? In 
which case you probably want something more like:

module OpenGL
 
function init_opengl_fns(getProcAddr)
  @eval begin
    export glGetString, ...
    glGetString(name::GLenum) = ccall($(getProcAddr("glGetString")), ...., 
...., name)
 
    # further definitions
  end
end
 
end
 
# then...
 
using OpenGL, SomeContextCreator
SomeContextCreator.init_context()
OpenGL.init_opengl_fns(SomeContextCreator.getProcAddr)


Forgive me if I'm not understanding your problem correctly.

Reply via email to