there is no init event, see
http://www.jsoftware.com/jwiki/OpenGL%20ES

compatibility profile is discouraged because its support varies with and
also depends on vendor, model, driver.

prototypes of opengl 1.0 to 1.3 api have been removed from gles addon
because they are also not defined in C gl.h header file.

glBegin / glEnd are no longer used to pass vertex. VBO are used instead.

Your program looks like a legacy opengl 1.x  which is no longer supported.
At least it needs a vertex shader.

The source code of shader demo can offer some perspective of what a modern
opengl program will look like.

IMO directly translating the old opengl lab material is rather difficult,
eg there are no longer any glu.... functions for drawing simple geometry
objects such as sphere , cylinder or teapot.

not sure for the domain error in glGetPixels, but I think it is not yet
relevant.
On Mar 23, 2015 10:53 PM, "Raul Miller" <[email protected]> wrote:

> So, I've been working on converting the old opengl tutorial to current
> J standards, and I've been running into problems where I lack
> sufficient perspective to see the solution.
>
> Here's my current issue:
>
> https://gist.github.com/rdm/ef3fe864d337324771de
>
> Loading that ogl_simple.ijs script in jqt (j803) renders a triangle for me.
>
> There are some oddities to it:
>
> (*) the triangle appears different in osx than in windows, which
> reflect porting issues which should probably be addressed somehow.
>
> (*) the "init" event happens after the "paint" event, and happens
> every paint event, which suggests it's mis-named, and should not be a
> separate event.
>
> But the real puzzler is what happens when I call get_pixels, for
> example with the dimensions 10 10. I get a domain error when trying to
> call glReadPixels.
>
> cderx'' claims that there's no error and that the operation completed
> successfully.
>
> cder'' claims that the problem is that the argument at index 6 (the
> memory address supplied by mema) is of the wrong  type.
>
> Neither of these claims make sense to me.
>
> What I'm hoping is that someone with sufficient access to jqt source
> code can run this under a debugger and tell me what the error is
> really about.
>
> Thanks,
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to