Would appreciate a pointer here (pun intended).
It's been a long time since I've touched anything low-level. Apologies if this is simple. I didn't post this in GD because it's basic C, not game related. I'm receiving errors with an app that uses SDL. I've found the error seems to vary based on platform. I'm not sure, it looks like a simple declaration issue, causing error on assignment.
error: cannot convert ‘void (*)(GLuint)’ to ‘void ()(GLuint)’ in assignment
middle of SDL_opengl.h
top of renderer_ogl.cpp
GLAPI void APIENTRY glUseProgram (GLuint);
middle of renderer_ogl.cpp
typedef void (APIENTRY* PFNGLUSEPROGRAMPROC) (GLuint program);
PFNGLUSEPROGRAMPROC glUseProgram = 0;
I changed the last one to dereference:
glUseProgram = (PFNGLUSEPROGRAMPROC) SDL_GL_GetProcAddress("glUseProgram");
glUseProgram = *(PFNGLUSEPROGRAMPROC) SDL_GL_GetProcAddress("glUseProgram");
I actually recall function pointers were suppose to be pointers... the error doesn't really make sense, and I'm just confusing myself. Until tomorrow.
error: cannot convert ‘void ()(GLuint)’ to ‘void ()(GLuint)’ in assignment