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:
Robert Bragg 2009-01-24 15:09:43 +00:00
parent 2503f7b321
commit 94077997a7
6 changed files with 8 additions and 66 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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
*/