require 'gl3'

A=: noun define
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=: verb define
wd A
glaRC''
wd 'pshow;ptop'
)

a_g_size=:verb define
glViewport 0 0,glqwh''
glMatrixMode GL_PROJECTION
glLoadIdentity''
glOrtho 0 1 0 1 _1 1
)

a_g_paint =: verb define
glEnable GL_BLEND
glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
glShadeModel GL_FLAT
glClearColor 0 0 0 0
glClear GL_COLOR_BUFFER_BIT

glColor 1 1 0 0.75
glRect 0 0 0.5 1

glColor 0 1 1 0.75
glRect 0 0 1 0.5

glColor 0 1 1 0.75
glRect 0.5 0.5 1 1

glColor 1 1 0 0.75
glRect 0.5 0.5 1 1

glaSwapBuffers ''
)

a_run''
