Results 1 to 2 of 2

Thread: Retrieve Input permanently

  1. #1
    Newbie Newbie
    Join Date
    Sep 2016
    Posts
    2

    Retrieve Input permanently

    I want to have some kind of object with xyz coordinates that can move. Now I create a key_callback which moves the object based on the input. But when I bind the key_callback and run the program, it stops after a certain amount of time when I keep pressing a key. I think this is caused because the key_callback isnt called after a while when no event is happening. How can I bypass this to update the coordinates permanently, even if a key is held down?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,103
    Add a timer callback. Have the key callback simply keep track of whether the key is up or down, have the timer callback move the object if the key is down.

Similar Threads

  1. Replies: 1
    Last Post: 06-29-2012, 07:53 AM
  2. Retrieve the Stencil Buffer?
    By PickleWorld in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 05-12-2010, 03:57 PM
  3. retrieve HWND from HDC
    By robtherich in forum OpenGL: Windows
    Replies: 4
    Last Post: 01-09-2008, 01:28 PM
  4. Retrieve the center of a sphere
    By remedios79 in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 12-24-2002, 05:03 PM
  5. How to retrieve the data in GLUnurbsObj?
    By Warren in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-21-2000, 08:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean