mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
Merge branch 'master' into cogl-material
Conflicts: clutter/cogl/gl/cogl-context.c clutter/cogl/gl/cogl-context.h
This commit is contained in:
commit
ef992f55db
@ -148,7 +148,7 @@ gboolean cogl_is_texture (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_width:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the width of a cogl texture.
|
||||
*
|
||||
* Returns: the width of the GPU side texture in pixels:
|
||||
@ -158,7 +158,7 @@ guint cogl_texture_get_width (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_height:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the height of a cogl texture.
|
||||
*
|
||||
* Returns: the height of the GPU side texture in pixels:
|
||||
@ -168,7 +168,7 @@ guint cogl_texture_get_height (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_format:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the #CoglPixelFormat of a cogl texture.
|
||||
*
|
||||
* Returns: the #CoglPixelFormat of the GPU side texture.
|
||||
@ -179,7 +179,7 @@ CoglPixelFormat cogl_texture_get_format (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_rowstride:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the rowstride of a cogl texture.
|
||||
*
|
||||
* Returns: the offset in bytes between each consequetive row of pixels.
|
||||
@ -189,7 +189,7 @@ guint cogl_texture_get_rowstride (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_max_waste:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the maximum wasted (unused) pixels in one dimension of a GPU side
|
||||
* texture.
|
||||
*
|
||||
@ -200,7 +200,7 @@ gint cogl_texture_get_max_waste (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_min_filter:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the currently set downscaling filter for a cogl texture.
|
||||
*
|
||||
* Returns: the current downscaling filter for a cogl texture.
|
||||
@ -210,7 +210,7 @@ COGLenum cogl_texture_get_min_filter (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_mag_filter:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the currently set downscaling filter for a cogl texture.
|
||||
*
|
||||
* Returns: the current downscaling filter for a cogl texture.
|
||||
@ -220,7 +220,7 @@ COGLenum cogl_texture_get_mag_filter (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_is_sliced:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query if a texture is sliced (stored as multiple GPU side tecture
|
||||
* objects).
|
||||
*
|
||||
@ -235,7 +235,7 @@ gboolean cogl_texture_is_sliced (CoglHandle handle);
|
||||
* @out_gl_handle: pointer to return location for the textures GL handle, or
|
||||
* NULL.
|
||||
* @out_gl_target: pointer to return location for the GL target type, or NULL.
|
||||
*
|
||||
*
|
||||
* Query the GL handles for a GPU side texture through it's #CoglHandle,
|
||||
* if the texture is spliced the data for the first sub texture will be
|
||||
* queried.
|
||||
@ -255,7 +255,7 @@ gboolean cogl_texture_get_gl_texture (CoglHandle handle,
|
||||
* specified.
|
||||
* @data: memory location to write contents of buffer, or %NULL if we're
|
||||
* only querying the data size through the return value.
|
||||
*
|
||||
*
|
||||
* Copy the pixel data from a cogl texture to system memory.
|
||||
*
|
||||
* Returns: the size of the texture data in bytes (or 0 if the texture
|
||||
@ -271,7 +271,7 @@ gint cogl_texture_get_data (CoglHandle handle,
|
||||
* @handle: a #CoglHandle.
|
||||
* @min_filter: the filter used when scaling the texture down.
|
||||
* @mag_filter: the filter used when magnifying the texture.
|
||||
*
|
||||
*
|
||||
* Changes the decimation and interpolation filters used when the texture is
|
||||
* drawn at other scales than 100%.
|
||||
*/
|
||||
@ -297,7 +297,7 @@ void cogl_texture_set_filters (CoglHandle handle,
|
||||
* @data: the actual pixel data.
|
||||
*
|
||||
* Sets the pixels in a rectangular subregion of @handle from an in-memory
|
||||
* buffer containing pixel data.
|
||||
* buffer containing pixel data.
|
||||
*
|
||||
* Returns: %TRUE if the subregion upload was successful, otherwise %FALSE.
|
||||
*/
|
||||
|
@ -41,20 +41,20 @@ cogl_create_context ()
|
||||
{
|
||||
if (_context != NULL)
|
||||
return FALSE;
|
||||
|
||||
|
||||
/* Allocate context memory */
|
||||
_context = (CoglContext*) g_malloc (sizeof (CoglContext));
|
||||
|
||||
|
||||
/* Init default values */
|
||||
_context->feature_flags = 0;
|
||||
_context->features_cached = FALSE;
|
||||
|
||||
|
||||
_context->enable_flags = 0;
|
||||
_context->color_alpha = 255;
|
||||
|
||||
|
||||
_context->path_nodes = g_array_new (FALSE, FALSE, sizeof (CoglPathNode));
|
||||
_context->last_path = 0;
|
||||
|
||||
|
||||
_context->texture_handles = NULL;
|
||||
_context->texture_vertices_size = 0;
|
||||
_context->texture_vertices = NULL;
|
||||
@ -62,10 +62,10 @@ cogl_create_context ()
|
||||
_context->material_handles = NULL;
|
||||
_context->material_layer_handles = NULL;
|
||||
_context->source_material = NULL;
|
||||
|
||||
|
||||
_context->fbo_handles = NULL;
|
||||
_context->draw_buffer = COGL_WINDOW_BUFFER;
|
||||
|
||||
|
||||
_context->blend_src_factor = CGL_SRC_ALPHA;
|
||||
_context->blend_dst_factor = CGL_ONE_MINUS_SRC_ALPHA;
|
||||
|
||||
@ -74,7 +74,7 @@ cogl_create_context ()
|
||||
_context->program_handles = NULL;
|
||||
|
||||
_context->mesh_handles = NULL;
|
||||
|
||||
|
||||
_context->pf_glGenRenderbuffersEXT = NULL;
|
||||
_context->pf_glBindRenderbufferEXT = NULL;
|
||||
_context->pf_glRenderbufferStorageEXT = NULL;
|
||||
@ -86,7 +86,7 @@ cogl_create_context ()
|
||||
_context->pf_glDeleteFramebuffersEXT = NULL;
|
||||
_context->pf_glBlitFramebufferEXT = NULL;
|
||||
_context->pf_glRenderbufferStorageMultisampleEXT = NULL;
|
||||
|
||||
|
||||
_context->pf_glCreateProgramObjectARB = NULL;
|
||||
_context->pf_glCreateShaderObjectARB = NULL;
|
||||
_context->pf_glShaderSourceARB = NULL;
|
||||
@ -119,7 +119,7 @@ cogl_create_context ()
|
||||
_context->pf_glUniformMatrix4fvARB = NULL;
|
||||
|
||||
_context->pf_glDrawRangeElements = NULL;
|
||||
|
||||
|
||||
/* Init OpenGL state */
|
||||
GE( glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) );
|
||||
GE( glColorMask (TRUE, TRUE, TRUE, FALSE) );
|
||||
@ -128,7 +128,7 @@ cogl_create_context ()
|
||||
|
||||
/* Initialise the clip stack */
|
||||
_cogl_clip_stack_state_init ();
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ cogl_destroy_context ()
|
||||
g_array_free (_context->shader_handles, TRUE);
|
||||
if (_context->program_handles)
|
||||
g_array_free (_context->program_handles, TRUE);
|
||||
|
||||
|
||||
g_free (_context);
|
||||
}
|
||||
|
||||
@ -161,6 +161,6 @@ _cogl_context_get_default ()
|
||||
/* Create if doesn't exist yet */
|
||||
if (_context == NULL)
|
||||
cogl_create_context ();
|
||||
|
||||
|
||||
return _context;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ typedef struct
|
||||
/* Features cache */
|
||||
CoglFeatureFlags feature_flags;
|
||||
gboolean features_cached;
|
||||
|
||||
|
||||
/* Enable cache */
|
||||
gulong enable_flags;
|
||||
guint8 color_alpha;
|
||||
@ -49,7 +49,7 @@ typedef struct
|
||||
COGLenum blend_dst_factor;
|
||||
|
||||
gboolean enable_backface_culling;
|
||||
|
||||
|
||||
/* Primitives */
|
||||
CoglFixedVec2 path_start;
|
||||
CoglFixedVec2 path_pen;
|
||||
@ -60,12 +60,12 @@ typedef struct
|
||||
|
||||
/* Cache of inverse projection matrix */
|
||||
GLfloat inverse_projection[16];
|
||||
|
||||
|
||||
/* Textures */
|
||||
GArray *texture_handles;
|
||||
CoglTextureGLVertex *texture_vertices;
|
||||
gulong texture_vertices_size;
|
||||
|
||||
|
||||
/* Materials */
|
||||
GArray *material_handles;
|
||||
GArray *material_layer_handles;
|
||||
@ -83,10 +83,10 @@ typedef struct
|
||||
|
||||
/* Clip stack */
|
||||
CoglClipStackState clip;
|
||||
|
||||
|
||||
/* Mesh */
|
||||
GArray *mesh_handles;
|
||||
|
||||
|
||||
/* Relying on glext.h to define these */
|
||||
COGL_PFNGLGENRENDERBUFFERSEXTPROC pf_glGenRenderbuffersEXT;
|
||||
COGL_PFNGLDELETERENDERBUFFERSEXTPROC pf_glDeleteRenderbuffersEXT;
|
||||
@ -100,7 +100,7 @@ typedef struct
|
||||
COGL_PFNGLDELETEFRAMEBUFFERSEXTPROC pf_glDeleteFramebuffersEXT;
|
||||
COGL_PFNGLBLITFRAMEBUFFEREXTPROC pf_glBlitFramebufferEXT;
|
||||
COGL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC pf_glRenderbufferStorageMultisampleEXT;
|
||||
|
||||
|
||||
COGL_PFNGLCREATEPROGRAMOBJECTARBPROC pf_glCreateProgramObjectARB;
|
||||
COGL_PFNGLCREATESHADEROBJECTARBPROC pf_glCreateShaderObjectARB;
|
||||
COGL_PFNGLSHADERSOURCEARBPROC pf_glShaderSourceARB;
|
||||
@ -156,6 +156,6 @@ _cogl_context_get_default ();
|
||||
CoglContext *ctxvar = _cogl_context_get_default (); \
|
||||
if (ctxvar == NULL) return retval;
|
||||
|
||||
#define NO_RETVAL
|
||||
#define NO_RETVAL
|
||||
|
||||
#endif /* __COGL_CONTEXT_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user