add function in main loop



Hi!!

I have added  a function in the main loop with this code:
     Init(oWindow->window);
     gtk_idle_add((GtkFunction)RenderFrame, NULL);
     gtk_main ();
where RenderFrame was a function in a dll

I have created a new class dw3D where RenderFrame is a method (int
dw3D::RenderFrame();)
so the previous code become:
     dw3D oDw3D;
     oDw3D.Init(oWindow->window);
     gtk_idle_add((GtkFunction)oDw3D.RenderFrame, NULL);
     gtk_main ();

but when i compile, i have an error:
     'type cast' : cannot convert from '' to 'int (__cdecl *)(void *)'

why?? what is the problem?

Thanks...






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]