Class: Gtk::GLArea
- Inherits:
-
Object
- Object
- Gtk::GLArea
- Defined in:
- (unknown)
Overview
The ‘GtkGLAreaClass` structure contains only private data.
Instance Method Summary collapse
-
#attach_buffers ⇒ nil
Ensures that the area framebuffer object is made the current draw and read target, and that all the required buffers for the area are created and bound to the frambuffer.
-
#auto_render ⇒ TrueClass
Returns whether the area is in auto render mode or not.
-
#auto_render=(auto_render) ⇒ TrueClass
If set to true the Gtk::GLArea::render signal will be emitted every time the widget draws.
-
#auto_render? ⇒ TrueClass
If set to true the Gtk::GLArea::render signal will be emitted every time the widget draws.
-
#context ⇒ Gdk::GLContext
The Gdk::GLContext used by the #GtkGLArea widget.
-
#context=(context) ⇒ Gdk::GLContext
The Gdk::GLContext used by the #GtkGLArea widget.
-
#error ⇒ GLib::Error
Gets the current error set on the area.
-
#error=(error) ⇒ nil
Sets an error on the area which will be shown instead of the GL rendering.
-
#get_required_version(major, minor) ⇒ nil
Retrieves the required version of OpenGL set using gtk_gl_area_set_required_version().
-
#has_alpha ⇒ TrueClass
Returns whether the area has an alpha component.
-
#has_alpha=(has_alpha) ⇒ TrueClass
If set to true the buffer allocated by the widget will have an alpha channel component, and when rendering to the window the result will be composited over whatever is below the widget.
-
#has_alpha? ⇒ TrueClass
If set to true the buffer allocated by the widget will have an alpha channel component, and when rendering to the window the result will be composited over whatever is below the widget.
-
#has_depth_buffer ⇒ TrueClass
Returns whether the area has a depth buffer.
-
#has_depth_buffer=(has_depth_buffer) ⇒ TrueClass
If set to true the widget will allocate and enable a depth buffer for the target framebuffer.
-
#has_depth_buffer? ⇒ TrueClass
If set to true the widget will allocate and enable a depth buffer for the target framebuffer.
-
#has_stencil_buffer ⇒ TrueClass
Returns whether the area has a stencil buffer.
-
#has_stencil_buffer=(has_stencil_buffer) ⇒ TrueClass
If set to true the widget will allocate and enable a stencil buffer for the target framebuffer.
-
#has_stencil_buffer? ⇒ TrueClass
If set to true the widget will allocate and enable a stencil buffer for the target framebuffer.
-
#make_current ⇒ nil
Ensures that the Gdk::GLContext used by area is associated with the Gtk::GLArea.
-
#new ⇒ Gtk::Widget
Creates a new Gtk::GLArea widget.
-
#queue_render ⇒ nil
Marks the currently rendered data (if any) as invalid, and queues a redraw of the widget, ensuring that the Gtk::GLArea::render signal is emitted during the draw.
-
#set_required_version(major, minor) ⇒ nil
Sets the required version of OpenGL to be used when creating the context for the widget.
-
#use_es ⇒ TrueClass
Retrieves the value set by gtk_gl_area_set_use_es().
-
#use_es=(use_es) ⇒ TrueClass
If set to true the widget will try to create a Gdk::GLContext using OpenGL ES instead of OpenGL.
-
#use_es? ⇒ TrueClass
If set to true the widget will try to create a Gdk::GLContext using OpenGL ES instead of OpenGL.
Instance Method Details
#attach_buffers ⇒ nil
Ensures that the area framebuffer object is made the current draw and read target, and that all the required buffers for the area are created and bound to the frambuffer.
This function is automatically called before emitting the Gtk::GLArea::render signal, and doesn’t normally need to be called by application code.
#auto_render ⇒ TrueClass
Returns whether the area is in auto render mode or not.
#auto_render=(auto_render) ⇒ TrueClass
If set to true the Gtk::GLArea::render signal will be emitted every time the widget draws. This is the default and is useful if drawing the widget is faster.
If set to false the data from previous rendering is kept around and will be used for drawing the widget the next time, unless the window is resized. In order to force a rendering gtk_gl_area_queue_render() must be called. This mode is useful when the scene changes seldomly, but takes a long time to redraw.
#auto_render? ⇒ TrueClass
If set to true the Gtk::GLArea::render signal will be emitted every time the widget draws. This is the default and is useful if drawing the widget is faster.
If set to false the data from previous rendering is kept around and will be used for drawing the widget the next time, unless the window is resized. In order to force a rendering gtk_gl_area_queue_render() must be called. This mode is useful when the scene changes seldomly, but takes a long time to redraw.
#context ⇒ Gdk::GLContext
The Gdk::GLContext used by the #GtkGLArea widget.
The Gtk::GLArea widget is responsible for creating the #GdkGLContext instance. If you need to render with other kinds of buffers (stencil, depth, etc), use render buffers.
#context=(context) ⇒ Gdk::GLContext
The Gdk::GLContext used by the #GtkGLArea widget.
The Gtk::GLArea widget is responsible for creating the #GdkGLContext instance. If you need to render with other kinds of buffers (stencil, depth, etc), use render buffers.
#error ⇒ GLib::Error
Gets the current error set on the area.
#error=(error) ⇒ nil
Sets an error on the area which will be shown instead of the GL rendering. This is useful in the Gtk::GLArea::create-context signal if GL context creation fails.
#get_required_version(major, minor) ⇒ nil
Retrieves the required version of OpenGL set using gtk_gl_area_set_required_version().
#has_alpha ⇒ TrueClass
Returns whether the area has an alpha component.
#has_alpha=(has_alpha) ⇒ TrueClass
If set to true the buffer allocated by the widget will have an alpha channel component, and when rendering to the window the result will be composited over whatever is below the widget.
If set to false there will be no alpha channel, and the buffer will fully replace anything below the widget.
#has_alpha? ⇒ TrueClass
If set to true the buffer allocated by the widget will have an alpha channel component, and when rendering to the window the result will be composited over whatever is below the widget.
If set to false there will be no alpha channel, and the buffer will fully replace anything below the widget.
#has_depth_buffer ⇒ TrueClass
Returns whether the area has a depth buffer.
#has_depth_buffer=(has_depth_buffer) ⇒ TrueClass
If set to true the widget will allocate and enable a depth buffer for the target framebuffer.
#has_depth_buffer? ⇒ TrueClass
If set to true the widget will allocate and enable a depth buffer for the target framebuffer.
#has_stencil_buffer ⇒ TrueClass
Returns whether the area has a stencil buffer.
#has_stencil_buffer=(has_stencil_buffer) ⇒ TrueClass
If set to true the widget will allocate and enable a stencil buffer for the target framebuffer.
#has_stencil_buffer? ⇒ TrueClass
If set to true the widget will allocate and enable a stencil buffer for the target framebuffer.
#make_current ⇒ nil
Ensures that the Gdk::GLContext used by area is associated with the Gtk::GLArea.
This function is automatically called before emitting the Gtk::GLArea::render signal, and doesn’t normally need to be called by application code.
#new ⇒ Gtk::Widget
Creates a new Gtk::GLArea widget.
#queue_render ⇒ nil
Marks the currently rendered data (if any) as invalid, and queues a redraw of the widget, ensuring that the Gtk::GLArea::render signal is emitted during the draw.
This is only needed when the gtk_gl_area_set_auto_render() has been called with a false value. The default behaviour is to emit Gtk::GLArea::render on each draw.
#set_required_version(major, minor) ⇒ nil
Sets the required version of OpenGL to be used when creating the context for the widget.
This function must be called before the area has been realized.
#use_es ⇒ TrueClass
Retrieves the value set by gtk_gl_area_set_use_es().
#use_es=(use_es) ⇒ TrueClass
If set to true the widget will try to create a Gdk::GLContext using OpenGL ES instead of OpenGL.
See also: gdk_gl_context_set_use_es()
#use_es? ⇒ TrueClass
If set to true the widget will try to create a Gdk::GLContext using OpenGL ES instead of OpenGL.
See also: gdk_gl_context_set_use_es()