2007-03-22 14:21:59 -04:00
|
|
|
/* Clutter.
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
* Authored By Matthew Allum <mallum@openedhand.com>
|
|
|
|
* Copyright (C) 2006-2007 OpenedHand
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "clutter-backend-glx.h"
|
|
|
|
#include "clutter-stage-glx.h"
|
|
|
|
#include "clutter-glx.h"
|
|
|
|
|
|
|
|
#include "../clutter-main.h"
|
|
|
|
#include "../clutter-feature.h"
|
|
|
|
#include "../clutter-color.h"
|
|
|
|
#include "../clutter-util.h"
|
|
|
|
#include "../clutter-event.h"
|
|
|
|
#include "../clutter-enum-types.h"
|
|
|
|
#include "../clutter-private.h"
|
|
|
|
#include "../clutter-debug.h"
|
2007-05-22 05:31:40 -04:00
|
|
|
#include "../clutter-units.h"
|
2007-12-03 11:29:18 -05:00
|
|
|
#include "../clutter-shader.h"
|
2008-01-21 06:39:23 -05:00
|
|
|
#include "../clutter-group.h"
|
|
|
|
#include "../clutter-container.h"
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-04-27 17:13:06 -04:00
|
|
|
#include "cogl.h"
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
#include <GL/glx.h>
|
|
|
|
#include <GL/gl.h>
|
|
|
|
|
|
|
|
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
|
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
G_DEFINE_TYPE (ClutterStageGLX, clutter_stage_glx, CLUTTER_TYPE_STAGE_X11);
|
2007-03-22 14:21:59 -04:00
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_stage_glx_unrealize (ClutterActor *actor)
|
|
|
|
{
|
2007-11-15 09:45:27 -05:00
|
|
|
ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (actor);
|
2007-05-31 07:13:43 -04:00
|
|
|
ClutterStageGLX *stage_glx = CLUTTER_STAGE_GLX (actor);
|
2007-11-15 09:45:27 -05:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
gboolean was_offscreen;
|
|
|
|
|
|
|
|
CLUTTER_MARK();
|
|
|
|
|
|
|
|
g_object_get (actor, "offscreen", &was_offscreen, NULL);
|
|
|
|
|
2008-01-21 06:39:23 -05:00
|
|
|
/* Chain up so all children get unrealized, needed to move texture data
|
|
|
|
* across contexts
|
|
|
|
*/
|
|
|
|
CLUTTER_ACTOR_CLASS (clutter_stage_glx_parent_class)->unrealize (actor);
|
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
clutter_x11_trap_x_errors ();
|
2007-07-06 05:22:43 -04:00
|
|
|
|
2007-12-03 11:29:18 -05:00
|
|
|
/* Unrealize all shaders, since the GL context is going away */
|
|
|
|
clutter_shader_release_all ();
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (G_UNLIKELY (was_offscreen))
|
|
|
|
{
|
|
|
|
if (stage_glx->glxpixmap)
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
glXDestroyGLXPixmap (stage_x11->xdpy,stage_glx->glxpixmap);
|
|
|
|
stage_glx->glxpixmap = None;
|
|
|
|
}
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
if (stage_x11->xpixmap)
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
XFreePixmap (stage_x11->xdpy, stage_x11->xpixmap);
|
|
|
|
stage_x11->xpixmap = None;
|
|
|
|
}
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-11-15 09:45:27 -05:00
|
|
|
if (!stage_x11->is_foreign_xwin && stage_x11->xwin != None)
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
XDestroyWindow (stage_x11->xdpy, stage_x11->xwin);
|
|
|
|
stage_x11->xwin = None;
|
|
|
|
}
|
2007-03-22 14:21:59 -04:00
|
|
|
else
|
2008-01-31 18:10:30 -05:00
|
|
|
stage_x11->xwin = None;
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
glXMakeCurrent (stage_x11->xdpy, None, NULL);
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (stage_glx->gl_context != None)
|
|
|
|
{
|
2007-11-15 09:45:27 -05:00
|
|
|
glXDestroyContext (stage_x11->xdpy, stage_glx->gl_context);
|
2007-03-22 14:21:59 -04:00
|
|
|
stage_glx->gl_context = None;
|
|
|
|
}
|
2007-07-06 05:22:43 -04:00
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
XSync (stage_x11->xdpy, False);
|
2007-07-22 18:40:18 -04:00
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
clutter_x11_untrap_x_errors ();
|
2007-07-22 18:40:18 -04:00
|
|
|
|
|
|
|
CLUTTER_MARK ();
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_stage_glx_realize (ClutterActor *actor)
|
|
|
|
{
|
2007-11-15 09:45:27 -05:00
|
|
|
ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (actor);
|
2007-05-31 07:13:43 -04:00
|
|
|
ClutterStageGLX *stage_glx = CLUTTER_STAGE_GLX (actor);
|
2007-03-22 14:21:59 -04:00
|
|
|
gboolean is_offscreen;
|
|
|
|
|
|
|
|
CLUTTER_NOTE (MISC, "Realizing main stage");
|
|
|
|
|
|
|
|
g_object_get (actor, "offscreen", &is_offscreen, NULL);
|
|
|
|
|
|
|
|
if (G_LIKELY (!is_offscreen))
|
|
|
|
{
|
|
|
|
int gl_attributes[] =
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
GLX_RGBA,
|
|
|
|
GLX_DOUBLEBUFFER,
|
|
|
|
GLX_RED_SIZE, 1,
|
|
|
|
GLX_GREEN_SIZE, 1,
|
|
|
|
GLX_BLUE_SIZE, 1,
|
|
|
|
GLX_STENCIL_SIZE, 1,
|
|
|
|
0
|
|
|
|
};
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-11-20 12:06:23 -05:00
|
|
|
if (stage_x11->xvisinfo)
|
2007-12-03 11:16:41 -05:00
|
|
|
XFree (stage_x11->xvisinfo);
|
|
|
|
stage_x11->xvisinfo = NULL;
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2008-01-31 18:10:30 -05:00
|
|
|
/* The following check seems strange */
|
2007-11-15 09:45:27 -05:00
|
|
|
if (stage_x11->xvisinfo == None)
|
2008-01-31 18:10:30 -05:00
|
|
|
stage_x11->xvisinfo = glXChooseVisual (stage_x11->xdpy,
|
2007-12-03 11:16:41 -05:00
|
|
|
stage_x11->xscreen,
|
2008-01-31 18:10:30 -05:00
|
|
|
gl_attributes);
|
2007-11-15 09:45:27 -05:00
|
|
|
if (!stage_x11->xvisinfo)
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
g_critical ("Unable to find suitable GL visual.");
|
|
|
|
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
|
|
|
|
return;
|
|
|
|
}
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
if (stage_x11->xwin == None)
|
2007-03-22 14:21:59 -04:00
|
|
|
{
|
2008-01-31 18:10:30 -05:00
|
|
|
XSetWindowAttributes xattr;
|
|
|
|
unsigned long mask;
|
|
|
|
|
|
|
|
CLUTTER_NOTE (MISC, "Creating stage X window");
|
|
|
|
|
|
|
|
/* window attributes */
|
|
|
|
xattr.background_pixel = WhitePixel (stage_x11->xdpy,
|
|
|
|
stage_x11->xscreen);
|
|
|
|
xattr.border_pixel = 0;
|
|
|
|
xattr.colormap = XCreateColormap (stage_x11->xdpy,
|
2007-11-15 09:45:27 -05:00
|
|
|
stage_x11->xwin_root,
|
|
|
|
stage_x11->xvisinfo->visual,
|
2008-01-31 18:10:30 -05:00
|
|
|
AllocNone);
|
|
|
|
mask = CWBackPixel | CWBorderPixel | CWColormap;
|
|
|
|
stage_x11->xwin = XCreateWindow (stage_x11->xdpy,
|
|
|
|
stage_x11->xwin_root,
|
|
|
|
0, 0,
|
|
|
|
stage_x11->xwin_width,
|
|
|
|
stage_x11->xwin_height,
|
|
|
|
0,
|
|
|
|
stage_x11->xvisinfo->depth,
|
|
|
|
InputOutput,
|
|
|
|
stage_x11->xvisinfo->visual,
|
|
|
|
mask, &xattr);
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
2008-01-31 18:10:30 -05:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
CLUTTER_NOTE (MISC, "XSelectInput");
|
2007-11-15 09:45:27 -05:00
|
|
|
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
2007-03-22 14:21:59 -04:00
|
|
|
StructureNotifyMask |
|
2008-01-31 18:10:30 -05:00
|
|
|
FocusChangeMask |
|
2007-03-22 14:21:59 -04:00
|
|
|
ExposureMask |
|
2008-01-31 18:10:30 -05:00
|
|
|
/* FIXME: we may want to eplicity enable MotionMask */
|
|
|
|
PointerMotionMask |
|
|
|
|
KeyPressMask | KeyReleaseMask |
|
|
|
|
ButtonPressMask | ButtonReleaseMask |
|
|
|
|
PropertyChangeMask);
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-07-25 18:09:53 -04:00
|
|
|
/* no user resize.. */
|
2007-11-15 09:45:27 -05:00
|
|
|
clutter_stage_x11_fix_window_size (stage_x11);
|
2007-07-25 18:09:53 -04:00
|
|
|
|
2007-11-17 13:11:14 -05:00
|
|
|
clutter_stage_x11_set_wm_protocols (stage_x11);
|
2007-04-19 11:26:54 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (stage_glx->gl_context)
|
2008-01-31 18:10:30 -05:00
|
|
|
glXDestroyContext (stage_x11->xdpy, stage_glx->gl_context);
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-03-23 12:37:56 -04:00
|
|
|
CLUTTER_NOTE (GL, "Creating GL Context");
|
2007-11-15 09:45:27 -05:00
|
|
|
stage_glx->gl_context = glXCreateContext (stage_x11->xdpy,
|
2008-01-31 18:10:30 -05:00
|
|
|
stage_x11->xvisinfo,
|
|
|
|
0,
|
|
|
|
True);
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (stage_glx->gl_context == None)
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
g_critical ("Unable to create suitable GL context.");
|
|
|
|
|
|
|
|
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
|
2007-03-22 14:21:59 -04:00
|
|
|
|
|
|
|
return;
|
2008-01-31 18:10:30 -05:00
|
|
|
}
|
2007-03-22 14:21:59 -04:00
|
|
|
|
|
|
|
CLUTTER_NOTE (GL, "glXMakeCurrent");
|
2007-11-15 09:45:27 -05:00
|
|
|
glXMakeCurrent (stage_x11->xdpy, stage_x11->xwin, stage_glx->gl_context);
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int gl_attributes[] = {
|
2008-01-31 18:10:30 -05:00
|
|
|
GLX_DEPTH_SIZE, 0,
|
|
|
|
GLX_ALPHA_SIZE, 0,
|
|
|
|
GLX_RED_SIZE, 1,
|
|
|
|
GLX_GREEN_SIZE, 1,
|
|
|
|
GLX_BLUE_SIZE, 1,
|
|
|
|
GLX_USE_GL,
|
|
|
|
GLX_RGBA,
|
|
|
|
0
|
2007-03-22 14:21:59 -04:00
|
|
|
};
|
|
|
|
|
2008-01-31 18:10:30 -05:00
|
|
|
if (stage_x11->xvisinfo)
|
|
|
|
XFree (stage_x11->xvisinfo);
|
|
|
|
|
|
|
|
stage_x11->xvisinfo = NULL;
|
2007-03-22 14:21:59 -04:00
|
|
|
|
|
|
|
CLUTTER_NOTE (GL, "glXChooseVisual");
|
2007-11-15 09:45:27 -05:00
|
|
|
stage_x11->xvisinfo = glXChooseVisual (stage_x11->xdpy,
|
2008-01-31 18:10:30 -05:00
|
|
|
stage_x11->xscreen,
|
|
|
|
gl_attributes);
|
2007-11-15 09:45:27 -05:00
|
|
|
if (!stage_x11->xvisinfo)
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
g_critical ("Unable to find suitable GL visual.");
|
|
|
|
goto fail;
|
|
|
|
}
|
2007-03-22 14:21:59 -04:00
|
|
|
|
|
|
|
if (stage_glx->gl_context)
|
2008-01-31 18:10:30 -05:00
|
|
|
glXDestroyContext (stage_x11->xdpy, stage_glx->gl_context);
|
2007-11-15 09:45:27 -05:00
|
|
|
|
|
|
|
stage_x11->xpixmap = XCreatePixmap (stage_x11->xdpy,
|
2008-01-31 18:10:30 -05:00
|
|
|
stage_x11->xwin_root,
|
|
|
|
stage_x11->xwin_width,
|
|
|
|
stage_x11->xwin_height,
|
|
|
|
DefaultDepth (stage_x11->xdpy,
|
|
|
|
stage_x11->xscreen));
|
2007-11-15 09:45:27 -05:00
|
|
|
|
|
|
|
stage_glx->glxpixmap = glXCreateGLXPixmap (stage_x11->xdpy,
|
2008-01-31 18:10:30 -05:00
|
|
|
stage_x11->xvisinfo,
|
|
|
|
stage_x11->xpixmap);
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
/* indirect */
|
2007-11-15 09:45:27 -05:00
|
|
|
stage_glx->gl_context = glXCreateContext (stage_x11->xdpy,
|
2008-01-31 18:10:30 -05:00
|
|
|
stage_x11->xvisinfo,
|
|
|
|
0,
|
|
|
|
False);
|
2007-05-25 06:56:09 -04:00
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
clutter_x11_trap_x_errors ();
|
2007-05-25 06:56:09 -04:00
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
glXMakeCurrent (stage_x11->xdpy,
|
2007-03-22 14:21:59 -04:00
|
|
|
stage_glx->glxpixmap,
|
|
|
|
stage_glx->gl_context);
|
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
if (clutter_x11_untrap_x_errors ())
|
2008-01-31 18:10:30 -05:00
|
|
|
{
|
|
|
|
g_critical ("Unable to set up offscreen context.");
|
|
|
|
goto fail;
|
|
|
|
}
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
|
2007-09-27 17:38:38 -04:00
|
|
|
/* Make sure the viewport gets set up correctly */
|
2007-11-15 09:45:27 -05:00
|
|
|
CLUTTER_SET_PRIVATE_FLAGS (actor, CLUTTER_ACTOR_SYNC_MATRICES);
|
2007-05-25 06:56:09 -04:00
|
|
|
return;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
|
|
|
|
/* For one reason or another we cant realize the stage.. */
|
|
|
|
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
|
|
|
|
return;
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
snapshot_pixbuf_free (guchar *pixels,
|
2008-01-31 18:10:30 -05:00
|
|
|
gpointer data)
|
2007-03-22 14:21:59 -04:00
|
|
|
{
|
|
|
|
g_free (pixels);
|
|
|
|
}
|
|
|
|
|
2007-06-19 10:10:25 -04:00
|
|
|
static GdkPixbuf*
|
2007-03-22 14:21:59 -04:00
|
|
|
clutter_stage_glx_draw_to_pixbuf (ClutterStage *stage,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
guchar *data;
|
|
|
|
GdkPixbuf *pixb;
|
|
|
|
ClutterActor *actor;
|
2007-05-31 07:13:43 -04:00
|
|
|
ClutterStageGLX *stage_glx;
|
2007-11-15 09:45:27 -05:00
|
|
|
ClutterStageX11 *stage_x11;
|
2007-03-22 14:21:59 -04:00
|
|
|
gboolean is_offscreen = FALSE;
|
|
|
|
|
|
|
|
stage_glx = CLUTTER_STAGE_GLX (stage);
|
2007-11-15 09:45:27 -05:00
|
|
|
stage_x11 = CLUTTER_STAGE_X11 (stage);
|
2007-03-22 14:21:59 -04:00
|
|
|
actor = CLUTTER_ACTOR (stage);
|
|
|
|
|
|
|
|
if (width < 0)
|
|
|
|
width = clutter_actor_get_width (actor);
|
|
|
|
|
|
|
|
if (height < 0)
|
|
|
|
height = clutter_actor_get_height (actor);
|
|
|
|
|
|
|
|
g_object_get (stage, "offscreen", &is_offscreen, NULL);
|
|
|
|
|
|
|
|
if (G_UNLIKELY (is_offscreen))
|
|
|
|
{
|
2007-11-15 09:45:27 -05:00
|
|
|
gdk_pixbuf_xlib_init (stage_x11->xdpy, stage_x11->xscreen);
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-06-19 10:10:25 -04:00
|
|
|
pixb = gdk_pixbuf_xlib_get_from_drawable (NULL,
|
2007-11-15 09:45:27 -05:00
|
|
|
(Drawable) stage_x11->xpixmap,
|
|
|
|
DefaultColormap (stage_x11->xdpy,
|
|
|
|
stage_x11->xscreen),
|
|
|
|
stage_x11->xvisinfo->visual,
|
2007-03-22 14:21:59 -04:00
|
|
|
x, y,
|
|
|
|
0, 0,
|
|
|
|
width, height);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-07-21 12:48:11 -04:00
|
|
|
GdkPixbuf *tmp = NULL, *tmp2 = NULL;
|
2007-06-19 10:10:25 -04:00
|
|
|
gint stride;
|
|
|
|
|
|
|
|
stride = ((width * 4 + 3) &~ 3);
|
|
|
|
|
|
|
|
data = g_malloc0 (sizeof (guchar) * stride * height);
|
2007-03-22 14:21:59 -04:00
|
|
|
|
|
|
|
glReadPixels (x,
|
2008-01-31 18:10:30 -05:00
|
|
|
clutter_actor_get_height (actor) - y - height,
|
|
|
|
width,
|
|
|
|
height, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
|
|
|
|
2007-06-19 10:10:25 -04:00
|
|
|
tmp = gdk_pixbuf_new_from_data (data,
|
2008-01-31 18:10:30 -05:00
|
|
|
GDK_COLORSPACE_RGB,
|
|
|
|
TRUE,
|
|
|
|
8,
|
|
|
|
width, height,
|
|
|
|
stride,
|
|
|
|
snapshot_pixbuf_free,
|
|
|
|
NULL);
|
|
|
|
|
2007-07-21 12:48:11 -04:00
|
|
|
tmp2 = gdk_pixbuf_flip (tmp, TRUE);
|
2007-06-19 10:10:25 -04:00
|
|
|
g_object_unref (tmp);
|
2007-07-21 12:48:11 -04:00
|
|
|
|
|
|
|
pixb = gdk_pixbuf_rotate_simple (tmp2, GDK_PIXBUF_ROTATE_UPSIDEDOWN);
|
|
|
|
g_object_unref (tmp2);
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
2007-06-19 10:10:25 -04:00
|
|
|
|
|
|
|
return pixb;
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_stage_glx_dispose (GObject *gobject)
|
|
|
|
{
|
2007-05-31 07:13:43 -04:00
|
|
|
ClutterStageGLX *stage_glx = CLUTTER_STAGE_GLX (gobject);
|
2007-11-15 09:45:27 -05:00
|
|
|
ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (gobject);
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-11-15 09:45:27 -05:00
|
|
|
if (stage_x11->xwin)
|
2007-03-22 14:21:59 -04:00
|
|
|
clutter_actor_unrealize (CLUTTER_ACTOR (stage_glx));
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (clutter_stage_glx_parent_class)->dispose (gobject);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2007-05-31 07:13:43 -04:00
|
|
|
clutter_stage_glx_class_init (ClutterStageGLXClass *klass)
|
2007-03-22 14:21:59 -04:00
|
|
|
{
|
|
|
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
|
|
|
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
|
|
|
ClutterStageClass *stage_class = CLUTTER_STAGE_CLASS (klass);
|
|
|
|
|
|
|
|
gobject_class->dispose = clutter_stage_glx_dispose;
|
|
|
|
|
|
|
|
actor_class->realize = clutter_stage_glx_realize;
|
|
|
|
actor_class->unrealize = clutter_stage_glx_unrealize;
|
|
|
|
stage_class->draw_to_pixbuf = clutter_stage_glx_draw_to_pixbuf;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2007-05-31 07:13:43 -04:00
|
|
|
clutter_stage_glx_init (ClutterStageGLX *stage)
|
2007-03-22 14:21:59 -04:00
|
|
|
{
|
2007-11-15 09:45:27 -05:00
|
|
|
;
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|