Adding wxWidgets to existing app
GyroTech
gyrotech at freakinabox.com
Sat Jan 5 18:19:31 PST 2008
Thanks for the ideas. I managed to hack something together earlier,
creating a wxApp that opens a frame during OnInit as normal, then
overriding OnRun() to work my OpenGL SDL window, like this:-
while( !done )
{
if( Pending() )
Dispatch();
if( SDL_PollEvent( &event ) )
{
// Do SDL stuff here
}
// Draw OpenGL scene here
}
This seems to work for the most part, but I was wondering how, upon
checking Pending() I could check the event waiting, and if it's a custom
one for my code to run (loading objects, changing lights etc) do
something, otherwise just pass it on to Dispatch()
Is this a decent way of doing things or have I put together a terrible
kludge?? ;-)
Thanks
More information about the wx-users
mailing list