mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
Removes cogl_blend_func and cogl_alpha_func
The GL blend function and alpha function are now controlled by the material code, and even internally Cogl should now be using the material API when it needs control of these.
This commit is contained in:
parent
2503f7b321
commit
94077997a7
13
cogl.h.in
13
cogl.h.in
@ -405,19 +405,6 @@ void cogl_enable_depth_test (gboolean setting);
|
||||
*/
|
||||
void cogl_enable_backface_culling (gboolean setting);
|
||||
|
||||
/**
|
||||
* cogl_alpha_func:
|
||||
* @func: the comparison function to use, one of CGL_NEVER, CGL_LESS,
|
||||
* CGL_EQUAL, CGL_LEQUAL, CGL_GREATER, CGL_NOTEQUAL, CGL_GEQUAL and GL_ALWAYS.
|
||||
* @ref: reference value.
|
||||
*
|
||||
* Changes the alpha test to use the specified function specified in @func,
|
||||
* comparing with the value in @ref. The default function is CGL_ALWAYS the
|
||||
* initial reference value is 1.0.
|
||||
*/
|
||||
void cogl_alpha_func (COGLenum func,
|
||||
float ref);
|
||||
|
||||
/**
|
||||
* cogl_fog_set:
|
||||
* @fog_color: The color of the fog
|
||||
|
@ -13,6 +13,14 @@
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* GL/GLES compatability defines for material thingies:
|
||||
*/
|
||||
|
||||
#ifdef HAVE_COGL_GLES2
|
||||
#define glAlphaFunc cogl_wrap_glAlphaFunc
|
||||
#endif
|
||||
|
||||
static void _cogl_material_free (CoglMaterial *tex);
|
||||
static void _cogl_material_layer_free (CoglMaterialLayer *layer);
|
||||
|
||||
|
@ -81,9 +81,6 @@ cogl_create_context ()
|
||||
_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;
|
||||
|
||||
_context->shader_handles = NULL;
|
||||
|
||||
_context->program_handles = NULL;
|
||||
|
@ -45,8 +45,6 @@ typedef struct
|
||||
/* Enable cache */
|
||||
gulong enable_flags;
|
||||
guint8 color_alpha;
|
||||
COGLenum blend_src_factor;
|
||||
COGLenum blend_dst_factor;
|
||||
|
||||
gboolean enable_backface_culling;
|
||||
|
||||
|
24
gl/cogl.c
24
gl/cogl.c
@ -315,23 +315,6 @@ cogl_get_enable ()
|
||||
return ctx->enable_flags;
|
||||
}
|
||||
|
||||
void
|
||||
cogl_blend_func (COGLenum src_factor, COGLenum dst_factor)
|
||||
{
|
||||
/* This function caches the blending setup in the
|
||||
* hope of lessening GL traffic.
|
||||
*/
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
|
||||
if (ctx->blend_src_factor != src_factor ||
|
||||
ctx->blend_dst_factor != dst_factor)
|
||||
{
|
||||
glBlendFunc (src_factor, dst_factor);
|
||||
ctx->blend_src_factor = src_factor;
|
||||
ctx->blend_dst_factor = dst_factor;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cogl_enable_depth_test (gboolean setting)
|
||||
{
|
||||
@ -577,13 +560,6 @@ _cogl_disable_clip_planes (void)
|
||||
GE( glDisable (GL_CLIP_PLANE0) );
|
||||
}
|
||||
|
||||
void
|
||||
cogl_alpha_func (COGLenum func,
|
||||
float ref)
|
||||
{
|
||||
GE( glAlphaFunc (func, (ref)) );
|
||||
}
|
||||
|
||||
void
|
||||
cogl_perspective (float fovy,
|
||||
float aspect,
|
||||
|
24
gles/cogl.c
24
gles/cogl.c
@ -229,23 +229,6 @@ cogl_get_enable ()
|
||||
return ctx->enable_flags;
|
||||
}
|
||||
|
||||
void
|
||||
cogl_blend_func (COGLenum src_factor, COGLenum dst_factor)
|
||||
{
|
||||
/* This function caches the blending setup in the
|
||||
* hope of lessening GL traffic.
|
||||
*/
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
|
||||
if (ctx->blend_src_factor != src_factor ||
|
||||
ctx->blend_dst_factor != dst_factor)
|
||||
{
|
||||
glBlendFunc (src_factor, dst_factor);
|
||||
ctx->blend_src_factor = src_factor;
|
||||
ctx->blend_dst_factor = dst_factor;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cogl_enable_depth_test (gboolean setting)
|
||||
{
|
||||
@ -498,13 +481,6 @@ _cogl_disable_clip_planes (void)
|
||||
GE( cogl_wrap_glDisable (GL_CLIP_PLANE0) );
|
||||
}
|
||||
|
||||
void
|
||||
cogl_alpha_func (COGLenum func,
|
||||
float ref)
|
||||
{
|
||||
GE( cogl_wrap_glAlphaFunc (func, (ref)) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Fixed point implementation of the perspective function
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user