[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:59:52 -0700 (PDT) |
On Tue, 27 May 2003, Alexander Opitz wrote:
> Am Dienstag, 27. Mai 2003 01:03 schrieb Teunis Peters:
> > 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.
>
> TBQH??
To Be Quite Honest. Okay so it's a little dated for a short form. I
haven't seen it used in a couple of years but it suits my speaking pattern
so... *wry grin*
> I want to simplify dblbuffer ... so it will be easier for game developing. I
> have a FrameHandler ... and you only need to add your FrameObject to it ...
> and every turn it will be called to redraw themself.
Och that's a good idea.
> > 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.
>
> It's not good to have 2 threads to draw ... that can end in a war of code :-)
It's not good in a "this can cause a fatal crash to X" way...
but multiple threads handling event tossing shouldn't be a big deal. At
least not with SDL's event handlers which are quite multithread friendly.
> > 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.
>
> access PG_Application via a pointer?
> Hmmm, at the moment I'm down to the point, that my_quitEventLoop will never be
> true ... I can do what I want :-/ If I use PG_Application, then it works.
Oh really? hrm. I'll have to look into that... I stopped using this
method at some point so I'm not sure how (or if) it works anymore.
> > 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...
>
> I haven't try it yet with opengl branch.
> But ... there is an ParaGUI MPEG Player ... he also needs a loop for
> displaying ... so I will take a look in the 1.1 branch ... there must be
> changes in the RunEventLoop.
A seperate loop for displaying is rather risky with SDL. With OpenGL it's
out and out not allowed.
Multiple rendering thread behaviors btw:
- to memory context: no prob
- to FBcon : no prob
- to Windows/DirectX : careful locking required, sometimes locks
- to nVidia/OpenGL : no prob
- to Matrox/OpenGL : system lockup, poweroff only solution.
current solution: X aborts the program
I'm still working on ways to make the mpeg player work under ParaGUI +
OpenGL. It's a rather nice test of a worst-case scenario actually for
rendering. If you REALLY want to freak out ParaGUI/video, make two videos
play simultaneously. Note that the MPEG driver tends to bug out too
though. *sigh* - must see if it works now :)
An old demo of mine from many years ago had three videos playing
simultaneously - two on torii and one on a sphere. I could put a console
onto an object too sometimes :)
maybe I should rewrite that old horse for OpenGL... probably easier just
to use libGLU though *g*. Wrote the thing somewhat before 3d acceleration
appeared on the market outside of workstations.
G'day, eh? :)
- Teunis