> Any example on how to use an offscreen bitmap in vala gtk ? > I need to show an image generated via 3d rendering but I cannot > recreate it > on every draw request.
I suggest you look at pixbuf: https://valadoc.org/gdk-pixbuf-2.0/Gdk.Pixbuf.html First create an off-screen pixbuf using one of its creation methods. Then create a cairo context to write onto the pixbuf using: https://valadoc.org/gdk-3.0/Gdk.cairo_surface_create_from_pixbuf.html You can copy the pixbuf onto another cairo surface (the visible widget) using: https://valadoc.org/gdk-3.0/Gdk.cairo_set_source_pixbuf.html My vala project at https://sourceforge.net/projects/pasang-emas/ uses pixbuf, but I don't have any conveniently distilled example. Nice day Nor Jaidi Tuah [https://drive.google.com/uc?id=1b4cWTCBfgIRVuVv9iDUuHkscey4c5Ug9] PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you are neither the addressee (intended recipient) nor an authorised recipient of the addressee, and have received this message in error, please destroy this message (including attachments) and notify the sender immediately. STRICT PROHIBITION: This message, whether in part or in whole, should not be reviewed, retained, copied, reused, disclosed, distributed or used for any purpose whatsoever. Such unauthorised use may be unlawful and may contain material protected by the Official Secrets Act (Cap 153) of the Laws of Brunei Darussalam. DISCLAIMER: We/This Department/The Government of Brunei Darussalam, accept[s] no responsibility for loss or damage arising from the use of this message in any manner whatsoever. Our messages are checked for viruses but we do not accept liability for any viruses which may be transmitted in or with this message. _______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list