Re: [Plib-devel] Some "PW" notes
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-04-16 21:51:36
|
Fay John F Contr AAC/WMG wrote: > Gentlemen, > > I have started going over the new "PW" code. Frankly, I am amazed > at the accomplishment; "freeglut" is almost 20,000 lines of code while PW is > under 2,500 lines. (Of course, the joystick support is missing; there > aren't any fonts; backwards compatibility was not an issue; etc. No menu's, only one window, no sphere's, cylinders, teapots, no overlay planes, no support for single-buffered windows... I really trimmed it to the bare bones. > (1) The X11 and MacOSX versions of "pwSwapBuffers" and "pwCleanup" check > whether PW has been initialized and prints an error message (and in the case > of "pwSwapBuffers" under X11 exits) if it has not. The Windows version does > not. Do we want it to? Yes. As with all PLIB libraries, the rule is that you call the 'init' function before ANY other calls. This should be (IMHO) a fatal error. > Incidentally, the X11 version uses "fprintf" and "exit" while the MacOSX > version uses "ulSetError". I presume the latter is preferable. Ooops! > Also, do we want to exit if a PW application calls "pwSwapBuffers" without > initializing? Yes. Who knows what some FUTURE implementation might need to have implemented in the pwInit() call. This isn't likely to be an error that happens to some poor user after an hour of working with the program - it's something that'll be evident to the application programmer on the very first time he tries to run his newly written program. At that point, exiting is an appropriate way to draw his attention to a very serious error. > (2) Some error messages in the X11 version need carriage returns at the end > of the message. They also use "fprintf" instead of "ulSetError". The > messages that I noticed are on lines 219, 229, 314, and 315 of "pwX11.cxx". Sorry! I'm on the case! > (3) When starting up the Trireme simulation on Linux, I get the warning > messages that "This is an INDIRECT rendering context" and "That may be bad > for performance." This may be more a question for the Triereis project, but > I will ask it here anyway. How bad for performance is it? Pretty bad. It implies that your OpenGL implementation isn't installed correctly - or that you are trying to play on one computer whilst viewing the graphics in a window on another computer. The result will be VERY SLOW rendering. In the early days of TuxAQFH/TuxKart, people would have this problem all the time and would complain that their software was running very slowly - for no adequately explained reason. We'd know that they had a good 3D card - and that OpenGL was obviously rendering - but we'd be unable to explain why it was so slow. You should fix whatever is wrong with your computer. You should find that OpenGL is LOTS faster when you do. > I am getting > frame rates of less than one per second but it's a slow computer. Also, how > do I create a direct rendering context? I'm hazy on the details of what you might have done wrong when you installed OpenGL. What card/drivers are you using? ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |