User:Raul Miller/OpenGL

From J Wiki
Jump to navigation Jump to search

Update: these notes are old, and somewhat obsolete. I have been studying and want to write some relatively small and interesting tools based on that information. Until I properly absorb the API and browser issues, though, I'll just recommend studying those pages.

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:

J wiki J6/OpenGL docs

Some notes on the some interface features of the jzopengl support

Some example code

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

Here's some more comprehensive documentation on opengl

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
 alloc__ogl 4 4
 if._1<nc<'ogl'do.destroy__ogl ::]''end.

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

Other (simple) notes:

[[../../Raul Miller/OpenGL/Page0|opengl applications, and opengl color]], and some additional notes about [[../../Raul Miller/OpenGL/Color|color]]

[[../../Raul Miller/OpenGL/Page1|window coordinates]]

[[../../Raul Miller/OpenGL/Page2|opengl coordinates]]

[[../../Raul Miller/OpenGL/Page3|stale notes about shaders]] this issue has been fixed in j6.02, I need to upgrade my notes