FLTK logo

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 Sep 21, 2022  
 
On Friday, 16 September 2022 at 14:09:07 UTC+1 Manolo wrote:

@Ian : do you think your technique to draw part of a scene with GL2 and use
the result in GL3 or vice versa could be used to support adding, under macOS,
FLTK widgets (which are drawn by Fl_OpenGL_Graphics_Driver using GL2) to
a GL3-based Fl_Gl_Window ? Do you have any hint about how to
draw first with GL3 and second with GL2 to the same Fl_Gl_Window under X11
and Windows? As written in the previous post, I believe to know how to do that
under Wayland, but that fails under X11.

So... I've had a look at my code, in an attempt to understand what it actually does (it's old, and was only written as a hack to try and view some old OBJ models in a stereoscopic way...)
Frankly, I have no idea why it works, but it appears to, on Win32 and macOS, and I remember it working on X11 at the time (have not checked today.)

So, the first thing is that the only Mac I have now is old, running 10.13 or so IIRC, so not all that current, and can not run any macOS more recent.
Next, all platforms (including OSX) seems to be using GLEW to access the "higher" API levels. (I might be wrong about this though!)

The OBJ models are rendered with some old code that uses GL1-style methods, these are written into buffers, which are then read into various other textures to apply the (anaglyphic) colour filtering and anti-aliasing, before getting merged together in yet more textures and rendered to the display. These later stages are using later GL API to do their magic, but I'm looking at the code and I do not understand what I did, nor have any idea why... (I also can't see why I needed so many intermediate buffers to get to the  end result.)

Anyway: The end result is that a picture does appear, and when viewed through the anaglyph glasses the stereoscopic effect works (more or less, as well as anaglyphic rendering, anyway) but...

I suspect the crux is that the GL-1.x and GL-3 stuff never actually happens in the same context (my recollection was that it did, that appears not to be true) - the GL-1.x stuff is effectively written out to a pixelmap and then read in by the GL-3 code.

Anyway, what I have is a mess and may only work by random chance!
It certainly does not look like something we should strive to reproduce.
 

--
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/6101f62e-4868-435f-b035-af110f5e8d02n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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