Hi all, how can I avoid the flickering of clearing the screen and repainting it? I tried to paint into a context but can't get it visible. (on Linux X11, with BCC 3.1 I was not able to create a context as large as the screen at all). Can anybody please give me a hint? Thanks.
Regards Jan
Hi Jan,
how can I avoid the flickering of clearing the screen and repainting it? I tried to paint into a context but can't get it
visible.
(on Linux X11, with BCC 3.1 I was not able to create a context as
large
as the screen at all). Can anybody please give me a hint? Thanks.
You should use double buffering. draw to page1, display page 1, draw to page 2, display page 2, draw to page 1, display page 1, ...
I don't remeber the required function call but you might want to have a look at the bgi elmulation included in GRX and how BGI pages are handled. IIRC its setting the top left display pixel in display memory.
Hartmut
Jan Menzel escribió:
Hi all, how can I avoid the flickering of clearing the screen and repainting it? I tried to paint into a context but can't get it visible. (on Linux X11, with BCC 3.1 I was not able to create a context as large as the screen at all). Can anybody please give me a hint? Thanks.
You must use a double buffer.
First alloc a memory context. Save a pointer to the screen context. Set the memory context as current. While(1) { Draw. BitBlt to the screen context. Get input }
Regards, M.Alvarez