Article View: comp.sys.sgi.graphics
Article #74Fortran, mixed GL and Keyboard input
From: jesse neri
Date: Tue, 05 Jan 1993 18:40
Date: Tue, 05 Jan 1993 18:40
42 lines
2183 bytes
2183 bytes
I am using a Indigo R4000, IRIX 4.0.5F and IDO. I am programming
in Fortan (what can I say, I'm a relic) and want to to keyboard and mouse
input. I open a GL window, draw a configuration in it, then call
qreset, the qdevic(LEFTMO) to queue up the left mouse button. I then do
qreads until the left mouse button is pushed, then grab the mouse positions
using getval(MOUSEX) and getval(MOUSEY). All this works as advertised
in the GL programming guide. I now want to get keyboard information about
the data point that has been selected (i.e. user types a letter, then a
numerical value). That's when the wheels come off. I try the standard
Fortran input of
read (5,101) x
101 format(1A1)
to read the letter value (worked before the mouse stuff) and I get
fmt: I/O error
apparent state: unit 5 named
last format (1a1)
lately reading (null) formatted external IO
The error occurs instantly, before any thing is typed, before
the mouse is moved back into the progrmas window.
HOW DO I CONVINCE THE PROGRAM TO GO AND READ FROM THE KEYBOARD?
The error occurs despite all attempts to unque the mouse, reset the queue,
etc. I would rather not have to go to mixed mode programming and use X and
pop-up windows to drive the user interaction, but if that is the only answer,
so be it.
All answers welcome, e-mail or otherwise. If I get a lot of interesting
responses, I will post a summary.
Thanks in advance.
Jess Neri
--
Jess Neri neri@hobbes.nrl.navy.mil (202) 404-7567 # # ## #
Pulsed Power Physics Branch, Plasma Physics Division ## # # # #
Naval Research Laboratory, Washington DC 20375 # ## ## #
######### Nuts Running Loose ################# # # # # ###
Technical Details
Message-ID:
<C0E97A.9Cu@ra.nrl.navy.mil>Path:
arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!ra!hobbes.nrl.navy.mil!neriShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.sgi.graphics Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!ra!hobbes.nrl.navy.mil!neri From: neri@hobbes.nrl.navy.mil (jesse neri) Subject: Fortran, mixed GL and Keyboard input Message-ID: <C0E97A.9Cu@ra.nrl.navy.mil> Sender: Jess Neri (neri@hobbes.nrl.navy.mil) Organization: Naval Research Laboratory Distribution: comp.sys.sgi.graphics Date: Tue, 5 Jan 1993 18:40:21 GMT Lines: 42