[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] pg_application
From: |
Teunis Peters |
Subject: |
Re: [paragui-users] pg_application |
Date: |
Mon, 26 May 2003 16:03:51 -0700 (PDT) |
On Mon, 26 May 2003, Alexander Opitz wrote:
> Hi,
>
> is there an example of a reimplementation of the PG_Application class? I try
> it at the moment, but I've problems with the static things :-(
>
> I try to reimplent it with an other RunEventLoop function, it will be
> (exspecialy) for Games. It have a FrameHandler which is called every time, so
> you can make Sprites/Animations like in dblbuffer.cpp.
TBQH - not entirely necessary. Can always run the event loop inside the
"main" instead of the app.Run() method... dblbuffer IS a good example for
that.
or flip side write your own thread to do the same thing... it's not like
the PG_Application::RunEventLoop function calls anything terribly
private.
On the other hand, deriving a subclass of PG_Application IS possible...
just access the PG_Application via a pointer and create subclass as
normal.
While I'm not the designer of the main system - the opengl sub-branch may
(but doesn't :) show undesirable sideeffects if the child class does not
initialize things properly - such as not being able to find itself,
drivers or themes...
Hope that helps a little at least..
G'day, eh? :)
- Teunis
PS: let me mention a warning - multithreaded programs should _NEVER_
render from ANY thread other than the one that -created- the display.
Causes undesirable things like crashing X, lockups with some display
drivers and other fun things. Best case with X your program will be
aborted...