[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LfW with wxLua and OpenGL
- From: Peter Cawley <lua@...>
- Date: Mon, 19 Oct 2009 15:44:46 +0100
On Mon, Oct 19, 2009 at 10:52 AM, Ivan Kolev <email@example.com> wrote:
> What happens is that the application freezes right after frame:Show(true),
> without calling any of the event handlers I've connected. An empty window
> appears, but I can't even move it, I can only kill the process.
I believe that the wxWidgets API for using OpenGL changed slightly
First of all, OpenGL support wasn't enabled by default in wxWidgets
until fairly recently.
Secondly, I think that the method for creating and associating a
GLContext changed too - it used to be that a context was created when
you created a canvas, and that might still be the case if you use an
old version of wxWidgets, or one of the deprecated constructors for
GLCanvas in a new version of wxWidgets. The new approach is that a
canvas does not create a context, and that a context should be created
for the first time during the first paint event, and then reused and
associated with the canvas in that paint event and subsequent ones.
In short, check which wxWidgets version you are targeting, which
constructor you are using for GLCanvas, and what the proper semantics
for GLContext are given your two previous answers.