home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / graphics / 93 < prev    next >
Encoding:
Text File  |  1993-01-05  |  2.1 KB  |  54 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: Fortran, mixed GL and Keyboard input
  5. Message-ID: <C0E97A.9Cu@ra.nrl.navy.mil>
  6. Sender: Jess Neri (neri@hobbes.nrl.navy.mil)
  7. Organization: Naval Research Laboratory
  8. Distribution: comp.sys.sgi.graphics
  9. Date: Tue, 5 Jan 1993 18:40:21 GMT
  10. Lines: 42
  11.  
  12. I am using a Indigo R4000, IRIX 4.0.5F and IDO.  I am programming
  13. in Fortan (what can I say, I'm a relic) and want to to keyboard and mouse
  14. input.  I open a GL window, draw a configuration in it, then call
  15. qreset, the qdevic(LEFTMO) to queue up the left mouse button.  I then do
  16. qreads until the left mouse button is pushed, then grab the mouse positions
  17. using getval(MOUSEX) and getval(MOUSEY).  All this works as advertised
  18. in the GL programming guide.  I now want to get keyboard information about
  19. the data point that has been selected (i.e. user types a letter, then a 
  20. numerical value).  That's when the wheels come off.   I try the standard
  21. Fortran input of 
  22.  
  23.       read (5,101) x
  24.   101 format(1A1)
  25.  
  26. to read the letter value (worked before the mouse stuff) and I get
  27.  
  28. fmt: I/O error
  29. apparent state: unit 5 named
  30. last format (1a1)
  31. lately reading (null) formatted external IO
  32.  
  33. The error occurs instantly, before any thing is typed, before
  34. the mouse is moved back into the progrmas window.
  35. HOW DO I CONVINCE THE PROGRAM TO GO AND READ FROM THE KEYBOARD?
  36. The error occurs despite all attempts to unque the mouse, reset the queue, 
  37. etc.  I would rather not have to go to mixed mode programming and use X and
  38. pop-up windows to drive the user interaction, but if that is the only answer,
  39. so be it.  
  40.  
  41. All answers welcome, e-mail or otherwise.  If I get a lot of interesting
  42. responses, I will post a summary.
  43.  
  44. Thanks in advance.
  45.  
  46. Jess Neri
  47.  
  48.  
  49. -- 
  50. Jess Neri   neri@hobbes.nrl.navy.mil   (202) 404-7567 #  #  ##   #
  51. Pulsed Power Physics Branch, Plasma Physics Division  ## #  # #  #
  52. Naval Research Laboratory, Washington DC   20375      # ##  ##   #
  53. #########   Nuts Running Loose   #################    #  #  # #  ###
  54.