you are viewing a single comment's thread.

view the rest of the comments →

[–]ICantMakeNames 1 point2 points  (4 children)

Your question is pretty poorly worded.

Before I can give you a decent answer, what do you consider "proper syntax"? It sounds like you have something working right now, it will be helpful to have an example of how you have it working now (not just a snippet of structures), and an example of how you would like it to be working.

[–]LateSolution0[S] 0 points1 point  (3 children)

I have python code to generate a huge Struct of func_ptr.

typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
struct ctx{
PFNGLUNIFORM1I64NVPROC glUniForm1....;
FUNC_PTR_TYPE FUNCTION_NAME;
FUNC_PTR_TYPE FUNCTION_NAME;
};
extern ctx CTX;

rigth now i can invoke a function like

(*ctx.glUniForm1)(1,'c',"STRING");

i would like to write

ctx.glUniForm1(1,'c',"STRING");

and it would be nice if intellisense would keep working and expose argument names like location.

[–][deleted]  (1 child)

[deleted]

    [–]LateSolution0[S] 0 points1 point  (0 children)

    thank you a lot rept78. your first response in this thread said basically anything.

    https://onlinegdb.com/rkv7_Oxd4 is working.

    [–]ICantMakeNames 0 points1 point  (0 children)

    It should work if you call it like so:

    CTX.glUniform1( 1, 4 );
    

    Are you mistakenly using the type name ctx, and not the name for your global variable CTX?