Re: [Jprogramming] OpenGL

2020-03-05 Thread Brian Schott
All, I think I have found 2 problems and fixed them. I hope this continues to work. 0) I made the following change in `a_g_paint`: adding the second line of the 4 lines. glBindBuffer GL_ARRAY_BUFFER; {.vbo glBufferData GL_ARRAY_BUFFER; (#vertexData); (symdat <'vertexData'); GL_STATIC_DRAW glEnab

Re: [Jprogramming] OpenGL

2020-03-04 Thread Brian Schott
Bill, Following your great recommendation I created the verb `right` below. right=: 3 : 0 wh=. gl_qwh'' vd=. (gl_Rotate y, 0 0 1) mp~ 0,.~_3]\_1 fc vertexData p=. symdat <'vertexData' d=. 1&fc ,vd d memw p,0,(#d),2 gl_sel HD gl_paint'' ) After running the script I can see that `vertexData` has b

Re: [Jprogramming] OpenGL

2020-03-03 Thread bill lam
symdat <'vertexData' is a pointer to the data (not header). If you want to update without re-assigning the name, you could do something like p=. symdat <'vertexData' d=. 1&fc (new vertex data) d memw p,0,(#d),2 but beware of any side effects Tue, 03 Mar 2020, Brian Schott написал(а): > All, >

Re: [Jprogramming] OpenGL

2020-03-03 Thread Raul Miller
Here you go -- a multi-turtle system. (Though, when rotated -- hold down x -- this also demonstrates that I should deal with my gl_Frustum issues. And, I should really implement color properly...) Also... I noticed that 48.ijs only worked if a_run'' had previously run... oops. I've verified that 4

Re: [Jprogramming] OpenGL

2020-03-03 Thread Raul Miller
Think of vertexData and colorData (recast and restructured in 48.ijs as renderVertices and renderColors) as being a representation of the all the turtles and all their trails. You also might not have noticed my 'direction' and 'position' variables. In 48.ijs, those were designed around the idea th

Re: [Jprogramming] OpenGL

2020-03-03 Thread Brian Schott
All, Recall that I am (re)developing a multiple turtle, turtle graphics system using modern openGL. I have been unable to find examples of how to do this, and the examples that come close use C++ and GLM which hide from me some of the essentials. What follows is my current understanding of how I m

Re: [Jprogramming] OpenGL

2020-03-01 Thread Raul Miller
Yeah, looks like I wasn't understanding the mechanism of buffer binding. As for painting -- what I am trying to say is that you'll have to lay down vertices to hold the colors in position. I'll see if I can draft up a version of your implementation where that makes more sense. Thanks, -- Raul

Re: [Jprogramming] OpenGL

2020-03-01 Thread Raul Miller
Er... never mind on this. The implementation I was looking at relied on binding and unbinding buffers at paint time. Oops, -- Raul On Sat, Feb 29, 2020 at 10:19 AM Raul Miller wrote: > > The code I was looking at freed the buffers during initialization (before any > paint operations). That m

Re: [Jprogramming] OpenGL

2020-02-29 Thread Thomas McGuire
At some point you are supposed to use a 3D drawing program like Blender or Maya, have it generate a ‘.obj’ file that contains all the vertex and coloring information. People publish some open source ‘.obj’s of familiar characters. That was ultimately my goal: Could I get J to read in a ‘.obj’ an

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
I got it for color. Now let me play with that a little. Thanks, On Sat, Feb 29, 2020 at 8:20 PM bill lam wrote: > there is a > glClearColor 0 0 0 0 > inside a_g_paint, or it should be 0 0 0 1? > > you can use a global noun say BColor to hold its value. If you want another > color, you change the

Re: [Jprogramming] OpenGL

2020-02-29 Thread bill lam
there is a glClearColor 0 0 0 0 inside a_g_paint, or it should be 0 0 0 1? you can use a global noun say BColor to hold its value. If you want another color, you change the content, eg 1 0 0 1, of this noun, and then gl_sel and gl_paint to trigger a paint event to render according to the current s

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
Bill, You're going right over my head. Can you show how a verb like "white" can change the background color to white, for example, or how a more general verb "background" can take a rgb vector argument? I'm not versed in callbacks, for example. Without such a feature "logo" style free inputs canno

Re: [Jprogramming] OpenGL

2020-02-29 Thread bill lam
you can setup state for drawing outside paint event, but all actual drawing must happen inside paint event, the verb a_g_paint, the callback verb. It is useless if you call the verb from your code or copying the commands inside and execute them from your code. For opengl drawing you need a opengl

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
Raul, Yes, I have, and had, read that buffer page. It does not shed light on your comment for me. Regarding 'paint'ing, your comment makes sense, but is not prescriptive enough for me to move forward. I have experimented in several ways but with no usable results. For example, I tried the follo

Re: [Jprogramming] OpenGL

2020-02-29 Thread Raul Miller
There are a variety of ways you could draw eyes. But, as a matter of priorities, I would first focus in laying down a trail (or sequence of turtles) indicating the turtle's path. You could use a texture (internal image) to put eyes on your turtle. You could do something like a soccer ball with onl

Re: [Jprogramming] OpenGL

2020-02-29 Thread Raul Miller
Have you read the second paragraph at https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glBindBuffer.xml ? As for your paint issue--you're basically going to need instructions in the paint callback which lays down geometry (or whatever) for your painted surface. Does this make sense?

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
Very nice, Tom. I removed 1,"1~ from colorData1=: 1&fc ,1,"1~_3]\3#"2] 0&". ;._2 [ 0 : 0 and got 1-color tetrahedral faces. In a_g_paint changing glClearColor 0 0 0 0 to glClearColor 0 0 0 1 produce black background for the window. I'm anxious to figure out more, like how to put static eyes on t

Re: [Jprogramming] OpenGL

2020-02-29 Thread Thomas McGuire
Attached is a running copy that uses Brian’s tetrahedron with the original cube and now they are both side by side. Spinning around. I expand vbo to handle this with one buffer name that is a list of glGenBuffers locations. I print out what I receive back from the buffer call. This shows what

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
Attached is a running copy of the tetrahedron (turtle?) script. -- (B=) cocurrent 'demoshader' mp=: (+/ . *)"2 copies =: $,: sprog=: 0 GLSL=: 0 STOP=: 0 A=: 0 : 0 pc a; minwh 300 300;cc g opengl flush; rem form end; ) a_run=: 3 : 0 NB. if. -. checkrequire_qtdemo_ 'gles';'api/gles' do. return.

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
Raul (et al), I'm not sure I understand your question/observation. By freeing up buffers do you mean something like the following (that is, the 0 there)? glBindBuffer GL_ARRAY_BUFFER;0 On another note, or perhaps a continuation of your point, please read on. In my turtle graphics script I want

Re: [Jprogramming] OpenGL

2020-02-29 Thread Raul Miller
The code I was looking at freed the buffers during initialization (before any paint operations). That might work better if there's no additional buffers being created, but it's probably not ideal. Do you have anything like that in your code? Thanks, -- Raul On Sat, Feb 29, 2020 at 12:41 AM Tho

Re: [Jprogramming] OpenGL

2020-02-29 Thread bill lam
Ah, I missed the vbo bug that needed to fix for j807. with these 2 fixes, I can see a solid color tetrahedron. press z and x to rotate to see all faces. vbo=: >@{:glGenBuffers 2;2#_1 colorData=: 1&fc , 3# 0&". ;._2 [ 0 : 0 1 0 0 0 1 0 0 0 1 1 1 0 ) the color of the 3 vertex of the first triangl

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
2 comments below. 0) I confirmed that scaling the original vertices DOES rescale the object. Before it did not. (Increasing the 10 in the line below reduces the tetrahedron's size.) vertexData=: 1&fc ,1 2 0 0 2 3 3 2 1 1 0 3{4 3$, %&10, 0&". ;._2 [ 0 : 0 1) A couple of simple changes enabled me

Re: [Jprogramming] OpenGL

2020-02-29 Thread Brian Schott
Thomas and Bill, Raul has done some terrific sleuthing and may have found a key problem. He found that the shader.ijs needs the following line to work properly. vbo=: 2 {:: glGenBuffers 2;2#_1 Another key problem I stumbled on is vertex sequence for the tetrahedron. Apparently, just winding is n

Re: [Jprogramming] OpenGL

2020-02-29 Thread bill lam
I think there maybe some bug in shader, in that if colorData is multiplied by 1.2 , the tetrahedron became bigger, if multiplied by 0.5, it became smaller. Don't know why color will change the size. On Fri, Feb 28, 2020, 9:52 PM Brian Schott wrote: > Bill, especially (Thomas, Raul, and others),

Re: [Jprogramming] OpenGL

2020-02-28 Thread bill lam
Right, format is rgba, but alpha channel not enabled in shader.ijs it needs to add 2 lines, glEnable GL_BLEND glBlendFunc GL_SRC_ALPHA; GL_ONE_MINUS_SRC_ALPHA otherwise alpha is ignored. Fri, 28 Feb 2020, Raul Miller написал(а): > On Fri, Feb 28, 2020 at 2:09 PM Brian Schott wrote: > > Of course

Re: [Jprogramming] OpenGL

2020-02-28 Thread Thomas McGuire
I added your tetrahedron object data into my test file for shader.ijs. The goal was to get a tetrahedron and a cube up there rotating. What I got was 2 badly formed tetrahedron rotating. I had thought from my reading that the shader should keep these entities distinct. I don’t know why I can’t

Re: [Jprogramming] OpenGL

2020-02-28 Thread bill lam
It is shown up at the bottom, because we have a habit of top posting. Fri, 28 Feb 2020, Raul Miller написал(а): > And... this shows up in the forum archive -- not as an attachment, but > as the tail end of my post. > > http://jsoftware.com/pipermail/programming/2020-February/055196.html > > So,

Re: [Jprogramming] OpenGL

2020-02-28 Thread Brian Schott
Raul, My problems with color may be different from the ones you mention. In the pair of lines below in the shader.ijs program, the first is the original line and the second is the line that gives some, but CRAZY, uniform face color. NB. glVertexAttribPointer colorAttr; 3; GL_FLOAT; 0; 0; 0 glVert

Re: [Jprogramming] OpenGL

2020-02-28 Thread Raul Miller
On Fri, Feb 28, 2020 at 2:09 PM Brian Schott wrote: > Of course I am still struggling with painting the faces of the tetrahedrons > as solid colors. They are my tentative turtles. I am now wondering if my > problem is related to the use of four-element color vectors instead of > three element. I h

Re: [Jprogramming] OpenGL

2020-02-28 Thread Brian Schott
Thomas, I agree with Bill that this is a great step forward in understanding how to use opengl. My main interest is in doing a turtle graphics app which enables multiple turtles to appear on the screen. In the previous version I had to keep track of the position and heading of each turtle for eac

Re: [Jprogramming] OpenGL

2020-02-28 Thread 'Jim Russell' via Programming
I got the short .txt file as an attachment, which opened when asked. > On Feb 28, 2020, at 1:16 PM, Raul Miller wrote: > > Here's the same file with a .txt extension. -- For information about J forums see http://www.jsoftware.c

Re: [Jprogramming] OpenGL

2020-02-28 Thread Raul Miller
And... this shows up in the forum archive -- not as an attachment, but as the tail end of my post. http://jsoftware.com/pipermail/programming/2020-February/055196.html So, that's promising. Thanks, -- Raul On Fri, Feb 28, 2020 at 1:15 PM Raul Miller wrote: > > I attached an .ijs > > Here's t

Re: [Jprogramming] OpenGL

2020-02-28 Thread Raul Miller
I attached an .ijs Here's the same file with a .txt extension. Thanks, -- Raul On Fri, Feb 28, 2020 at 12:31 PM 'robert therriault' via Programming wrote: > > Hey Raul, > > I think that Bill was suggesting that you convert the .ijs file to .txt > before attaching. Did you attach a .txt versi

Re: [Jprogramming] OpenGL

2020-02-28 Thread 'robert therriault' via Programming
Hey Raul, I think that Bill was suggesting that you convert the .ijs file to .txt before attaching. Did you attach a .txt version or the .ijs version of the file. Cheers, bob > On Feb 28, 2020, at 09:23, Raul Miller wrote: > > And... I do not see the attachment at > http://jsoftware.com/pipe

Re: [Jprogramming] OpenGL

2020-02-28 Thread Raul Miller
And... I do not see the attachment at http://jsoftware.com/pipermail/programming/2020-February/055193.html The other copy seems to indicate that my attachment got the mime type "application/octet-stream", despite it being text content (I was hoping for "text/plain".) That said, ... I should proba

Re: [Jprogramming] OpenGL

2020-02-28 Thread Raul Miller
Hmm... I am attaching an example .ijs file to this response. I am also bcc'ing a copy of this message to an alternate email address, so that I can see how it gets treated outside the forums. Will the attachment show up at http://jsoftware.com/pipermail/programming/2020-February/date.html? (I wil

Re: [Jprogramming] OpenGL

2020-02-28 Thread bill lam
I think J forum actually accept text file attachments. Attach .ijs file as .txt file probably work if email client set mime type correctly. Fri, 28 Feb 2020, Raul Miller написал(а): > This is getting to be long enough that it might help to use a resource > like github (either a repository or a gis

Re: [Jprogramming] OpenGL

2020-02-28 Thread Raul Miller
This is getting to be long enough that it might help to use a resource like github (either a repository or a gist) or even pastebin (rather than email) to distribute it. (I'm still getting going for today, and haven't actually tried this, yet. But I'm anticipating some difficulties separating text

Re: [Jprogramming] OpenGL

2020-02-28 Thread bill lam
1&fc convert j double number to single precision bit pattern because single precision is used in kernels. Double precision is not well supported in low-end GPU. If 1&fc is omitted, GPU will interpret the buffer of double precision as single precision bit patterns. On Fri, Feb 28, 2020, 9:52 PM Bri

Re: [Jprogramming] OpenGL

2020-02-28 Thread Brian Schott
All, With my tetrahedron example I have the following completely different color scheme. colorData=: 1&fc ,1,"1~_3]\3#"2] 0&". ;._2 [ 0 : 0 1 0 0 0 1 0 1 1 1 0 1 1 ) This color scheme uses length 4 vectors instead of length 3 vectors: glVertexAttribPointer colorAttr; 4; GL_FLOAT; 0; 0; 0 The go

Re: [Jprogramming] OpenGL

2020-02-28 Thread Brian Schott
Bill, especially (Thomas, Raul, and others), Your comment regarding trying a simpler figure and simplifying the color has led me to consider several alternatives. Below I show a revised script which uses a tetrahedron (4 faces) and some color changes. I think the tetrahedron is mostly working for

Re: [Jprogramming] OpenGL

2020-02-28 Thread bill lam
Thomas, thank you very much for the detail explanation. Fri, 28 Feb 2020, Thomas McGuire написал(а): > At first I thought I would have to. But after doing some searching on shaders > and OpenGL it turns out that if you don’t mind using the same shader, you can > just send multiple objects in and

Re: [Jprogramming] OpenGL

2020-02-28 Thread Thomas McGuire
At first I thought I would have to. But after doing some searching on shaders and OpenGL it turns out that if you don’t mind using the same shader, you can just send multiple objects in and different model-views into the original kernel (the GLSL code you are referring to). It gets a little cra

Re: [Jprogramming] OpenGL

2020-02-27 Thread bill lam
Kernel means the program running inside GPU, which is the c source stored inside nouns vsrc and fsrc. Fri, 28 Feb 2020, Thomas McGuire написал(а): > Not sure I know what you mean but I’m using 807 on a MacBook Pro with just > the full Jqt install. > > > On Feb 27, 2020, at 9:28 PM, bill lam wr

Re: [Jprogramming] OpenGL

2020-02-27 Thread Thomas McGuire
Not sure I know what you mean but I’m using 807 on a MacBook Pro with just the full Jqt install. > On Feb 27, 2020, at 9:28 PM, bill lam wrote: > > Did kernels need any modification? > > Thu, 27 Feb 2020, Thomas McGuire написал(а): >> It took me a while to understand this a little bit. But the

Re: [Jprogramming] OpenGL

2020-02-27 Thread bill lam
Did kernels need any modification? Thu, 27 Feb 2020, Thomas McGuire написал(а): > It took me a while to understand this a little bit. But the shader can render > any number of objects you just need to set up the data and tell the shader to > paint the object. To create 2 cubes I had to modify th

Re: [Jprogramming] OpenGL

2020-02-27 Thread Thomas McGuire
It took me a while to understand this a little bit. But the shader can render any number of objects you just need to set up the data and tell the shader to paint the object. To create 2 cubes I had to modify the a_g_initialize function and the a_g_paint function. I have placed comments in the co

Re: [Jprogramming] OpenGL

2020-02-17 Thread Thomas McGuire
On my MacBook Pro the F10 key is the run all lines key in JQt. So what happens to me is that a new window appears that exactly overlays the original window. If I click on the title bar and move the window with the cube, I find the original window is still there underneath. To fix this I ignore

Re: [Jprogramming] OpenGL

2020-02-15 Thread bill lam
My ignorance. 😀 On Sat, Feb 15, 2020, 11:23 PM Raul Miller wrote: > I think you're assuming 2d turtle, here? > > (Which might be a correct assumption?) > > Thanks, > > -- > Raul > > On Fri, Feb 14, 2020 at 7:19 PM bill lam wrote: > > > If you intended to run turtle graphics only, then drawing c

Re: [Jprogramming] OpenGL

2020-02-15 Thread Raul Miller
I think you're assuming 2d turtle, here? (Which might be a correct assumption?) Thanks, -- Raul On Fri, Feb 14, 2020 at 7:19 PM bill lam wrote: > If you intended to run turtle graphics only, then drawing cube is over > skilled. Drawing triangles is much simpler. eg a triangle with vertices >

Re: [Jprogramming] OpenGL

2020-02-14 Thread bill lam
If you intended to run turtle graphics only, then drawing cube is over skilled. Drawing triangles is much simpler. eg a triangle with vertices 0 1 0, 1 _1 0, _1 _1 0 then use different scale, translate and rotate to place them into different positions and orientations. Also only a constant solid c

Re: [Jprogramming] OpenGL

2020-02-14 Thread Raul Miller
p.s. yes, it should be possible to render many copies of the same cube, resetting it's position at the start of each paint, and looping through a list of coordinates representing a path which positions it. Thanks again, -- Raul On Fri, Feb 14, 2020 at 6:19 PM Brian Schott wrote: > Raul, > > Y

Re: [Jprogramming] OpenGL

2020-02-14 Thread Raul Miller
Oh, yes I hadn't been using the key commands, and had forgotten about them. Thanks, -- Raul On Fri, Feb 14, 2020 at 6:19 PM Brian Schott wrote: > Raul, > > Yes, you are a big help. > > However, you say that the only geometry to update in shader is R, but I > don't think so. LR (left and

Re: [Jprogramming] OpenGL

2020-02-14 Thread Brian Schott
Raul, Yes, you are a big help. However, you say that the only geometry to update in shader is R, but I don't think so. LR (left and right) is also explicitly updated, and IO (in and out) and UD (up and down) could potentially be updated. R is likely updating the heading of the turtle, but earlier

Re: [Jprogramming] OpenGL

2020-02-14 Thread Raul Miller
On Fri, Feb 14, 2020 at 4:15 PM Brian Schott wrote: > I am mostly interested in how commands in the Terminal window can be sent > to the Cube in the "a" window. Any pointers? There's two parts to the answer to your question, in the context of shader.ijs (1) Update the geometry being rendered, (2

Re: [Jprogramming] OpenGL

2020-02-14 Thread Brian Schott
Bill, Thank you very much. Mostly I want to get n turtles, not cubes, that are not rotating to time but behave like "Logo" turtles and react to commands in the Terminal window like Forward 3 and Right 90. So I want to start with 2 separate turtles and I guess I am all wrong in my idea that the lo

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
I tried to incoporate your change into shader.ijs with f8/f9 to change value for gl_translate. The changes lines are marked by NB. < pressing f8/f9 can trigger repaint and the matrix display also updated, but I can't see the cube at all. Pressing F10 to start original code, the cube came back.

Re: [Jprogramming] OpenGL

2020-02-13 Thread Raul Miller
On Thu, Feb 13, 2020 at 11:14 AM Brian Schott wrote: > Yes, I think I understand the normally gl_paint is called from event > handler, > and I am calling gl_paint directly myself. Can you tell me where the code > for event handler is so that I can see if it is making another call that I > am not a

Re: [Jprogramming] OpenGL

2020-02-13 Thread Raul Miller
On Thu, Feb 13, 2020 at 10:53 AM Brian Schott wrote: > Bill (et al), > > Can you comment on my initial assumption that shader.ijs is not really > moving the cube but is moving the eye in relation to the cube, (and that a > more common way to move **multiple** objects is to move them, not the eye.)

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
I think you can't call a_g_paint directly. Even you call, opengl code won't work because it must be executed inside paint event. you can trigger a repaint gl_paint and let the OS to call event handler. Why didn't you print out the y to see what is its value? On Fri, Feb 14, 2020, 12:14 AM Brian

Re: [Jprogramming] OpenGL

2020-02-13 Thread Brian Schott
Yes, I think I understand the normally gl_paint is called from event handler, and I am calling gl_paint directly myself. Can you tell me where the code for event handler is so that I can see if it is making another call that I am not aware of? On Thu, Feb 13, 2020 at 11:02 AM bill lam wrote: > a

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
a_g_paint is called from event handler, not from your code. unless you had called this verb directly. the viewport is glu_lookat, but I forgot most of it already. Thu, 13 Feb 2020, Brian Schott написал(а): > Bill (et al), > > Can you comment on my initial assumption that shader.ijs is not really

Re: [Jprogramming] OpenGL

2020-02-13 Thread Brian Schott
Bill (et al), Can you comment on my initial assumption that shader.ijs is not really moving the cube but is moving the eye in relation to the cube, (and that a more common way to move **multiple** objects is to move them, not the eye.) Bill, Replying to your 3 comments: 1)I have stopped the time

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
I think you should stop the timer so as not to interference your code. handler for paint event (and all events) receive no y argument. not sure what it looks like if mvp is translate only without projection from 3D to 2D. the screen is flat 2D. On Thu, Feb 13, 2020, 10:50 PM Brian Schott wrote:

Re: [Jprogramming] OpenGL

2020-02-13 Thread Brian Schott
Bill, I have changed the original F10 to produce `paint 0` and the usual key to produce `paint 1`. I have critical new information though: If I press x and y several times to reposition the cube in the expected manner, and then I press F10. The cube seems to go back to its original position (appr

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
It's quite difficult to follow what you had changed and the final script. Anyway mvp is recalculated inside paint event, not when F10 is pressed. On Thu, Feb 13, 2020, 10:22 PM Brian Schott wrote: > In my attempt to learn opengl I have edited the file shader.ijs . I will > show the following d

Re: [Jprogramming] OpenGL lab

2015-05-05 Thread chris burke
Thanks. These labs are out of date and should have been removed from the system. On 5 May 2015 at 06:43, Ryan wrote: > Hi, > > When I try to run the OpenGL lab I get > >Lab dependency not an addon: /Users/ryan/j64-803/bin/gl3 > > I checked my add ons and I have gl2, but I can't find anything

Re: [Jprogramming] OpenGL on Linux

2012-11-18 Thread bill lam
Which one, gtk2 or gtk3 did you use? I tried both of them worked. There were very few feedbacks on jgtk/opengl and I have only one linux box to test, therefore I really don't know what was wrong in your situation. If you can show how you got the gl context using libx11.so then it might be easie

Re: [Jprogramming] OpenGL on Linux

2012-11-18 Thread Alex Giannakopoulos
To add a bit of information: I tried a Radeon HD2400 card in place of the GeForce 8600 in my 64-bit Linux system. This time the system did not even get a chance to announce that it could not obtain a context, it crashed J(gtk) and closed all its windows as soon as the demo OpenGL program was run.

Re: [Jprogramming] OpenGL on Linux

2012-11-15 Thread Alex Giannakopoulos
Sorry, don't think I can help at the moment, I link against freeglut when I write in C, however I'll keep an eye out for code that accesses the x.orgNVidia driver directly (when I figure out how it's all plumbed). On 15 November 2012 14:30, bill lam wrote: > The hardest part should be getting th

Re: [Jprogramming] OpenGL on Linux

2012-11-15 Thread bill lam
The hardest part should be getting the opengl context, after that it should be fairly standard in all platforms. If there will some simple opengl demo source codes in plain C that can work with GeForce, then we may try to translate that into J. Чтв, 15 Ноя 2012, Michael Dykman писал(а): > You may

Re: [Jprogramming] OpenGL on Linux

2012-11-15 Thread Michael Dykman
You may be on the money with that one. I was unable to get GL working on a Linux 64 with a Geforce card in spite of considerable effort. On 2012-11-15 3:19 AM, "Alex Giannakopoulos" wrote: Thanks Bill That seems to narrow the problem down to Nvidia GeForce cards on 64-bit hardware. I'll keep

Re: [Jprogramming] OpenGL on Linux

2012-11-15 Thread Alex Giannakopoulos
Thanks Bill That seems to narrow the problem down to Nvidia GeForce cards on 64-bit hardware. I'll keep you posted on anything else I notice. On 15 November 2012 01:29, bill lam wrote: > I use 64-bit debian, on-board ati graphics with radeon driver from > x.org > > Linux debian 3.3.0-rc6-amd64

Re: [Jprogramming] OpenGL on Linux

2012-11-14 Thread bill lam
I use 64-bit debian, on-board ati graphics with radeon driver from x.org Linux debian 3.3.0-rc6-amd64 #1 SMP Mon Mar 5 20:53:11 UTC 2012 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS880 [Radeon HD 4200] Чтв, 15 Ноя 2012, Alex Giannakopoulos писал(а): > Hi All (especially B

Re: [Jprogramming] OpenGL on Linux

2012-11-14 Thread Alex Giannakopoulos
Hi All (especially Bill) Some of you may remember that a few days ago I wrote describing the problems I was having, trying to get OpenGL (both 701 and 602) to run on my Linux system. Well, I had the opportunity to try it on a number of systems, and on the basis of what I saw, I am now pretty sure

Re: [Jprogramming] OpenGL on Linux

2012-10-14 Thread Alex Giannakopoulos
Well, I edited all the options you suggested, Bill, and also the occurrence in the file glx.ijs, with every possible combination, and nothing worked. Damn. Oh, well, back to C++ for now then (bleah!) where at least OpenGL works. Hope I sort it out sometime soon, I'd much rather be working in J. Th

Re: [Jprogramming] OpenGL on Linux

2012-10-14 Thread bill lam
Not sure which lib was selected. You may edit the file ~addons/api/gl3/gl3.ijs and change the lines libgl=: 'libGL.so.1' libglu=: 'libGLU.so.1' to (eg) libglu=: '/usr/lib/libGLU.so.1' I have not installed any proprietary video driver to test, so there may be some issues there. Пнд, 15 Окт

Re: [Jprogramming] OpenGL on Linux

2012-10-14 Thread Alex Giannakopoulos
My system is Ubuntu Lucid 64 (LTS) I installed all J addons via pacman, right from the start! When I try to run something like: load '~addons/demos/opengl/simple/gldemos.ijs' or load '~addons/demos/opengl/demo/gldemo.ijs' the GTK windows open properly, but nothing is rendered, the message ret

Re: [Jprogramming] OpenGL on Linux

2012-10-14 Thread bill lam
I tested opengl (both 32 and 64-bits) worked in my debian. The context is provided by x11. Perhaps some addons such as api/x11 are missing. Install that addon and try again. If it still fails, then install all addons. You can always un-install addons in pacman. run demos by load '~addons/demos/op

Re: [Jprogramming] OpenGL on Linux

2012-10-14 Thread Alex Giannakopoulos
Decided to try 701, I had been putting it off... Quite nice, I found, the gtk ide seems OK, I also updated all the pacman stuff. I like it, I might carry on with it (I was a bit wary of anything new, my J is not that strong anyway) Guess what? Still no joy on the OpenGL front. It says "OpenGL OK"

Re: [Jprogramming] OpenGL on Linux

2012-10-14 Thread bill lam
The libGL and libGLU provided by mesa are fine although you should most probably already using libGL/libGLU provided by the nvidia driver. The problem is related to OSMesa (off-screen mesa), I suppose the libOSMesa6 is new enough and using libOSMesa7 won't help. I have never used osmesa and have n

Re: [Jprogramming] OpenGL on Linux

2012-10-14 Thread Alex Giannakopoulos
Thanks for that Bill I got the latest (*.64) base library and de-installed the freeglut stuff. >locate libOSMesa is reporting /usr/lib/libOSMesa.so /usr/lib/libOSMesa.so.6 /usr/lib/libOSMesa.so.6.5.3 So that seems fine. It is still not working though. The "opengl simple" demos open blank b

Re: [Jprogramming] OpenGL on Linux

2012-10-13 Thread bill lam
the j602 install from jsoftware.com is the oldest, the current verson is 64. pacman is the package manager in the menu of the ijx window. You should update it first. After that, I guess you can un-install freeglut dev and it can still work. Вск, 14 Окт 2012, Alex Giannakopoulos писал(а): > My vers

Re: [Jprogramming] OpenGL on Linux

2012-10-13 Thread Alex Giannakopoulos
My version is Engine: j602/2008-03-03/16:45 Library: 6.02.023 Is that very old? I have no idea how to use pacman, I found this: http://www.jsoftware.com/wsvn/web/trunk/pacman/ but not sure what to do about it. If it is really old, I may just download again from jsoftware.com and reinstall. S

Re: [Jprogramming] OpenGL on Linux

2012-10-13 Thread bill lam
You must use a very old version of J602 base library, please update base library from pacman first. The opengl (or simple opengl?) demo requires osmesa in linux j602, so I guess you still have to install that package, try in your shell $ sudo aptitude search libosmesa to obtain the actual packag

Re: [Jprogramming] OpenGL on Linux

2012-10-13 Thread Alex Giannakopoulos
Right OK, a bit of an update: I additionally installed the freeglut dev kit, and the first reported proplem has gone away. Now the dialog box with the 'Demos' opens, and what's more, most of the demos seem to run OK. However, there is still a problem with the OpenGL ones: If I click on the 'open

Re: [Jprogramming] OpenGL on Linux

2012-10-13 Thread bill lam
That should be the only use of find_dll not yet fixed. Please try in bash shell, $ locate libOSMesa.so and report what will be the output. (should be something like /usr/lib/libOSMesa.so.6) I did not install osmesa so not sure if nvdia opengl driver will conflict with osmesa or not. Сбт, 13 О