|
|
On Fri, 30 Sept 2022 at 12:56, imacarthur <imacarthur@gmail.com> wrote:
>
>
> Staring at this a bit, I assume the issue is that (under 32-bit Windows) we're invoking the function pointer glUseProgram_f() with the wrong calling convention (given that Windows seems to have several calling conventions.)
>
> But... I'm not sure that we are, it kinda looks OK.
> Don't know.
Seems to be a calling convention thing after all.
Explicitly changing the typedef for glUseProgram_type in
Fl_Gl_Window_Driver.H to become either of:
typedef void(__stdcall *glUseProgram_type)(GLint);
or
typedef void(APIENTRY *glUseProgram_type)(GLint);
Works for me, and the 32-bit mingw and (32-bit) MSVC builds no longer
segfault, indeed they now work correctly.
I think (but am not sure!) that the second form (the APIENTRY format)
is the more "portable" option.
But in either case we'll need something clever around that typedef as
setting APIENTRY is *not* going to be correct on macOS or X11!
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/CAGFM6daO8u3eJx8Aagk3et6WNStqrOvhOJb-L0gS4GvDnnqjoA%40mail.gmail.com.
[ Direct Link to Message ] | |
|
| |