Thank you, Raul!

The issue I'm having with the freeglut addon is that the addon seems to load properly (no errors), but I am unable to create a window of any kind.

However, I'm aware that my lack of J knowledge is most likely the culprit and I have some homework to do first. I purchased Henry Rich's "J for C" text and am currently slogging my way through. When I know enough to ask more intelligent questions...

Again, thanks and best wishes,

Stan


I do not have much experience with GLUT. I was never able to find
documentation on it which I felt I adequately understood and which was
relevant to the kinds of things I have wanted to do.

But, also, there's a lot of problems that can lead to blank screens,
so one of the first things I try to do is make sure I can update the
background color. If I can do that, the next thing is to see if I can
get any geometry to render in front of the "camera". It's the little
things that get you...

That said, if you have code that you want us to see if we can sort out
(hopefully not too complicated, at the beginning -- small problems are
easier to isolate than big problems), post it somewhere and we can try
to take a look at it.

Thanks,

--
Raul

On Tue, Jan 25, 2022 at 1:07 PM Stan Blank <[email protected]> wrote:

Thanks to Bob, Raul, Bill, Elijah for the help in getting me started with
OpenGL and J.  I'm a complete beginner (albeit a retired math/physics
teacher) and I have my work cut out for me.  The language is very
interesting to me and will hopefully help delay the onset of senility as I
try to learn something new.  Well, I can hope...  :-)

I looked at the OpenGL examples in J6.02 (great!) and have now installed
J9.03. I have the shader demo working in Windows and I'll try the Mac (and
also linux) this evening if time permits.  Fascinating stuff!

Question:  I have installed the freeglut addon and it appears to load
properly (no errors), but I can not generate a window or graphic.  I have
some experience with OpenGL/GLUT using C, Python, Fortran, and various
flavors of Basic.

I'll do my best to not be a pest... it's time for me to dig in!

Cheers... and again, thanks!

Stan


> It now works for me.
>
> Thanks,
>
> --
> Raul
>
> On Tue, Jan 25, 2022 at 10:09 AM bill lam <[email protected]> wrote:
>>
>> I fixed the qtdemo addons. Shader should work on macos now. Please >> update
>> and test again.
>>
>>
>> > On 24 Jan 2022, at 12:02 PM, bill lam <[email protected]> wrote:
>> >
>> > Thank you for this report. I also encountered the same issue on >> > apple >> > m1. Norman Drinkwater reported that it worked in vm (a rotating >> > cube)
>> > but not on physical machine. I'll investigate further.
>> >
>> >
>> >
>> > On Mon, Jan 24, 2022, 11:47 AM Raul Miller <[email protected]>
>> > wrote:
>> > That's an improvement.
>> >
>> > After changing the minwh line to specify opengl version 4.1, I get
>> > text (keys... scale... angle... matrix...) on the opengl screen
>> > (previously it was just black). And, the text is updating - if I
>> > recall correctly, though, I believe I should also be seeing a >> > rotating
>> > cube. And, I am not seeing any geometry being rendered -- only text.
>> >
>> > For reference, with this change, here's what the shader demo dumps
>> > into the jqt session:
>> >
>> > GL_VERSION: 4.1 ATI-2.11.20
>> > GL_VENDOR: ATI Technologies Inc.
>> > GL_RENDERER: AMD Radeon Pro 560 OpenGL Engine
>> > GL_SHADING_LANGUAGE_VERSION: 4.10
>> > #version 410 core
>> > in vec3 vertex;
>> > in vec3 color;
>> > out vec4 v_color;
>> > uniform mat4 mvp;
>> > void main(void)
>> > {
>> >   gl_Position = mvp * vec4(vertex,1.0);
>> >   v_color = vec4(color,1.0);
>> > }
>> >
>> > #version 410 core
>> > in vec4 v_color;
>> > out vec4 fragColor;
>> > void main(void)
>> > {
>> >   fragColor = v_color;
>> > }
>> >
>> > Also:
>> >    glGetError_jgles_ ''
>> > ┌─┐
>> > │0│
>> > └─┘
>> >
>> > I am not sure what else I should be checking. (If something went >> > wrong
>> > setting up the shader, I imagine there would have been a non-zero
>> > error value.)
>> >
>> > Thanks,
>> >
>> > --
>> > Raul
>> >
>> > On Sun, Jan 23, 2022 at 10:01 PM bill lam <[email protected]> >> > wrote:
>> > >
>> > > Another reference
>> > > https://www.khronos.org/opengl/wiki/Programming_OpenGL_on_macOS
>> > >
>> > > you can try edit the file shader.ijs in addons/demos/qtdemo around
>> > > line 11
>> > > from
>> > > minwh 300 300;cc g opengl flush;
>> > > to
>> > > minwh 300 300;cc g opengl version 4.1 flush;
>> > >
>> > > the version of GLSL is different from the version of OpenGL
>> > >
>> > > > On 24 Jan 2022, at 10:22 AM, Raul Miller <[email protected]>
>> > > > wrote:
>> > > >
>> > > > On Sun, Jan 23, 2022 at 9:14 PM Elijah Stone >> > > > <[email protected]>
>> > > > wrote:
>> > > >> On Sun, 23 Jan 2022, Raul Miller wrote:
>> > > >>> But that demo does not work on my OSX (Mojave) machine (which >> > > >>> has
>> > > >>> OpenGL
>> > > >>> 1.2). For whatever reasons (possibly including availability of
>> > > >>> good
>> > > >>> documentation), Apple has been slow to adopt newer versions of
>> > > >>> OpenGL
>> > > >>
>> > > >> Huh ... AFAIK apple stopped at opengl 4.2 or 4.3 or so which,
>> > > >> while not
>> > > >> great (I want dsa), is certainly passable; opengl 3.3 is a >> > > >> pretty
>> > > >> decent
>> > > >> baseline, and I think opengl 2 has a programmable pipeline
>> > > >> already.
>> > > >
>> > > > When I run the shader demo, I get:
>> > > >
>> > > > GL_VERSION: 2.1 ATI-2.11.20
>> > > > GL_VENDOR: ATI Technologies Inc.
>> > > > GL_RENDERER: AMD Radeon Pro 560 OpenGL Engine
>> > > > GL_SHADING_LANGUAGE_VERSION: 1.20
>> > > > #version 120
>> > > >
>> > > > I was referring to the value of GL_SHADING_LANGUAGE_VERSION.
>> > > >
>> > > > (This is with a current set of addons.)
>> > > >
>> > > > I do not know how that relates to the 4.1 mentioned in
>> > > > https://support.apple.com/en-us/HT202823
>> > > >
>> > > > FYI,
>> > > >
>> > > > --
>> > > > 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
>> > ----------------------------------------------------------------------
>> > For information about J forums see >> > http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
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