Re: [Plib-users] Readable user docs for PUI?
Brought to you by:
sjbaker
From: James F. <fr...@cs...> - 2008-05-08 04:49:13
|
On Wed, 7 May 2008, Steve Baker wrote: > 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(). Hummm... I had been thinking I'd have to re-write most of the drawing code to do 3D drawing instead of 2D - e.g. calling glVertex3f instead of glVertex2i - then changing setPosition & setSize to take 3D coords, adding a setRotation, etc. This is intended to work within an existing VR library (freeVR), so the basic graphics environment gets set up there. It gives you 3D "wand" coordinates. I imagine that will involve a bit of work to find what is selected, but it seems simple in principle. > You can even make PUI draw a software cursor so that your control panels > have cursors that move around in perspective and such. Already handled by the VR lib - and of course in a CAVE-like environment it's actually tracking hand or wand position. > If you are concerned about LGPL issues... Not at all. This is just a project for a class, so odds are it won't get used afterwards. If it does, it would go into the freeVR lib that's also LGPL'd (or similar). |