Trying to pass a function pointer as an argument. The compiler is reporting invalid conversion. Using g++ compiler on linux with openGL library.
Any advice would be helpful. Can also provide more code if helpful.
defined in header file
SystemClass {
<snip>
static bool WaitForMapNotify (Display * d, XEvent * e, char *arg);
<snip>
};
dininded in cpp file
bool SystemClass::WaitForMapNotify (Display * d, XEvent * e, char *arg)
{
return d && e && arg && (e->type == MapNotify)
&& (e->xmap.window == *(Window *) arg);
}
Trying to pass the function...
void SystemClass::createTheWindow ()
{
<snip>
XIfEvent (Xdisplay, &event, &WaitForMapNotify, (char *)window_handle);
</snip>
}
I returned it back to bool and it magically compiles. Not sure what the problem was but I make a wholesale list of changes. Anyway trying to write objects to initialize OpenGL with X11 is a bear. I am probably going to add glfw.