Re: Display Raster Data?
- From: Luca Bacci <luca bacci982 gmail com>
- Cc: ML-gtk <gtk-list gnome org>
- Subject: Re: Display Raster Data?
- Date: Wed, 1 Aug 2018 18:52:53 +0200
in GTK3, this is almost certainly not the best way to do this. You want
to use a frame timer based on the refresh/vblank cycle of the monitor.
Yes you're right, I just meant to give the base idea.
..I think that gtk_widget_queue_draw_area() enqueues a redraw at the next frame clock tick, so draws are always done on frame-clock.
But I'm not sure, so it's best to base everything on the frame clock anyway.
This is what I first tried to do but could not find good information
on it. It seems I need to quickly create and destroy objects no matter
what I do which is why I sent this message.
I can set an image control's GdkPixbuf but there seems to be no way to
change the data that a GdkPixbuf points to.
It may also be necessary
to create another GtkImage to perform double buffering inside the
window.
No, you never experience flickering in Gtk. Gtk is completely double buffered by itself
If you want to know more, there is a nice overview:
But doing properly double or triple buffered video isn't that hard.
The hard part is integrating the display and event loop with GTK+.
That's not a problem, GStreamer integrates well with the Gtk main loop
and there are video sinks for Gtk, like GtkSink and GstVideoOverlay
Considering my issues here and in the other post I made about command
line arguments my solution for now is to just not use GTK+ in
preference of SDL2. This has the benefit of getting me very easy video
acceleration and better cross platform support. (The application links
in about 1/5th the time.)
Well SDL2 is a good library, sure. Choose what best suits your needs
Hope it helps.
Have a nice day!
Luca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]