Re: [fltk.coredev] GL root Fl_Gl_Window::draw

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: GL root Fl_Gl_Window::draw imacarthur 04:45 Sep 30 top right image
 
On Thursday, 29 September 2022 at 08:56:28 UTC+1 Manolo wrote:
With the last commit (da66e21), the addition of FLTK widgets to an OpenGL 3-based Fl_Gl_Window
works in my hands accross all platforms and OS versions, including Windows 10-32-bit and macOS 10.9.
Toggle betwen double and single buffer modes also works.

OK - this commit seems to work - mostly. My macOS and 64-bit Win builds are now good.
32-bit Win still crashes for me.
I assumed that was some weirdness in my messed-up mingw configuration (it often is!) but possibly not this time.
Since I now (coincidentally) have a working 32-bit MSVC build, I fired that off and it also fails in the same way. 

Since I'm running to from the IDE, MSVC reports this is because:

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

This is in the method (the debugger flags that exception at the end of this method):

void Fl_Gl_Window_Driver::switch_to_GL1() {
  if (!glUseProgram_f) {
    glUseProgram_f = (glUseProgram_type)GetProcAddress("glUseProgram");
  }
  glGetIntegerv(GL_CURRENT_PROGRAM, &current_prog);
  // Switch from GL3-style to GL1-style drawing;
  // good under Windows, X11 and Wayland; not appropriate under macOS.
  // suggested by https://stackoverflow.com/questions/22293870/mixing-fixed-function-pipeline-and-programmable-pipeline-in-opengl
  if (current_prog) glUseProgram_f(0);
}

The GLEW lib I'm using for this test was built with the same MSVC IDE, so I assume it is compatible here.

TBH I have no solid idea what that error message is actually telling us happened here!

Clearly, whatever it is, it works fine on other platforms...

--
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/c4811ca6-8ee0-4a27-8b5f-30d0354aa159n%40googlegroups.com.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.