Conceptually speaking, when working with opengl, if there's an error,
you should be able to use glGetError and I think glGetString to
diagnose the error.
So, for example:
require 'graphics/gl2 api/gles'
coinsert 'jgl2 jgles'
FORM=: 0 : 0
pc form closeok;
minwh 320 240; cc gl opengl flush;
)
fshader=: 0 :0
main(void) {
gl_FragColor= vec4(1.0, 1.0, 1.0, 1.0);
}
)
form_run=: 3 : 0
wd FORM
'err program'=. gl_makeprogram '';fshader
if.#err do. smoutput err return. end.
glUseProgram program
gl_clear ''
wd 'pshow'
)
form_run''
|domain error: chkgl2
| gl_clear''
gl_clear
chkgl2@:('"C:/Users/user/j64-804/bin/jqt.dll" gl_clear >+ i'&cd@(''"_))
chkgl2
13!:8@(3"_)^:(0&~:)
glGetError''
1282
glGetString 1282
0
3{.glGetString 1281
0 0 0
Since 1282 corresponds to GL_INVALID_OPERATION, I would have expected
a string result which says something about an invalid operation. But
instead I got a numeric 0.
What additional steps should I be taking here? (Or what is the
documentation I should be reading to find those steps?)
Thanks,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm