NB. ogl4.ijs

a_g_size =: verb define
glViewport 0 0  , glqwh ''     NB. left, bottom, width, height
)

a_g_paint =: verb define
glClearColor 0 0 1 0
glClear GL_COLOR_BUFFER_BIT
drawtriangle ''
glaSwapBuffers ''
)

drawtriangle =: verb define
glColor 1 0 0 0
glBegin GL_POLYGON
 glVertex  1 0 0
 glVertex  0 1 0
 glVertex _1 0 0
glEnd ''
)

A=: 0 : 0
pc a closeok;
xywh 0 0 100 100;cc g isigraph ws_clipchildren ws_clipsiblings rightmove bottommove;
pas 0 0;
rem form end;
)

a_run=: 3 : 0
wd :: ] 'psel a;pclose'
wd A
glaRC ''
R =: 0 0 0
wd 'pshow;ptop'
)
