On Sat, Aug 22, 2009 at 11:22 AM, Tyson Roberts<wx...@cabbits.net> wrote: >
> I'm using wxLua on OSX10.5 and attempting to get a "Hello world" type > program working on wxGLCanvas(). > > Basic problem: > - Have my own custom wxWindows program, running as an OSX app. Using a > wxLua interpreter. > - Used the wxLua binding system to create rudimentary OpenGL bindings > (I've tried other pre-made GL bindings, but those approaches but got crashes > when dynamic libraries were being loaded that I couldn't track down). > - Linked against the stock OSX OpenGL.framework. > - Created a window in lua, added a wxGLContext. > > Result: > - It shows up grey, no rendering. > I have never tried to use OpenGL with wxWidgets. You can look at the wxWidgets C++ samples to see if they do any special initialization of the GL canvas. http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/opengl/ The cube.h/cpp looks simple enough, they create a TestGLCanvas which is a wxGLCanvas, but notice that they use a TestGLCanvas::OnPaint() connected to a wxEVT_PAINT to do the drawing. Also note MyApp::GetContext() which is odd to me, but I think it simplifies to wxGLContext.SetCurrent(wxGLCanvas) I hope this helps, John ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users