in reply to Wx with Tk

It won't be portable, but here is how you might do it on win32

It might be easier to make portable in C/C++

Maybe Wx::GLCanvas/wxGLCanvas fits your requirements?