Go to the source code of this file.
◆ fl_renderer_gdk_class_init()
static void fl_renderer_gdk_class_init |
( |
FlRendererGdkClass * |
klass | ) |
|
|
static |
◆ fl_renderer_gdk_clear_current()
static void fl_renderer_gdk_clear_current |
( |
FlRenderer * |
renderer | ) |
|
|
static |
◆ fl_renderer_gdk_create_contexts()
gboolean fl_renderer_gdk_create_contexts |
( |
FlRendererGdk * |
renderer, |
|
|
GError ** |
error |
|
) |
| |
fl_renderer_gdk_create_contexts: @renderer: an #FlRendererGdk. @error: (allow-none): #GError location to store the error occurring, or NULL to ignore.
Create rendering contexts.
Returns: TRUE if contexts were created, FALSE if there was an error.
Definition at line 95 of file fl_renderer_gdk.cc.
96 g_return_val_if_fail(FL_IS_RENDERER_GDK(
self), FALSE);
98 self->gdk_context = gdk_window_create_gl_context(self->window,
error);
99 if (self->gdk_context ==
nullptr) {
102 if (!gdk_gl_context_realize(self->gdk_context,
error)) {
106 self->main_context = gdk_window_create_gl_context(self->window,
error);
107 if (self->main_context ==
nullptr) {
110 if (!gdk_gl_context_realize(self->main_context,
error)) {
114 self->resource_context = gdk_window_create_gl_context(self->window,
error);
115 if (self->resource_context ==
nullptr) {
118 if (!gdk_gl_context_realize(self->resource_context,
error)) {
References error, and TRUE.
Referenced by create_context_cb().
◆ fl_renderer_gdk_dispose()
static void fl_renderer_gdk_dispose |
( |
GObject * |
object | ) |
|
|
static |
Definition at line 60 of file fl_renderer_gdk.cc.
61 FlRendererGdk*
self = FL_RENDERER_GDK(
object);
63 g_clear_object(&self->gdk_context);
64 g_clear_object(&self->main_context);
65 g_clear_object(&self->resource_context);
67 G_OBJECT_CLASS(fl_renderer_gdk_parent_class)->dispose(
object);
Referenced by fl_renderer_gdk_class_init().
◆ fl_renderer_gdk_get_context()
GdkGLContext* fl_renderer_gdk_get_context |
( |
FlRendererGdk * |
renderer | ) |
|
fl_renderer_gdk_get_context: @renderer: an #FlRendererGdk.
Returns: the main context used for rendering.
Definition at line 125 of file fl_renderer_gdk.cc.
126 g_return_val_if_fail(FL_IS_RENDERER_GDK(
self),
nullptr);
127 return self->gdk_context;
Referenced by create_context_cb().
◆ fl_renderer_gdk_get_refresh_rate()
static gdouble fl_renderer_gdk_get_refresh_rate |
( |
FlRenderer * |
renderer | ) |
|
|
static |
Definition at line 43 of file fl_renderer_gdk.cc.
44 FlRendererGdk*
self = FL_RENDERER_GDK(renderer);
45 GdkDisplay* display = gdk_window_get_display(self->window);
47 gdk_display_get_monitor_at_window(display, self->window);
48 if (monitor ==
nullptr) {
52 int refresh_rate = gdk_monitor_get_refresh_rate(monitor);
53 if (refresh_rate <= 0) {
57 return static_cast<gdouble
>(refresh_rate) / 1000.0;
Referenced by fl_renderer_gdk_class_init().
◆ fl_renderer_gdk_init()
static void fl_renderer_gdk_init |
( |
FlRendererGdk * |
self | ) |
|
|
static |
◆ fl_renderer_gdk_make_current()
static void fl_renderer_gdk_make_current |
( |
FlRenderer * |
renderer | ) |
|
|
static |
◆ fl_renderer_gdk_make_resource_current()
static void fl_renderer_gdk_make_resource_current |
( |
FlRenderer * |
renderer | ) |
|
|
static |
◆ fl_renderer_gdk_new()
FlRendererGdk* fl_renderer_gdk_new |
( |
| ) |
|
◆ fl_renderer_gdk_set_window()
void fl_renderer_gdk_set_window |
( |
FlRendererGdk * |
renderer, |
|
|
GdkWindow * |
window |
|
) |
| |
fl_renderer_gdk_set_window: @renderer: an #FlRendererGdk. @window: the window that is being rendered on.
Set the window that is being rendered on. This is only called once when the window is available.
Definition at line 88 of file fl_renderer_gdk.cc.
89 g_return_if_fail(FL_IS_RENDERER_GDK(
self));
91 g_assert(self->window ==
nullptr);
92 self->window = window;
Referenced by create_context_cb().