These notes were originally written when J's opengl interface was being upgraded. In other words, some of the examples won't work with J601c

(They were originally written under J601 j beta, and were editted to work under the k beta. Hopefully, within a few days of Jan 7, 2007, these pages will be updated to reflect the production code.)


These are some notes on opengl programming with J.

At the moment, things are in transition between the opengl support of J5 and the future opengl support of J6. J6 has seen some changes, and more changes are promised. So I will probably need to come back and change things later.

Here's some of J's documentation on opengl:

Overall, the J materials are fairly sketchy and presume a decent understanding of opengl (and of J)

These docs are extremely comprehensive, but much does not apply to J (the promised rewrite should allow any available opengl feature to be accessed from inside J).

To bridge this gap, at least for myself, I'm recording some simple notes.

First, here's the mechanism to test whether opengl is properly installed:

testogl=: 3 : 0
try.
 require'jzopengl'
 ogl=.''conew'jzopengl'
 alloc__ogl 4 4
 destroy__ogl''
 1
catch.
 if._1<nc<'ogl'do.destroy__ogl ::]''end.
 0
end.
)

testogl returns 1 if opengl is properly installed and available to J, and returns 0 if not.


Other (simple) notes:

Raul Miller/OpenGL (last edited 2008-12-08 10:45:40 by )