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.
Code:error: cannot convert ‘void (*)(GLuint)’ to ‘void ()(GLuint)’ in assignment
middle of SDL_opengl.h
top of renderer_ogl.cppCode:GLAPI void APIENTRY glUseProgram (GLuint);
middle of renderer_ogl.cppCode:typedef void (APIENTRY* PFNGLUSEPROGRAMPROC) (GLuint program); PFNGLUSEPROGRAMPROC glUseProgram = 0;
I changed the last one to dereference:Code:glUseProgram = (PFNGLUSEPROGRAMPROC) SDL_GL_GetProcAddress("glUseProgram");
It saidCode: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