Eric, et al,

I have new evidence of a peculiar problem with openGL on my Mac in my
dynamic simulation. If I load the script below and then type the
command `try 25` repeatedly, everything in the graphics window works
perfectly. But if I manually type `try 100` *just one time*, the
graphics window no longer responds to *any* keystrokes such as arrows,
F6, i, Esc, PageUp, etc.

So there seems to be a (memory?) limit I am hitting and it is a very
tight limit. I am anxious to get this fixed because my main real
simulation involves much more complicated dynamics than the one
described here, so the keystrokes become unworkable with just 1
execution.

Below is a fresh listing of my script, which I call
`testoglrepeat.ijs`. Please try it and give me suggestions.

Thanks,

(B=)

NB. *************************************************************
NB. testoglrepeat.ijs
NB. 12/24/6

NB. Standalone version of opengl demo.
NB.
NB. This text can be cut and pasted into a single script.

require 'opengl'
NB. cocurrent 'gldemo'
coinsert 'jzopenglutil'

gsetdefaults''

OPENGL=: 0 : 0
pc opengl;
xywh 0 0 200 150;cc g isigraph opengl rightmove bottommove;
pas 0 0;
rem form end;
)

opengl_run=: 3 : 0
wd OPENGL
ogl=: '' conew 'jzopengl'
wd'pshow;'
)

opengl_close=: 3 : 0
destroy__ogl''
ogl=: ''
wd 'pclose'
)

opengl_cancel=: opengl_close

NB. ===============================================
NB. cups surface - colored by height

j=. steps _2.4 2.4 35
f=. (5: * ] % ^...@+&*:)"0/~
CUPS=: 1.4*gsfit11 gsmakexyz (];];f) j

j=. (1r4"_ ,. |. ,. ]) _2}.8}. gsint01 16
CUPCLR=: j gshue gsfit01 {:"1 CUPS

gsetdefaults''
GS_CLEARCOLOR=: IVORY

pickone =: ".@({&COLORTABLE)

try =: monad define
  for. i. y do.
    g...@pickone@? 144
  end.
)

go =: monad define
  GS_CLEARCOLOR=: y
  paint''
)

paint=: 3 : 0
  wd'psel opengl;pactive'
  if. gsinit GS_LIGHT do.
      gsdrawsurface2 makelist 1 CUPS;CUPCLR
    end.
    gsclearcolor GS_CLEARCOLOR
    glCallList 1
    gsfini''
)


NB. ===============================================
opengl_g_paint=: paint
opengl_g_char=: gschar
opengl_default=: gsdefault

NB. ===============================================
opengl_run''
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to