mirror of
https://github.com/brl/mutter.git
synced 2024-12-04 13:50:41 -05:00
acc44161c1
As part of an effort to improve the architecture of CoglMaterial internally this overhauls how we flush layer state to OpenGL by adding a formal backend abstraction for fragment processing and further formalizing the CoglTextureUnit abstraction. There are three backends: "glsl", "arbfp" and "fixed". The fixed backend uses the OpenGL fixed function APIs to setup the fragment processing, the arbfp backend uses code generation to handle fragment processing using an ARBfp program, and the GLSL backend is currently only there as a formality to handle user programs associated with a material. (i.e. the glsl backend doesn't yet support code generation) The GLSL backend has highest precedence, then arbfp and finally the fixed. If a backend can't support some particular CoglMaterial feature then it will fallback to the next backend. This adds three new COGL_DEBUG options: * "disable-texturing" as expected should disable all texturing * "disable-arbfp" always make the arbfp backend fallback * "disable-glsl" always make the glsl backend fallback * "show-source" show code generated by the arbfp/glsl backends
54 lines
1.4 KiB
C
54 lines
1.4 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2007,2008,2009 Intel Corporation.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef __COGL_CONTEXT_DRIVER_H
|
|
#define __COGL_CONTEXT_DRIVER_H
|
|
|
|
#include "cogl.h"
|
|
|
|
#ifndef APIENTRY
|
|
#define APIENTRY
|
|
#endif
|
|
|
|
#define COGL_FEATURE_BEGIN(a, b, c, d, e, f, g)
|
|
|
|
#define COGL_FEATURE_FUNCTION(ret, name, args) \
|
|
ret (APIENTRY * pf_ ## name) args;
|
|
|
|
#define COGL_FEATURE_END()
|
|
|
|
typedef struct _CoglContextDriver
|
|
{
|
|
/* This defines a list of function pointers */
|
|
#include "cogl-feature-functions.h"
|
|
|
|
GLint gl_max_program_temoraries_arb;
|
|
} CoglContextDriver;
|
|
|
|
#undef COGL_FEATURE_BEGIN
|
|
#undef COGL_FEATURE_FUNCTION
|
|
#undef COGL_FEATURE_END
|
|
|
|
#endif /* __COGL_CONTEXT_DRIVER_H */
|
|
|