---Sherlock, Ric wrote
> but I have put the following together which if I'm lucky 
> might be a step
> in the right direction?
 
Redefining the following verbs will clean up globals.

NB. dat=:256 #. [: |."1 [: [ 256 256 256 #: [: readbmp jpath

study_P0_button=: 3 : 0
  imgfn=. '~system\examples\data\toucan.bmp'
  study_g_paint imgfn
  wd 'setfocus P0;'
)

study_P1_button=: 3 : 0
  imgfn=. '~system\examples\data\jbox.bmp'
  study_g_paint imgfn
  wd 'setfocus P1;'
)

study_g_paint=: 3 : 0
  glclear ''
  dat=. 256 #. |."1 [ 256 256 256 #: readbmp jpath y
  glpixels_jgl2_ (0 33,|.$dat),,dat
  glpaint_jgl2_ ''
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to