diff options
author | Robert Bragg <robert@linux.intel.com> | 2008-12-23 23:50:02 +0000 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2008-12-24 01:35:33 +0000 |
commit | 0408a5d2c5d01035155dcd0cc0529e074361eb8a (patch) | |
tree | 0fd900a9e6b6b0cbd35a83380ff2c857ad69e5a2 /common/cogl-material-private.h | |
parent | 98bd85afaa8c79f9b20536b3f406bf55e5176840 (diff) | |
download | cogl-0408a5d2c5d01035155dcd0cc0529e074361eb8a.tar.gz |
[cogl-material] improvements for cogl_material_rectangle
The API has been changed to take an explicit length for the number of
texture coordinates passed, and it's now documented that if there are
more layers to the current material than the number of texture coords
passed, then default coordinates will be generated for the other
layers.
cogl_material_rectangle should now handle the case where a single
sliced texture is supplied as a material layer by falling back to
cogl_texture_rectangle. We are nearly at the point that
cogl_texture_rectangle could be deprecated. A few issues remain
though, such as not considering waste in cogl_material_rectangle.
Diffstat (limited to 'common/cogl-material-private.h')
-rw-r--r-- | common/cogl-material-private.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/common/cogl-material-private.h b/common/cogl-material-private.h index d64d8485..935e0ae7 100644 --- a/common/cogl-material-private.h +++ b/common/cogl-material-private.h @@ -22,8 +22,8 @@ struct _CoglMaterialLayer gulong flags; CoglHandle texture; /*!< The texture for this layer, or COGL_INVALID_HANDLE for an empty layer */ - - /* Determines how the color of individual texture fragments + + /* Determines how the color of individual texture fragments * are calculated. */ CoglMaterialLayerCombineFunc texture_combine_rgb_func; CoglMaterialLayerCombineSrc texture_combine_rgb_src[3]; @@ -32,7 +32,7 @@ struct _CoglMaterialLayer CoglMaterialLayerCombineFunc texture_combine_alpha_func; CoglMaterialLayerCombineSrc texture_combine_alpha_src[3]; CoglMaterialLayerCombineOp texture_combine_alpha_op[3]; - + /* TODO: Support purely GLSL based material layers */ CoglMatrix matrix; @@ -41,7 +41,8 @@ struct _CoglMaterialLayer typedef enum _CoglMaterialFlags { COGL_MATERIAL_FLAG_ENABLE_BLEND = 1L<<0, - COGL_MATERIAL_FLAG_SHOWN_SAMPLER_WARNING = 1L<<1 + COGL_MATERIAL_FLAG_SHOWN_SAMPLER_WARNING = 1L<<1, + COGL_MATERIAL_FLAG_DIRTY = 1L<<2 } CoglMaterialFlags; struct _CoglMaterial @@ -50,13 +51,16 @@ struct _CoglMaterial gulong flags; + /* If no lighting is enabled; this is the basic material color */ + GLfloat unlit[4]; + /* Standard OpenGL lighting model attributes */ GLfloat ambient[4]; GLfloat diffuse[4]; GLfloat specular[4]; GLfloat emission[4]; GLfloat shininess; - + /* Determines what fragments are discarded based on their alpha */ CoglMaterialAlphaFunc alpha_func; GLfloat alpha_func_reference; |