home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / graphics / 96 < prev    next >
Encoding:
Text File  |  1993-01-05  |  2.5 KB  |  59 lines

  1. Newsgroups: comp.sys.sgi.graphics
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!ra!hobbes.nrl.navy.mil!neri
  3. From: neri@hobbes.nrl.navy.mil (jesse neri)
  4. Subject: Re: Fortran, mixed GL and Keyboard input
  5. Message-ID: <C0EILu.DnD@ra.nrl.navy.mil>
  6. Sender: usenet@ra.nrl.navy.mil
  7. Organization: Pulsed Power Physics Branch; Plasma Physics Division; NRL; Washington, DC;
  8. References: <C0E97A.9Cu@ra.nrl.navy.mil>
  9. Distribution: comp.sys.sgi.graphics
  10. Date: Tue, 5 Jan 1993 22:03:29 GMT
  11. Lines: 46
  12.  
  13. In article <C0E97A.9Cu@ra.nrl.navy.mil> neri@hobbes.nrl.navy.mil (jesse neri) writes:
  14. >I am using a Indigo R4000, IRIX 4.0.5F and IDO.  I am programming
  15. >in Fortan (what can I say, I'm a relic) and want to to keyboard and mouse
  16. >input.  I open a GL window, draw a configuration in it, then call
  17. >qreset, the qdevic(LEFTMO) to queue up the left mouse button.  I then do
  18. >qreads until the left mouse button is pushed, then grab the mouse positions
  19. >using getval(MOUSEX) and getval(MOUSEY).  All this works as advertised
  20. >in the GL programming guide.  I now want to get keyboard information about
  21. >the data point that has been selected (i.e. user types a letter, then a 
  22. >numerical value).  That's when the wheels come off.   I try the standard
  23. >Fortran input of 
  24. >
  25. >      read (5,101) x
  26. >  101 format(1A1)
  27. >
  28. >to read the letter value (worked before the mouse stuff) and I get
  29. >
  30. >fmt: I/O error
  31. >apparent state: unit 5 named
  32. >last format (1a1)
  33. >lately reading (null) formatted external IO
  34. >
  35. >The error occurs instantly, before any thing is typed, before
  36. >the mouse is moved back into the progrmas window.
  37. >HOW DO I CONVINCE THE PROGRAM TO GO AND READ FROM THE KEYBOARD?
  38. >The error occurs despite all attempts to unque the mouse, reset the queue, 
  39. >etc.  I would rather not have to go to mixed mode programming and use X and
  40. >pop-up windows to drive the user interaction, but if that is the only answer,
  41. >so be it.  
  42. >
  43.  
  44. And the answer is to call foregr before the winope.  The winning
  45. suggestion cam courtesy of Kian-Tat Lim (ktl@wag.caltech.edu).  I also make
  46. sure that the queue is cleared before going on, but that may superfluous.
  47.  
  48. Thanks again to all.  The quality of the SGI support on USENET, from
  49. SGI personnel and others, was one of the factors in my choosing SGI systems,
  50. and you all have come through for me again.  
  51.  
  52.  
  53.  
  54. -- 
  55. Jess Neri   neri@hobbes.nrl.navy.mil   (202) 404-7567 #  #  ##   #
  56. Pulsed Power Physics Branch, Plasma Physics Division  ## #  # #  #
  57. Naval Research Laboratory, Washington DC   20375      # ##  ##   #
  58. #########   Nuts Running Loose   #################    #  #  # #  ###
  59.