Re: [clutter] switched colour channels

2010-04-22 Thread Brian J. Tarricone
On 04/21/2010 07:35 AM, Phil wrote:
 Hello,
 
 I have compiled Clutter 1.2.5 with the eglnative/gles backend. The colour
 channels of textures seem to be switched when the format is not RGBA.
 I have noticed the following:
 * if the texture is loaded from a file (e.g. PNG) it works fine
 (gdk-pixbuf is
   used). gdk-pixbuf uses RGBA as internal format. Thus, I think it works in
   contrast to the other cases below.
 * If I load data from memory using clutter_texture_set_from_rgb_data () the
   issue with the switched red and blue colour channel appears. The flag
   CLUTTER_TEXTURE_RGB_FLAG_BGR does not seem to have an effect.
 * If the texture is a cairo texture (cairo uses ARGB internally) the same
   problem is present.

I've noticed this as well, and for this reason we're sticking with
clutter 1.0.x for our project.  It seems there are quite a few
regressions to the GLES backend in 1.2 (not to mention that the eglx
backend doesn't work[1]).  I've been meaning to find time to try to
categorize the problems and file bugs, but I've been far too busy.

Glad someone else has noticed the reversed color channel problems, though...

-brian

[1] http://bugzilla.o-hand.com/show_bug.cgi?id=2056 -- shame no one's
looked at my patch.
-- 
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com



Re: [clutter] Run clutter application on two display screens

2010-04-08 Thread Brian J. Tarricone
On 04/08/2010 12:43 AM, Ashish Kumar wrote:
 Hi All, 
 I want to develop and run an application  in which output is displayed
 on two LCD screens/monitors.
 Lets say opening of two images on two different LCD sreens/monitors.
 Is clutter ok for such an application?

That depends.  What OS and clutter backend are you using?  If Linux/UNIX
and either glx or eglx, are you using X11?  If yes, then this should
work, assuming you're running a video driver that supports Xinerama (or
Xrandr 1.2) and can present the two monitors as a single large X screen,
and will allow 3D accel on both monitors (usually it'd be all or nothing
in single X screen mode).

-brian
-- 
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com



[clutter] blank stage with clutter_x11_handle_event()

2009-11-10 Thread Brian J. Tarricone
Hi all,

I'm sure there's something I'm doing wrong here, but I've been beating
my head against the clutter source and API docs for so long, I can't
figure out what it is.  I'm working on an app that has its own X event
handling code, and I want to be able to use clutter in the app, so I
won't be using clutter_main().  However, when I try to use
clutter_x11_handle_event() instead, nothing happens.  I get no window
or anything.  If I call XSync() before I start my event loop, I get a
window that comes up, but it has garbage painted on its background.
In this case, the window appears to get events (and the clutter event
filter runs), but I get nothing painted to the window.

I can't seem to find anything special that the clutter x11 backend
event init code or clutter_main() itself does that I'm missing, but
perhaps I just can't see it.

Small test case exhibiting the problem is attached.  Uncommenting the
#define near the top doesn't help (or hurt).  Any ideas?

Thanks,
Brian


#include stdio.h

#include clutter/clutter.h
#include clutter/x11/clutter-x11.h

#define WIDTH 480
#define HEIGHT 640

//#define DISABLE_CLUTTER_EVENT_RETRIEVAL

static ClutterX11FilterReturn
event_filter(XEvent *xev,
 ClutterEvent *cev,
 gpointer data)
{
printf(event_filter got event %d\n, xev-type);
return CLUTTER_X11_FILTER_CONTINUE;
}

int
main(int argc,
 char **argv)
{
Display *dpy;
ClutterActor *stage, *actor;

#ifdef DISABLE_CLUTTER_EVENT_RETRIEVAL
clutter_x11_disable_event_retrieval();
#endif
clutter_init(argc, argv);

dpy = clutter_x11_get_default_display();

stage = clutter_stage_get_default();

actor = clutter_text_new_with_text(Sans 14, This is text);
clutter_container_add_actor(CLUTTER_CONTAINER(stage), actor);
clutter_actor_set_position(actor, 20, 20);

clutter_actor_show_all(stage);

#ifdef DISABLE_CLUTTER_EVENT_RETRIEVAL
XSelectInput(dpy,
 clutter_x11_get_stage_window(CLUTTER_STAGE(stage)),
 ButtonPressMask | ButtonReleaseMask
 | KeyPressMask | KeyReleaseMask
 | ExposureMask
 | FocusChangeMask
 | EnterWindowMask | LeaveWindowMask
 | StructureNotifyMask
 | PropertyChangeMask
 | PointerMotionMask);
#endif

clutter_x11_add_filter(event_filter, NULL);
//clutter_main();

XSync(dpy, False);

for(;;) {
XEvent xevent;

XNextEvent(dpy, xevent);
printf(event loop got event %d\n, xevent.xany.type);

clutter_x11_handle_event(xevent);
}

return 0;
}
-- 
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com