|
|
On 9/8/22 03:25 schrieb Gonzalo Garramuno wrote:
I am using OpenGL 4.1 on MacOS. I tried calling Fl_Gl_Window::draw() at the end of my GL viewport widget and was greeted with a crash in gl_draw / gl_font.
I'm not sure if I understand this correctly. What means "at the end of
my GL viewport widget"? Does this mean at the end of the constructor?
I know nearly nothing about OpenGL but IIRC it is possible to use GL
drawing methods anywhere if you call the appropriate make_current()
method. However, at the end of the constructor (if my assumption is
true) the window is very likely not yet shown or at least not yet mapped
to the screen. Or something like that.
Otherwise, shouldn't you better wait until FLTK calls draw() on your
widget as with all other widgets/windows?
Or maybe I misunderstood your question or I'm talking nonsense...
I am assuming the drawing of widgets in the GL context is just a OpenGL2 feature. Am I right?
Manolo answered this question already, but is this (mixing OpenGL 2 and
3+) really the cause? I believe you can also use OpenGL3+ on macOS if
you do it "correctly" (RTFM).
https://fltk.gitlab.io/fltk/opengl.html#opengl3
--
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/cacd76fb-c121-8edd-c590-f0c334565499%40online.de.
[ Direct Link to Message ] | |
|
| |