On 13 Jan 2009, at 20:08, Jos Dreesen wrote:

>
> I wrote an emulator for the ETH Lilith computer, using Xlib.
> This works nicely and I now try to port it to fltk (1.3)
>
> However I am at a loss how to translate a central element, the  
> bitmap display .
>
> The Xlib code is :
>
> /* ---- Create Lilith display ---- */
> /* Define the image used to display the Lilith's bitmap */
> /* The offset into the lilith memory is hardcoded       */
>   lil_dsp = XCreateImage(displ, DefaultVisual(displ, screen), 1,  
> XYBitmap, 0, (char *) (mem+0x10008), LilDspWidth, LilDspHeight, 8,  
> LilDspWidth/8 );
>   lil_dsp->bitmap_bit_order = MSBFirst;
>   lil_dsp->byte_order       = MSBFirst;
>
>
> For FLTK i use fl_bitmap, and uncache to update the bitmapdata from  
> the emulated memory.
> Problems I have : it flickers drastically, and the bitmaporder is  
> wrong.
> Anby pointers on how to progress from here  ?  ( New to FLTK )

I'm not entirely sure, but I think this howto will maybe show you how  
to proceed:

    http://www.fltk.org/articles.php?L468  and  http://www.fltk.org/ 
articles.php?L466

The flickering ought to be addressed by making the enclosing window  
an Fl_Double_Window and ensuring that you only update the view during  
your derived widgets ::draw() method. I.e. resist the temptation to  
update the view dynamically during computation!

HTH,
-- 
Ian



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to