On Mon, 20 Feb 2006 14:33:17 -0500
"Tony Pelton" <[EMAIL PROTECTED]> wrote:

> thanks for the reply.
> 
> On 2/20/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> >
> > I just tried under linux and it works:
> 
> with these changes ? or without ?
> 
> > Call in glpaint ctrl_opengl.Invalidate
> 
> i did this first, and this seemed to fix my problem.
> 
> can you explain what this does to me ?

Invalidate tells the widgetset to mark the control for painting. That means
it will send a paint message onto the message queue. It will automatically
collect al paint messages for each control and send only one paint per
contro. 
 
> are there any performance issues with this ?

The LCL, the window manager and the widgetset create a lot of Invalidate
events, so this is a fast action.

 
> should i put this before my OpenGL draw calls ?

No. It should not be used during painting, as you would create an endless
loop.

 
> after i "swap" GL buffers ?

This is independent.
Normally you swap buffers at the end of opengl painting.

 
> > and paint in ctrl_opengl.OnPaint.
> 
> i didn't do this, because the other thing seemed to work.

If you don't paint in OnPaint, your graphic will not be painted, when you
hide your window and show it.

 
> should i still do this ?

Yes. It is sufficient to only paint there.

 
> if so, i'm not sure i understand ...
> 
> on the "OnPaint" event, i should call "paint" on the OpenGL context ?

?


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to