View Full Version : using glutKeyboardFunc w/ ungetc(..)
hi, i am using the glutKeyboardFunc keyboard input but i would also like to push messages to the keyboard buffer using an ungetc call like this:
ungetc('B', stdin); to simulate a 'B' being pushed on the keyboard. this is not working though, does anyone have any insight into this? thanks in advance.
09-14-2001, 08:57 AM
Why not make exactly the same thing that in your glutKeyboard func ???
09-14-2001, 09:00 AM
Or more simple, make a call to your glutKeyboard func with the goods arguments ...
the problem is that i am using multiple threads with the main thread running the glutMainLoop(). any of the worker threads would like to send a message to the main thread by doing an ungetc(), this way it is buffered (same way keyboard input is buffered) and the main thread can receive the keyboard input with my glutKeyboardFunc callback method. in short there are multiple threads. thanks
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.