Hello, thanks for the feedback.  I discovered something as part of going
through the example, notably that I was forgetting to setup the viewport in
GL before trying to display.  I took the following lines from the cube demo
and tried to use them:

const wxSize ClientSize = GetClientSize();
glViewport(0, 0, ClientSize.x, ClientSize.y);

However, when implementing these in wxLua, I found that ClientSize ends up
being (0, 0)!  I'm not sure what to make of this - it seems like the canvas
is creating itself with a zero width/height.  But is this a direct problem,
or a symptom of something else awry?  Any suggestions?

I'm going to attempt to implement the cube demo in straight c++ inside my
current program's environment next to ensure that it works.

Cheers,

- Tyson

On Tue, Aug 25, 2009 at 12:13 AM, John Labenski <jlaben...@gmail.com> wrote:

> 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
>
------------------------------------------------------------------------------
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

Reply via email to