🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.sgi.graphics
2 messages
2 total messages Started by jesse neri Tue, 05 Jan 1993 18:40
Fortran, mixed GL and Keyboard input
#74
Author: jesse neri
Date: Tue, 05 Jan 1993 18:40
42 lines
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   #################    #  #  # #  ###
Re: Fortran, mixed GL and Keyboard input
#77
Author: jesse neri
Date: Tue, 05 Jan 1993 22:03
46 lines
2655 bytes
In article <C0E97A.9Cu@ra.nrl.navy.mil> neri@hobbes.nrl.navy.mil (jesse neri) writes:
>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.  
>

And the answer is to call foregr before the winope.  The winning
suggestion cam courtesy of Kian-Tat Lim (ktl@wag.caltech.edu).  I also make
sure that the queue is cleared before going on, but that may superfluous.

Thanks again to all.  The quality of the SGI support on USENET, from
SGI personnel and others, was one of the factors in my choosing SGI systems,
and you all have come through for me again.  



-- 
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   #################    #  #  # #  ###
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads