The best I can promise right now is that I'll leave your message in my inbox
as a reminder. I'll take a look if I have a chance but it won't be till
after I get out the first phase of the new beta release and that is still at
least a week or so away.

On Sun, Nov 15, 2009 at 5:11 PM, Brian Schott <schott.br...@gmail.com>wrote:

> Eric,
>
> A very old problem has not been solved and I would like to remind you
> of it. I am replying to "this" message to give some temporal
> perspective. Notice, that the code you asked me to run on my Mac,
> which apparently *did* run at that time, does *not* run now and
> produces the following error. But that is not the main problem, so
> please read on.
>
>   load '/Users/brian/j602-user/temp/104.ijs'
>   run''
> |domain error: wd
> |       wd A
>
> In the meanwhile, I have also reported this error in the jwiki and
> cannot notice a resolution. And btw, the simplest "keystroke" error
> which occurs is that the Mac escape button does not close the graphics
> window as it does before the error occurs.
>
>
> http://www.jsoftware.com/jwiki/System/Library/Bugs#A.22for..22loopingldemocausesjavafrontendfailure
>
> I have produced a somewhat simpler script which demonstrates the
> problem. The script is a very slight revision to the standalone opengl
> demo script which creates a black triangle.
>
> j602/system/examples/graphics/opengl/demo/glviews.ijs
>
> The only extra code in glviews.ijs is the following.
>
> drawtriangle=: monad define
> glColor3d 0 0 0
> glBegin GL_POLYGON
>  glVertex 1  ,0  ,0,1
>  glVertex 0  ,1  ,0,1
>  glVertex _1 ,0  ,0,1
> glEnd ''
> )
>
> paint=: 3 : 0
>  wd'psel opengl;pactive'
>  if. ''-:y
>    do. GS_CLEARCOLOR=.0 0 255
>    else. GS_CLEARCOLOR=: y
>  end.
>  gsinit GS_LIGHT
>  drawtriangle ''
>  gsfini''
> )
>
> The extra code replaces the "XX" in glviews.ijs .
>
> Then the opengl graphics can be exercised by entering the following
> command in the ijx window. The number 60 in the following line
> controls the number of background color changes are executed.
>
> paint_gldemo_"1] 60 3 ?...@$ 255
>
> The problem is that after some number of color changes, the graphics
> opengl window becomes unresponsive to keystroke commands, even to the
> "close window" =Escape command on the Mac. Presumably on different
> platforms the number of color changes before this failure occurs will
> be different, and likely a higher number than on my antique Mac.
> Although there is some slight cumulative deterioration of this
> phenomenon, I am mostly referring to a failure from a single execution
> of the above line.
>
> I would really like to eradicate this problem.
>
> On Mon, Feb 6, 2006 at 4:47 PM, Eric Iverson <eiver...@sympatico.ca>
> wrote:
> > Brian,
> >
> > I have done a quick test with the Java front end in windows. I found two
> > bugs/differences between Jwdw (windows front end) and Jwdp (portable Java
> > front end) that probably explain why things don't work as expected on
> your
> > Mac.
> >
> > The 1st is that a glpaintx'' is required at the end of the go verb in
> Java
> > opengl. I need to look into this.
> >
> > The 2nd is that in the sys_timer event handler Jwdp has lost the
> selection
> > of the current form and current isigraph and this means the go in the
> timer
> > event gets an error and turns of the timer. Adding a few smoutput calls
> in
> > the timer event made this obvious.
> >
> > The script that follows is modified to add the glpaintx and to go and to
> do
> > psel and glsel in the timer event. The psel and gsle are necessary
> anyways
> > as causing any event on any other form would cause failure in the windows
> > example for the same reason.
> >
> > I have also wrapped the sentences at the end that were automatically run
> (I
> > hate scripts that do this) into a run verb.
> >
> > Please try the following on your Mac. Run the script and then run
> sentence
> > run'' and with lots of luck you'll see a tumbling cube.
> >
> > **
> > require 'opengl'
> > coinsert 'jgl3 jzopengl'
> >
> > AMBIENT=: 0.15
> > DIFFUSE=: 0.7
> > SPECULAR=: 0.7
> > ROTXYZ=: 40 50 0
> >
> > go=: 3 : 0
> > glrotate 2 3 5
> > startlist LRotate
> > stdrotate''
> > endlist''
> > stdpaint''
> > glpaintx''
> > )
> >
> > A=: 0 : 0
> > pc a closeok;
> > xywh 0 0 200 200;
> > cc g isigraph ws_clipchildren  ws_clipsiblings rightmove bottommove;
> > pas 0 0;pshow;ptop;
> > rem form end;
> > )
> >
> > a_g_paint=: stdpaint
> > a_g_size=: stdsizeaspect
> >
> > sys_timer_z_=: 3 : 0
> > try.
> > wd'psel a'
> > glsel 'g'
> > go ''
> > catch. wd'timer 0' end.
> > )
> >
> > run=: 3 : 0
> > wd A
> > glreset''
> > glaRC''
> > LISTS=: NURBS=: QUADS=: ''
> > glEnable GL_DEPTH_TEST
> > glclearcolor CLEARCOLOR
> > glcolor COLOR
> > stdlistlight''
> > genlist 'Box'
> > drawcube makelist Box 0 0 1
> > a_g_size''
> > wd 'pshow'
> > wd 'timer 15'
> > )
> >
> >
> >
> > ----- Original Message ----- From: <schott.br...@gmail.com>
> > To: "Programming forum" <programming@jsoftware.com>
> > Sent: Monday, February 06, 2006 10:57 AM
> > Subject: Re: [Jprogramming] opengl
> >
> >
> >> Fraser,
> >>
> >> I, too, wonder if there is a problem with the Mac
> >> implementation. Btw, can you describe the behavior you
> >> observed before (and after, if possible) you typed go'' ,
> >> please?
> >>
> >> On Tue, 7 Feb 2006, Fraser Jackson wrote:
> >>
> >> + Brian,
> >> +
> >> + I have tried Chris's script on both J504 and J601 under Windows XP and
> >> it
> >> + works fine.  Is there some difference between the implementations on
> the
> >> Mac
> >> + and in Windows causing your problem.
> >> +
> >> + Fraser
> >> +
>
> --
> (B=) <-----my sig
> Brian Schott
>
> *****************************
> PS. The complete script follows below.
>
> NB. Standalone version of opengl demo.
> NB.
> NB. This text can be cut and pasted into a single script.
>
> require 'opengl'
> 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. =========================================================
> drawtriangle=: monad define
> glColor3d 0 0 0
> glBegin GL_POLYGON
>  glVertex 1  ,0  ,0,1
>  glVertex 0  ,1  ,0,1
>  glVertex _1 ,0  ,0,1
> glEnd ''
> )
>
> paint=: 3 : 0
>  wd'psel opengl;pactive'
>  if. ''-:y
>    do. GS_CLEARCOLOR=.0 0 255
>    else. GS_CLEARCOLOR=: y
>  end.
>  gsinit GS_LIGHT
>  drawtriangle ''
>  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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to