mirror of
https://github.com/brl/mutter.git
synced 2024-12-01 12:20:47 -05:00
2007-06-14 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl.c: (cogl_check_extension): Actually populate this func and remove the static alternate named one. Means GLX actually checks for available extensions. Other minor tidy ups. * clutter/glx/clutter-backend-glx.c: * clutter/glx/clutter-backend-glx.h: Add support for GLX_SGI_swap_control to do vblanking prefering over glXGetVideoSyncSGI. Should fix issues on Intel chips with very slow frame rates due to vblank problems. Thanks to Michel Danzer for tips, see; http://bugs.freedesktop.org/show_bug.cgi?id=10542 * test/test-actors.c: Change FPS to 60.
This commit is contained in:
parent
1a6069bdee
commit
3a6ea6dc16
68
gl/cogl.c
68
gl/cogl.c
@ -78,9 +78,15 @@ error_string(GLenum errorCode)
|
|||||||
#define GE(x) (x);
|
#define GE(x) (x);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static gboolean
|
CoglFuncPtr
|
||||||
check_gl_extension (const gchar *name,
|
cogl_get_proc_address (const gchar* name)
|
||||||
const gchar *ext)
|
{
|
||||||
|
/* FIXME: This very likely needs to be handled in the backend */
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
cogl_check_extension (const gchar *name, const gchar *ext)
|
||||||
{
|
{
|
||||||
gchar *end;
|
gchar *end;
|
||||||
gint name_len, n;
|
gint name_len, n;
|
||||||
@ -104,40 +110,6 @@ check_gl_extension (const gchar *name,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static gboolean
|
|
||||||
is_gl_version_at_least_12 (void)
|
|
||||||
{
|
|
||||||
/* FIXME: This likely needs to live elsewhere in features or cogl */
|
|
||||||
return
|
|
||||||
(g_ascii_strtod ((const gchar*) glGetString (GL_VERSION), NULL) >= 1.2);
|
|
||||||
|
|
||||||
|
|
||||||
/* At least GL 1.2 is needed for CLAMP_TO_EDGE */
|
|
||||||
/* FIXME: move to cogl... */
|
|
||||||
if (!is_gl_version_at_least_12 ())
|
|
||||||
{
|
|
||||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
|
||||||
"Clutter needs at least version 1.2 of OpenGL");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CoglFuncPtr
|
|
||||||
cogl_get_proc_address (const gchar* name)
|
|
||||||
{
|
|
||||||
/* FIXME */
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
cogl_check_extension (const gchar *name, const gchar *ext)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_paint_init (const ClutterColor *color)
|
cogl_paint_init (const ClutterColor *color)
|
||||||
{
|
{
|
||||||
@ -552,35 +524,19 @@ cogl_get_features ()
|
|||||||
|
|
||||||
gl_extensions = (const gchar*) glGetString (GL_EXTENSIONS);
|
gl_extensions = (const gchar*) glGetString (GL_EXTENSIONS);
|
||||||
|
|
||||||
if (check_gl_extension ("GL_ARB_texture_rectangle", gl_extensions) ||
|
if (cogl_check_extension ("GL_ARB_texture_rectangle", gl_extensions) ||
|
||||||
check_gl_extension ("GL_EXT_texture_rectangle", gl_extensions))
|
cogl_check_extension ("GL_EXT_texture_rectangle", gl_extensions))
|
||||||
{
|
{
|
||||||
flags |= CLUTTER_FEATURE_TEXTURE_RECTANGLE;
|
flags |= CLUTTER_FEATURE_TEXTURE_RECTANGLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GL_YCBCR_MESA
|
#ifdef GL_YCBCR_MESA
|
||||||
if (check_gl_extension ("GL_MESA_ycbcr_texture", gl_extensions))
|
if (cogl_check_extension ("GL_MESA_ycbcr_texture", gl_extensions))
|
||||||
{
|
{
|
||||||
flags |= CLUTTER_FEATURE_TEXTURE_YUV;
|
flags |= CLUTTER_FEATURE_TEXTURE_YUV;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
CLUTTER_NOTE (GL,
|
|
||||||
"\n"
|
|
||||||
"===========================================\n"
|
|
||||||
"GL_VENDOR: %s\n"
|
|
||||||
"GL_RENDERER: %s\n"
|
|
||||||
"GL_VERSION: %s\n"
|
|
||||||
"GL_EXTENSIONS: %s\n"
|
|
||||||
"===========================================\n",
|
|
||||||
glGetString (GL_VENDOR),
|
|
||||||
glGetString (GL_RENDERER),
|
|
||||||
glGetString (GL_VERSION),
|
|
||||||
glGetString (GL_EXTENSIONS),
|
|
||||||
: "no");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user