Closed MicBosi closed 3 years ago
Hi Mic
Attached please find the vlWX Canvas zipped source files for wxWidgets 3.x.
Here is an example from our applications on how to use it:
...
#ifdef WXMSW_3.1
wxGLAttributes glAttribs;
wxGLContextAttrs contextAttribs;
glAttribs.RGBA().Depth(24).DoubleBuffer().SampleBuffers(1).Samplers(8).EndList();
if(use_OpenGL_Debug)
contextAttribs.CompatibilityProfile().DebugCtx().EndList();
else
contextAttribs.CompatibilityProfile().OGLVersion(3,3).EndList();
contextAttribs.SetNeedsARB(true);
//Create the canvas.
mCanvas = new vlWX::WXGLCanvas(panGraphicsHost, NULL, wxID_ANY,
panGraphicsHost->GetClientAreaOrigin(),
panGraphicsHost->GetClientSize(),
wxFULL_REPAINT_ON_RESIZE,
&glAttribs, &contextAttribs);
#else // WXMSW < 3.1
...
where panGraphicsHost is a simple wxPanel hosting the VL canvas (the rendering surface).
We've been using VL + WX 3.x for quite a long while now and they work absolutely fine together. Hope that helps.
Regards, Virgiliu
Hey! 😃 Thanks @VirgiliuC!
Support for wxWidgets 2.8 is now becoming obsolete. Would be nice to support 3.x as well. Contributions are welcome.
https://www.wxwidgets.org/downloads/