paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] playing with design again (opengl)


From: Teunis Peters
Subject: Re: [paragui-users] playing with design again (opengl)
Date: Fri, 10 Jan 2003 11:30:22 -0800 (PST)

On Fri, 10 Jan 2003, Dinand Vanvelzen wrote:

> From: "Teunis Peters" <address@hidden>
> > Anyways, to make a jumbled description straight, I'm thinking of doing a
> > single-threaded renderer seperate from the running process.  This won't
> > work with single-threaded systems and will require a little extra setup on
> > some platforms (directX I suspect), but should solve things.  Rendering
> > will only be allowable from a particular function in an object after this
> > point...
> >
>
> I think most SDL peeps will have the rendering in the same thread as
> anything else, thus the main program thread. so this should not be a
> problem. Altough multiple thread will exist in my program and most other
> people i suspect that have networking support and they may alter data but
> won't call OpenGL directly.

90% of paragui demos mix threads...  or seem to.  dblbuffer doesn't and
that's close to it.  Anyways, dblbuffer (last I checked) is the only demo
that -doesn't- crash in opengl.

> when you say : "seperate from the running process" you mean a program with
> the 'big game loop' and a seperate render thread by default ?..  i messed
> with that and it is VERRY tricky not to have starvation problems, not to
> mention the additional overhead on a single CPU machine.
> I think rendering should always be done in the main application thread.

not precisely.
actually been doing this stuff for years myself.. but...

anyways I've been (slowly) trying to identify why bulk mode works and
interactive doesn't... and what's supposed to be happening.  All going
well I'll figure it out this weekend.

what I've been thinking of is actually having the main thread be renderer
(with it's own event signals - such as 'update' for a widget) and possibly
connection handler, and a subthread for the application.  This could be
entirely the wrong thing though...

to be quite honest, keeping an event-loop handling system works.

What I'm trying to work with is getting 'pgmpeg' support to work without
crashing hard.  pgmpeg has it's own rendering threads and this is a
violent conflict with X and OpenGL...

oh and to add another point to the thought - randomly writing to the
screen at any time one wants to is not always wise when there's multiple
views (eg: 3d mainscreen, 2d border+windows :)

umm that clarify what I'm thinking? :)

G'day, eh? :)
        - Teunis

PS: anyone know why paragui tends to write to the main screen rather than
to an image on a subwindow?  The latter would break a lot less with opengl
and look nicer when subwindows are wrapped around spheres *grin*

PPS: and yes to repeat from last year *grin* I'm rewriting image
rendering/management to support more information on the object than SDL
can reasonably provide - such as alpha/colourkey/... info as well as
(possibly) additional colourspaces.  While SDL doesn't support mixing
colourkeys and alpha or multiple colourspaces (most of the time), opengl
always supports the first and opengl 1.3+ supports the second :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]