FLTK logo

Re: [fltk.general] Porting a Qt application that uses QOffscreenSurface and QOpenGLContext

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.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Porting a Qt application that uses QOffscreenSurface and QOpenGLContext Gonzalo Garramuno Sep 16, 2022  
 

> El 16 sep. 2022, a las 06:26, imm <imacarthur@gmail.com> escribió:
> 
> On Thu, 15 Sept 2022 at 23:17, Gonzalo wrote:
> 
>>> So... like creating an offscreen GL surface, and then getting the context for that, perhaps?
>> 
>> Yes.  The issue is that the offscreen GL surface is not drawn inside the GL window’s draw() method, so there’s no GL context.
>> 
> 

Okay.  Here’s how I solved it.  I created a class subclassing an Fl_Gl_Window of size 0, 0;  showed it so it created the context.   Then, in the draw() function I set the:

 if (! valid() )
{
// init gl, in my case with;
	initializeGL();
        valid(1);
}

The constructor of the class would create a thread calling the run() function of the class, which would process some movie thumbnails by calling make_current() just before the offscreen texture FBOs were created and drawn into.

—
Gonzalo Garramuno
ggarra13@gmail.com




-- 
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/066D7A4E-1817-432C-8FE0-057496B0B6A5%40gmail.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'.