Menu

#13 glutGetModifiers(): Call anytime

open
nobody
5
2005-08-12
2005-07-30
No

For reasons that elude me, freeglut prohibits clients
from calling glutGetModifiers() outside of an
input-processing callback.

This means that if the client wants to track input
modifiers, it must do so in its own state variable---one
which conceivably won't be updated as often as the
library might be able to get updated information from
the OS.

Meanwhile, the library goes to some lengths to carefully
throw away collected information about the state of
modifier keys.

The result both is surprising (to me, as a user) and is
more code than would be required if we allowed the
modifer state info to persist.

I'm connsidering removing the lines that "disable" the
modifer state, and setting the initial modifier state to
0 (all modifers assumed not to be pressed). This would
mean changing the initialization (and perhaps cleanup)
code trivially, deleting the lines that "disable" the
modifier state, and deletig the lies to check for the
"disabled" condition.

Given that OpenGLEAN must collect this info, I see no
reason to discard it wantonly.

Discussion

  • Richard Rauch

    Richard Rauch - 2005-08-12
    • summary: Allow glutGetModifiers() to be called anytime. --> glutGetModifiers(): Callable anytime
     
  • Richard Rauch

    Richard Rauch - 2005-08-12
    • summary: glutGetModifiers(): Callable anytime --> glutGetModifiers(): Called anytime
     
  • Richard Rauch

    Richard Rauch - 2005-08-12
    • summary: glutGetModifiers(): Called anytime --> glutGetModifiers(): Call anytime
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.