I am resending this message because I received no replies and because it does not appear in the archive.
(B=) ---------- Forwarded message ---------- Date: Sat, 3 Jun 2006 20:35:15 -0400 (EDT) From: Brian Schott <[EMAIL PROTECTED]> Reply-To: Beta forum <[email protected]> To: [email protected] Subject: [Jbeta] J6 changes in openGL (jzopenglutil.ijs) I could use some help with the attached code. It loads all right and I can use the keycommands like x,y,z, i,o, j,k, F3,F4 etc., to move the image around. I can also issue commands like the following and translate the dodecahedron as I desire. makedodec _1 0 0 paint'' makedodec 1 0 0 paint'' What I cannot do is resize the opengl window without the image disappearing and I cannot reissue the command "openglut_run''" without the image disappearing temporarily also (the image comes back if I do another makedodec 1 0 0 paint'' for example. The problem seems to be related to the sequence found in the verb openglut_run which is as follows. In that sequence, if I COULD place the makedodec before the gsinit, several things would work easier; but all fails if I change the sequence. gsinit '' makedodec 0 0 0 NB. cannot be moved above gsinit'' ***** glCallList DODEC gsfini '' There must be a simple solution to this problem but I can't see it. TIA, (B=) *********************script below ************************* NB. oglut1.ijs NB. 6/3/6 NB. system\examples\graphics\opengl\lab\oglut1.ijs NB. cocurrent 'plab' require 'opengl' coinsert 'jzopenglutil' OPENGLUT=: 0 : 0 pc openglut closeok; xywh 0 0 200 150;cc g isigraph opengl rightmove bottommove; pas 0 0; rem form end; ) openglut_run=: 3 : 0 if. wdisparent 'openglut'do. wd'psel openglut;pactive' wh__ogl=: '' makedodec 0 0 0 openglut_g_paint'' else. wd OPENGLUT wdmove _1 0 ogl=: ''conew'jzopengl' gsinit '' makedodec 0 0 0 NB. cannot be moved above gsinit'' ***** glCallList DODEC gsfini '' wd'pshow;' end. ) openglut_close=: 3 : 0 destroy__ogl'' wd 'pclose' ) openglut_cancel=: openglut_close NB. ========================================================= paint=: 3 : 0 gsinit '' glCallList DODEC gsfini '' ) DODEC =: 1 makedodec =: 3 : 0 TRANSLATE =: y draw makelist DODEC '' i. 0 0 ) draw =: 3 : 0 glTranslate TRANSLATE gsdrawdodecahedron'' ) openglut_g_paint=: paint openglut_g_char=: gschar openglut_default=: gsdefault NB. ========================================================= openglut_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
