2007-05-25 Matthew Allum <mallum@openedhand.com>
* Makefile.am: Install a default flavour .pc file. * clutter/clutter-actor.c: Translate units correctly for translate() * clutter/clutter-feature.h: Add new texture features. * clutter/clutter-fixed.h: Add clutter angle conversion defines. * clutter/clutter-group.c: Use cogl not GL. Dont recurse on show all. * clutter/clutter-private.h: Remove sync_viewport. * clutter/clutter-rectangle.c: Fix cogl typo. * clutter/clutter-stage.c: * clutter/clutter-stage.h: Add perspective settings. Remove viewport_sync. Add audience stubs. Fix up actor_at_pos a little (still broken) * clutter/clutter-texture.h: * clutter/clutter-texture.c: Redo pixel uploading. Add initial (disabled) YUV support. * clutter/clutter-timeline.c: Fire 'completed' signal when looping. * clutter/cogl/gl/cogl.c: Move some backend checks here. * clutter/glx/clutter-backend-glx.c: Actually check target display has GLX ext. * clutter/glx/clutter-stage-glx.c: Handle offscreen failing more gracefully. * examples/Makefile.am: Use AM_LDFLAGS. * clutter/clutter-main.c: * clutter/clutter-feature.c: * clutter/clutter-backend.c: * clutter/clutter-alpha.c: Fix a compile warnings. * tests/Makefile.am: * tests/test-offscreen.c: * tests/test-scale.c: More tests.
This commit is contained in:
parent
4c01df36e6
commit
84257c9820
36
gl/cogl.c
36
gl/cogl.c
@ -29,12 +29,6 @@
|
|||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
|
||||||
#define PIXEL_TYPE GL_UNSIGNED_BYTE
|
|
||||||
#else
|
|
||||||
#define PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static gulong __enable_flags = 0;
|
static gulong __enable_flags = 0;
|
||||||
|
|
||||||
#if COGL_DEBUG
|
#if COGL_DEBUG
|
||||||
@ -110,6 +104,7 @@ check_gl_extension (const gchar *name,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static gboolean
|
static gboolean
|
||||||
is_gl_version_at_least_12 (void)
|
is_gl_version_at_least_12 (void)
|
||||||
{
|
{
|
||||||
@ -117,7 +112,7 @@ is_gl_version_at_least_12 (void)
|
|||||||
return
|
return
|
||||||
(g_ascii_strtod ((const gchar*) glGetString (GL_VERSION), NULL) >= 1.2);
|
(g_ascii_strtod ((const gchar*) glGetString (GL_VERSION), NULL) >= 1.2);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* At least GL 1.2 is needed for CLAMP_TO_EDGE */
|
/* At least GL 1.2 is needed for CLAMP_TO_EDGE */
|
||||||
/* FIXME: move to cogl... */
|
/* FIXME: move to cogl... */
|
||||||
if (!is_gl_version_at_least_12 ())
|
if (!is_gl_version_at_least_12 ())
|
||||||
@ -127,13 +122,14 @@ is_gl_version_at_least_12 (void)
|
|||||||
"Clutter needs at least version 1.2 of OpenGL");
|
"Clutter needs at least version 1.2 of OpenGL");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
CoglFuncPtr
|
CoglFuncPtr
|
||||||
cogl_get_proc_address (const gchar* name)
|
cogl_get_proc_address (const gchar* name)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -583,13 +579,35 @@ 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 (check_gl_extension ("GL_ARB_texture_rectangle", gl_extensions) ||
|
||||||
check_gl_extension ("GL_EXT_texture_rectangle", gl_extensions))
|
check_gl_extension ("GL_EXT_texture_rectangle", gl_extensions))
|
||||||
{
|
{
|
||||||
flags |= CLUTTER_FEATURE_TEXTURE_RECTANGLE;
|
flags |= CLUTTER_FEATURE_TEXTURE_RECTANGLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GL_YCBCR_MESA
|
||||||
|
if (check_gl_extension ("GL_MESA_ycbcr_texture", gl_extensions))
|
||||||
|
{
|
||||||
|
flags |= CLUTTER_FEATURE_TEXTURE_YUV;
|
||||||
|
}
|
||||||
|
#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…
x
Reference in New Issue
Block a user