Menu

#30 Changes to improve auto-complete functionality...

unknown
open
None
7
2015-12-20
2009-04-04
jaha
No

Currently the macros for the gl funtions are in the form:

define glSomeFunction GLEW_GET_FUN(__glewSomeFunction)

so that the when glSomeFunction has arguments you write:

glSomeFunction(myArg1);

which expands to:

GLEW_GET_FUN(__glewSomeFunction)(myArg1);

One downside of this approach is that for IDEs which support intellisense/auto-complete, the macros lack any knowledge of the number and type of arguments.

I suggest changing the macros to the following form:

define glSomeFunction(ArgumentTypeArgumentName) GLEW_GET_FUN(glewSomeFunction)(ArgumentType_Argumentname)

or a more specific case:

define glLinkProgram(GLuintprogram) GLEW_GET_FUN(glewLinkProgram)(GLuint__program)

This would allow capable IDEs to show the full function signature.

Discussion

  • Anonymous

    Anonymous - 2014-07-09

    Why not use a class? So we write like: gl.someFunction(args);

    That'd be VERY cool. I saw this once on a video of some guy using XCODE...

     
  • Nigel Stewart

    Nigel Stewart - 2015-02-06
     
  • Nigel Stewart

    Nigel Stewart - 2015-02-06
    • assigned_to: Nigel Stewart
    • Group: --> unknown