Re: [Plib-users] Errors using PW
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2005-09-20 04:18:59
|
Tinoshi Kitazawa wrote: > Hello everybody! > > I have got a big problem with PW. Well, when I use PW my program crashes > whenever I call something like glOrtho(), or glVertex() etc... The > debugger says it's due to an access violation. I guess it is 'cause I > created my windows using pwInit() and OpenGL doesn't know what is the > 'current' window (i.e. says 'this' is NULL). Weird. I havn't seen that happen before. Do the 'PW' demo programs work on your machine? > What can I do? I want to use pwInit() instead of > glutMainLoop() etc. 'cause I need a keyboard function who can deal with > multiple pressed and released keys. You can do that in GLUT. Check out: glutKeyboardUpFunc/glutSpecialUpFunc. You can use the regular glutKeyboardFunc to detect keys pressed down and use the UpFunc to figure out when they are released - then you can keep an array with one element per key character to handle multiple press/releases. However: 1) Be sure to disable key auto-repeat - which confuse the issue horribly. 2) Beware of the situation where someone presses (say) 'a' - then pushes down the shift key - then releases the 'a'...which will now report as the capital 'A' being released. PW has the same kinds of problems. ---------------------------- 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----- |