require 'gl3'

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

a_run=: verb define
wd A
glaRC''
glaFont 'arial 30 italic'
NB. glaUsefontBitmaps args
NB. (must be 0),(index first char),(#chars),(call list base)
glaUseFontBitmaps 0 32 128 1032
TEXT =: 'Type stuff here: '
wd 'setfocus g'
wd 'pshow;ptop'
)

a_g_char =: verb define
TEXT =: TEXT,{.sysdata
glpaintx''
)

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

a_g_paint =: verb define
glClearColor 1 1 1 1
glClear GL_COLOR_BUFFER_BIT
glColor 1 0 0 1
glRasterPos 50 100 0
glListBase 1000
glCallLists TEXT
glaSwapBuffers''
)

a_run''
