Results 1 to 3 of 3

Thread: how to give user input through keyboard/mouse when a continuous loop is exceuted ?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    Hattiesburg,MS,USA
    Posts
    15

    how to give user input through keyboard/mouse when a continuous loop is exceuted ?

    Hi ,
    We are trying to display molecules at different time frames and we want to user to be able to vary some display parameters ,after a time frame.But the display function
    exceutes everything at a stretch.

    how to give input to the program and if no input is given , the program should run with its default values.

    thank you.

    regards
    arun

    [This message has been edited by arnott (edited 05-15-2000).]

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: how to give user input through keyboard/mouse when a continuous loop is exceuted ?

    The thing to do is to read the input in your loop.

    example:

    if you use Win32. When you make your loop, test to see if there is a message in the message queue. If there is one process it. In the message queue, you'll get all the input of the users, system calls, etc.

    I suggest you go take a look at some tutorials that draws and have input.
    http://nehe.gamedev.net/

    This nehe's page, the tutorials are for opengl, but by looking at them, you'll understand a way to do input.

  3. #3
    Member Contributor
    Join Date
    May 2000
    Location
    Ottawa, Ontario, Canada
    Posts
    75

    Re: how to give user input through keyboard/mouse when a continuous loop is exceuted ?

    Also see the back section in the OpenGl SuperBible on multithreading and real-time application programming. Exactly what you are looking for.

Similar Threads

  1. egl keyboard and mouse input support
    By abhishek in forum EGL
    Replies: 1
    Last Post: 12-12-2012, 10:44 AM
  2. mouse/keyboard input problems
    By Plüss Roland in forum OpenGL: Linux
    Replies: 11
    Last Post: 09-10-2005, 04:13 PM
  3. Replies: 2
    Last Post: 02-16-2004, 06:16 AM
  4. Do I have to have the continuous loop with the NEHE examples?
    By John Jenkins in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-04-2002, 06:12 AM
  5. Help! Need keyboard input during while loop
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-12-2001, 03:11 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