paragui-users
[Top][All Lists]
Advanced

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

RE: [paragui-users] OpenGL and other questions....


From: Teunis Peters
Subject: RE: [paragui-users] OpenGL and other questions....
Date: Wed, 26 Feb 2003 10:19:30 -0800 (PST)

Aha!  Someone asked the RIGHT question :)

On Tue, 25 Feb 2003, SkyFlash wrote:

> > fast - fairly.  (I'm not that happy with current font
> > handlers but have yet to come up with better)
>
> Ok.. if its just one thing :P

Pretty much.  That and translucency/transparency of paragui images is
sometimes funny.  But take a look :)
note - there's still probs with the core code.  Am considering massive
change to how the "main loop" is handled...

> > PG_Application - but look at the demo 'dblbuffer' and
> > 'animation' more.
>
> I will... the only problem is that I cannot compile them with VC6,
> internal compiler error,
> and I already got the latest SP.

Oh regardless of compilability, they should show how to do it.
I still don't like the idea of overriding pg_application the way things have
gone design-wise.

> > btw - I'm the (main) programmer on the opengl branch - will
> > still isn't 100% *sigh*.  Been on hiatus due to RL overload..
>
> Ok, now, at which point is it? Does it work basicly but not smooth or
> not at all yet?

works fine, some oddities.  Doesn't share visuals nice yet though.

> Cause ParaGUI currently is worthless to me as I can only have my app
> render to OpenGL due to speed issues.
> (its a 3D game) So the only solution for me is to get it going if I want
> to use ParaGUI for my app.
> Q: Can the CVS opengl stuff create a basic GUI and overlay it on my
> supplied screen???

THAT is the right question.

The answer is - it CAN - now:
    What parameters can you provide for your screen?
    How should it interact with the paragui event system?
    What information does -it- need from the paragui event system?
    Can it be rendered inside a subwindow or outside?

> Also, are there any alternatives to ParaGUI? I really need a SDL, opengl
> gui library badly...

fltk and a couple of others I'm not so fond of... *sigh*.
Haven't had much luck but I have weird requirements :)
SDL_Gui (see libsdl.org) has a basic GUI that AFAIK works under opengl.
actually the libs and projects area of libsdl.org is always worth looking.

> Also, I dont grasp at all how ParaGUI works yet... I didnt find any
> manuals, just the API doygen docs, and
> seven very basic tutorials that just draw a gui. :P

one: define windows;
two: open them up;
three: let them run.
Okay I'm NOT a document writer :P

> Is there any sample app that shows how to make ParaGUI draw on screens I
> supply to it, or how to make it share a screen
> with another drawing engine, how the background stuff works (I tried
> making my app draw to the background surface thats
> inside PG_Application but it crashed terribly), how to insert into the
> event queue from my app, how to not use the
> PG_Application at all, how to filter events from the event queue and
> route them to my own callbacks or something like that?
> Cause thats all things I prolly need to do... any pointer to docs about
> that would be appreciated as well!

now this gives me some ideas finally... hrm...
I'll get back to you (or everyone else here anyways :) on this ummm REAL
soon! :)

> Also...
> Which function triggers the actual drawing of the GUI?
> How can I access the background surface and draw to it, and how do I do
> it threadsafe???

hrm:
PG_Widget::UpdateRect(r) updates all rectangles
PG_Widget::BulkBlit() redraws everything if bulk mode is enabled
                      (see dblbuffer test for an example of this)
incidentally the latter works just fine and is threadsafe in opengl cvs
branch as far as I know.

I'm thinking dblbuffer test IS what you want to look at now...

rendering to PG_Application::background should be threadsafe... well more or
less anyways.  Not particularily thread-risky.  Even in the paragui-opengl
tree it's an SDL surface (although their with it's own managing surface).

Threadsafe?  Never render from anywhere other than the main thread.  That's
pretty much it.  The event system and most of the rest of the engine are
pretty threadsafe no matter which version :)

> I dont really see the side entrances to using ParaGI yet... the basic
> create - loadtheme - init - run works great, but its totally useless..
> lol
> Basicly, my whole knowledge comes from the header files and the
> tutorials. :)

Yep - that's the docs.  Oh well..

create visual setting
initialize visual (open a graphic window/screen)
load theme (actually paragui-opengl will crash if you do this -before-
     initializing video.  There's no way I know of around this - it's an
     artifact of the device driver system)

initial settings
either use "PG_Application::run()" or have your own event loop eg dblbuffer

system quits when told to *g*

G'day, eh? :)
       - Teunis





reply via email to

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