Hi danny <[email protected]> wrote:
> I found that if I run a plain program based clutter, it will not use > any functions in clutter/glx/clutter-glx-texture-pixmap.c, such as > clutter_glx_texture_pixmap_update_area(). > > So I want to know that which situation these functions will be called, > and dose the clutter_glx_texture_pixmap_* series functions needs some > GL/GLX extension? I saw one like GLX_EXT_texture_from_pixmap. The clutter_glx_texture_pixmap_* functions are public API. Nothing internally in Clutter will use them unless your application explicitly calls those functions. The functions are used to efficiently wrap an X11 window or pixmap as a ClutterTexture which for example would be useful in a compositor. You may want to take a look at at the source code for Mutter for an example of how to use it. ClutterGLXTexturePixmap will use the GLX_EXT_texture_from_pixmap extension if it is available but it can fall back to a slow path using XGetImage with shared memory if not. ClutterX11TexturePixmap is an equivalent class which never tries to use the GLX extension but instead always uses the fallback path. This is useful for example when writing an app for EGL where GLX is not being used. However, note that in Clutter 1.4 ClutterGLXTexturePixmap is effectively deprecated and both classes are now equivalent (so either class will use the GLX extension if it's available and there's no need to write your code differently to support a fallback on EGL). Regards, - Neil _______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
