Re: [Plib-users] Readable user docs for PUI?
Brought to you by:
sjbaker
|
From: Steve B. <st...@sj...> - 2008-05-08 00:42:49
|
Fay John F Dr CTR USAF 46 SK wrote:
> Even though this is a PLIB mailing list, I personally have no problem
> with people recommending other software packages. The PLIB libraries
> are being offered free of charge with the LGPL license in the hope that
> people will find them useful; the primary focus is on enabling people to
> do things.
>
Yes - no problem. If another package is better suited than PUI to doing
the job - then by all means let us discuss that.
The problems I had with GLUI (which resulted in me writing PUI in the
first place) was that it didn't 'play nicely' with other rendering
software. It wants to "own the main loop" - PUI can be invoked as a
subroutine call at any point in the rendering cycle you like. That was
a long time ago though - it's possible that GLUI has evolved ways to
play more nicely with a primarily-non-GUI interactive application. PUI
may well be better suited on those grounds alone.
I believe you can easily attach PUI widgets to 3D surfaces - I did that
a LONG time ago though and lots has changed since then. I think you
can just get into pu.cxx and write a new function that is just like
puDisplay() but calls your own code instead of using
puSetOpenGLState(). Take out the glViewport() call, the glOrtho() and
the two glLoadIdentity() calls and push whatever transform you want onto
the stack instead. PUI disables depth-testing, fog and lighting - and
you may need to change that too. The biggest problem (IIRC) as in
transforming your mouse coordinates when you feed them to puMouse().
You can even make PUI draw a software cursor so that your control panels
have cursors that move around in perspective and such.
If you are concerned about LGPL issues, you could avoid modifying PUI
altogether by writing:
extern void puCleanUpJunk(void);
void my_puDisplay ( void )
{
...set up your opengl state...
glDisable ( GL_CULL_FACE ) ;
puCleanUpJunk () ;
puGetUltimateLiveInterface () -> draw ( 0, 0 ) ;
puDrawCursor ( myCursor_x, myCursor_y ) ;
puRefresh = FALSE ;
...restore opengl state...
}
|