[Jprogramming] openGL stdpaintx
bill lam
bill_lam at myrealbox.com
Thu Feb 2 22:30:33 HKT 2006
Brian,
I think I began to understand your intention. You
are not interested in automatic color change at timer
interval, but want an instant update whenever you type
go'', is that correct?
If this is the case, you can simulate an instant update by
using a short timer interval. Try this
go =: 3 : 0
wd'psel a'
glsel 'g'
CLEARCOLOR =: ,&0?3#0
glClearColor CLEARCOLOR
)
sys_timer_z_ =: 3 : 0
try.
wd'psel a'
glsel_jgl2_ 'g'
glpaintx_jgl2_ ''
catch. end.
)
wd'timer 100' NB. 0.1 sec should be quick enough
go '' NB. change
go '' NB. change again
wd'timer 0' NB. reset timer
There is a small gotcha if you are using Win2000 or xp, you
should notice your screen will be corrupted very soon,
especially when you are trying to switch between different windows.
Win98/me do not have this problem.
More information about the Programming
mailing list