Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#240 Strange glxew behaviors

1.10.2
open
nobody
None
7
2014-02-20
2014-01-27
Anonymous
No

I'm trying to create a GLX backend for a project. The project originally used GLEW but I couldn't figure out how to initialize GLX without a context.

GLX doesn't require a context to fetch its own entry points. glXGetProcAddress is supposed to always be exported statically (assuming 1.4 is available).

In the header, I see this:
#ifdef GLEW_MX

typedef struct GLXEWContextStruct GLXEWContext;
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext ctx);
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext
ctx, const char *name);

#define glxewInit() glxewContextInit(glxewGetContext())
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)

However, glxewGetContext() doesn't exist. It also does not make sense to have them oriented with a context as the returned functions context-independent.

A temporary work around for this is to create glX function pointers yourself, define glXGetProcAddress, and fetch the functions yourself... defeating the entire purpose of glxew in the first place.

Discussion


  • Anonymous
    2014-01-27

    Oh, apparently you can just make your own struct and call glxewContextInit. However, in glew.c... the struct instance isn't used for anything. If GLEW_MX isn't defined, GLXEW_CONTEXT_ARG_DEF_LIST (which is what is passed) is actually considered void...

    So... is glxewContextInit(void) supposed to be a thing (except missed in the header)?

     

  • Anonymous
    2014-01-31

    If I could just have some insight on the intended purpose, I would gladly submit a patch or branched git repo.

     


Anonymous


Cancel   Add attachments