<CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

<CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

Squeak - Dev mailing list
Ok, progress....
SystemNavigation default browseAllSelect: [:m| m pragmas notEmpty] localToPackage: #OpenGL

SystemNavigation default browseAllSelect: [:m| m primitive isZero and: [m pragmas notEmpty]] localToPackage:#OpenGL



Its only showing primitive 120, it doesn't recognize the <apicall:module> as a pragma.

Here is an example of it not being recognized as a pragma vs one that is:

Pragma allNamed:#generated in:FFITestPoint2

Pragma allNamed:#apicall:module: in:OpenGL


Reading the class comment of OGLExtManager now trying to grok what's going wrong. It has some code to rewrite a method behind the scenes.


Whatever is rewriting the methods based on the <apicall:module:> pragma probably cannot see it.

Or, maybe I am completely in the wrong ballpark.

cool code, though. (:





Reply | Threaded
Open this post in threaded view
|

Re: <CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

Beckmann, Tom
Could you describe the actual problem you're currently facing? If you successfully got a triangle to display, you're most likely good to go. If you were trying to use an OpenGL Extension method (typically recognizable by an ARB or EXT suffix) you will go through the OGLExtManager, which has to resolve function pointers to extension methods at runtime. This might be another source of problems, but for regular OpenGL 1 usage for immediate mode drawing (glVertex... and friends) you should be good to go once the first triangle has popped up :)

Best,
Tom
________________________________________
From: Squeak-dev <[hidden email]> on behalf of gettimothy via Squeak-dev <[hidden email]>
Sent: Sunday, May 10, 2020 9:33:21 PM
To: squeak-dev
Subject: [squeak-dev] <CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

Ok, progress....
SystemNavigation default browseAllSelect: [:m| m pragmas notEmpty] localToPackage: #OpenGL

SystemNavigation default browseAllSelect: [:m| m primitive isZero and: [m pragmas notEmpty]] localToPackage:#OpenGL



Its only showing primitive 120, it doesn't recognize the <apicall:module> as a pragma.

Here is an example of it not being recognized as a pragma vs one that is:

Pragma allNamed:#generated in:FFITestPoint2

Pragma allNamed:#apicall:module: in:OpenGL


Reading the class comment of OGLExtManager now trying to grok what's going wrong. It has some code to rewrite a method behind the scenes.


Whatever is rewriting the methods based on the <apicall:module:> pragma probably cannot see it.

Or, maybe I am completely in the wrong ballpark.

cool code, though. (:




Reply | Threaded
Open this post in threaded view
|

Re: <CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

Levente Uzonyi
In reply to this post by Squeak - Dev mailing list
On Sun, 10 May 2020, gettimothy via Squeak-dev wrote:

> Ok, progress....
>       SystemNavigation default browseAllSelect: [:m| m pragmas notEmpty] localToPackage: #OpenGL
>
> SystemNavigation default browseAllSelect: [:m| m primitive isZero and: [m pragmas notEmpty]] localToPackage:#OpenGL
>
>
>
> Its only showing primitive 120, it doesn't recognize the <apicall:module> as a pragma.

FFI calls are not pragmas. They support different syntax, so they are
language extensions.


Levente

>
> Here is an example of it not being recognized as a pragma vs one that is:
>
> Pragma allNamed:#generated in:FFITestPoint2
>
> Pragma allNamed:#apicall:module: in:OpenGL
>
>
>
> Reading the class comment of OGLExtManager now trying to grok what's going wrong. It has some code to rewrite a method behind the scenes.
>
>
> Whatever is rewriting the methods based on the <apicall:module:> pragma probably cannot see it.
>
> Or, maybe I am completely in the wrong ballpark.
>
> cool code, though. (:
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: <CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

Squeak - Dev mailing list
---- On Sun, 10 May 2020 16:04:35 -0400 Levente Uzonyi <[hidden email]> wrote ----


FFI calls are not pragmas. They support different syntax, so they are
language extensions.


Levente




thx,

makes sense. in terms of FFI the <generated> is just documentation/marker stuff for use by the FFI test . Those classes, themselves are not Tests.


Here is my current thinking, there are x possiblities.

.

possibility 1. The <apicall:module> is a marker/tag used by "something" to insert platform specific method code . I see this approach  in OGLExtManager loadExtension:
in this possibility, then the fact that it is not recognized as a Pragma would explain the failure to replace the code.

possiblity 2. the <apicall:module:> is an actual call
if this is the case, it does not work, and I need a butt-simple library call to test this possibility.
Or, I need to find all existing <apicall:module:>  methods and see if they work.

thank you for your time










Reply | Threaded
Open this post in threaded view
|

Re: <CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

codefrau


On Sun, May 10, 2020 at 3:21 PM gettimothy via Squeak-dev <[hidden email]> wrote:
---- On Sun, 10 May 2020 16:04:35 -0400 Levente Uzonyi <[hidden email]> wrote ----


FFI calls are not pragmas. They support different syntax, so they are
language extensions.


Levente




thx,

makes sense. in terms of FFI the <generated> is just documentation/marker stuff for use by the FFI test . Those classes, themselves are not Tests.


Here is my current thinking, there are x possiblities.

.

possibility 1. The <apicall:module> is a marker/tag used by "something" to insert platform specific method code . I see this approach  in OGLExtManager loadExtension:
in this possibility, then the fact that it is not recognized as a Pragma would explain the failure to replace the code.

possiblity 2. the <apicall:module:> is an actual call
if this is the case, it does not work, and I need a butt-simple library call to test this possibility.
Or, I need to find all existing <apicall:module:>  methods and see if they work.

thank you for your time


As we mentioned before, get the plain FFI test working before you try *anything* with OpenGL.

- Vanessa -


Reply | Threaded
Open this post in threaded view
|

Re: <CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

Squeak - Dev mailing list
all FFI tests pass. In an earlier email I gave ab ecmple of incoking an FFI call that uses the cdecl


---- On Sun, 10 May 2020 19:33:26 -0400 [hidden email] wrote ----



On Sun, May 10, 2020 at 3:21 PM gettimothy via Squeak-dev <[hidden email]> wrote:
---- On Sun, 10 May 2020 16:04:35 -0400 Levente Uzonyi <[hidden email]> wrote ----


FFI calls are not pragmas. They support different syntax, so they are
language extensions.


Levente




thx,

makes sense. in terms of FFI the <generated> is just documentation/marker stuff for use by the FFI test . Those classes, themselves are not Tests.


Here is my current thinking, there are x possiblities.

.

possibility 1. The <apicall:module> is a marker/tag used by "something" to insert platform specific method code . I see this approach  in OGLExtManager loadExtension:
in this possibility, then the fact that it is not recognized as a Pragma would explain the failure to replace the code.

possiblity 2. the <apicall:module:> is an actual call
if this is the case, it does not work, and I need a butt-simple library call to test this possibility.
Or, I need to find all existing <apicall:module:>  methods and see if they work.

thank you for your time


As we mentioned before, get the plain FFI test working before you try *anything* with OpenGL.

- Vanessa -



Reply | Threaded
Open this post in threaded view
|

Re: <CDECL kerfuffled on OpenGL. was (Re: OGLUnixX11LE >> glPixelStorei: with:

codefrau
Ah, great. And since in another mail you mentioned that even CroquetGL works there I'd recommend to just look into that running system whenever something seems odd - quite often it may turn out to be a red herring, like the apicall issue.

- Vanessa -

On Mon, May 11, 2020 at 4:19 AM gettimothy <[hidden email]> wrote:
all FFI tests pass. In an earlier email I gave ab ecmple of incoking an FFI call that uses the cdecl


---- On Sun, 10 May 2020 19:33:26 -0400 [hidden email] wrote ----



On Sun, May 10, 2020 at 3:21 PM gettimothy via Squeak-dev <[hidden email]> wrote:
---- On Sun, 10 May 2020 16:04:35 -0400 Levente Uzonyi <[hidden email]> wrote ----


FFI calls are not pragmas. They support different syntax, so they are
language extensions.


Levente




thx,

makes sense. in terms of FFI the <generated> is just documentation/marker stuff for use by the FFI test . Those classes, themselves are not Tests.


Here is my current thinking, there are x possiblities.

.

possibility 1. The <apicall:module> is a marker/tag used by "something" to insert platform specific method code . I see this approach  in OGLExtManager loadExtension:
in this possibility, then the fact that it is not recognized as a Pragma would explain the failure to replace the code.

possiblity 2. the <apicall:module:> is an actual call
if this is the case, it does not work, and I need a butt-simple library call to test this possibility.
Or, I need to find all existing <apicall:module:>  methods and see if they work.

thank you for your time


As we mentioned before, get the plain FFI test working before you try *anything* with OpenGL.

- Vanessa -