ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If somebody have any idea or answer.
please let me know!!
I just wanna make clutter custom_actor to draw sphere
so I use clutter tutorial named clutter_triangle.c
this file positioned in
/clutter/clutter-tutorial/examples/custom_actor$
and i just put some gl function to draw sphere and mapped that by texture mapping. after that, if i move mouse pointer over the spherem, this error massage fill the screen.
/* Paint the sphere with the actor's color: */
ClutterColor color;
color.red = priv->color.red;
color.green = priv->color.green;
color.blue = priv->color.blue;
color.alpha = clutter_actor_get_opacity (self);
do_sphere_paint (self, &color);
}
static void
clutter_sphere_pick (ClutterActor *self, const ClutterColor *color)
{
/* Paint the sphere with the pick color, offscreen.
This is used by Clutter to detect the actor under the cursor
by identifying the unique color under the cursor. */
do_sphere_paint (self, color);
}
/**
* ClutterSphere:color:
*
* The color of the sphere.
*/
g_object_class_install_property (gobject_class,
PROP_COLOR,
g_param_spec_boxed ("color",
"Color",
"The color of the sphere",
CLUTTER_TYPE_COLOR,
G_PARAM_READABLE | G_PARAM_WRITABLE));
/**
* clutter_sphere_new:
*
* Creates a new #ClutterActor with a rectangular shape.
*
* Return value: a new #ClutterActor
*/
ClutterActor*
clutter_sphere_new (void)
{
return g_object_new (CLUTTER_TYPE_SPHERE, NULL);
}
/**
* clutter_sphere_new_with_color:
* @color: a #ClutterColor
*
* Creates a new #ClutterActor with a rectangular shape
* and with @color.
*
* Return value: a new #ClutterActor
*/
ClutterActor *
clutter_sphere_new_with_color (const ClutterColor *color)
{
return g_object_new (CLUTTER_TYPE_SPHERE,
"color", color,
NULL);
}
/**
* clutter_sphere_get_color:
* @sphere: a #ClutterSphere
* @color: return location for a #ClutterColor
*
* Retrieves the color of @sphere.
*/
void
clutter_sphere_get_color (ClutterSphere *sphere,
ClutterColor *color)
{
ClutterSpherePrivate *priv;
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.