4
* An object oriented GL/GLES Abstraction/Utility Layer
6
* Copyright (C) 2007,2008,2009 Intel Corporation.
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
24
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
25
#error "Only <cogl/cogl.h> can be included directly."
28
#ifndef __COGL_MATERIAL_H__
29
#define __COGL_MATERIAL_H__
33
#include <cogl/cogl-types.h>
34
#include <cogl/cogl-matrix.h>
37
* SECTION:cogl-material
38
* @short_description: Fuctions for creating and manipulating materials
40
* COGL allows creating and manipulating materials used to fill in
41
* geometry. Materials may simply be lighting attributes (such as an
42
* ambient and diffuse colour) or might represent one or more textures
48
* @COGL_MATERIAL_FILTER_NEAREST: Measuring in manhatten distance from the,
49
* current pixel center, use the nearest texture texel
50
* @COGL_MATERIAL_FILTER_LINEAR: Use the weighted average of the 4 texels
51
* nearest the current pixel center
52
* @COGL_MATERIAL_FILTER_NEAREST_MIPMAP_NEAREST: Select the mimap level whose
53
* texel size most closely matches the current pixel, and use the
54
* %COGL_MATERIAL_FILTER_NEAREST criterion
55
* @COGL_MATERIAL_FILTER_LINEAR_MIPMAP_NEAREST: Select the mimap level whose
56
* texel size most closely matches the current pixel, and use the
57
* %COGL_MATERIAL_FILTER_LINEAR criterion
58
* @COGL_MATERIAL_FILTER_NEAREST_MIPMAP_LINEAR: Select the two mimap levels
59
* whose texel size most closely matches the current pixel, use
60
* the %COGL_MATERIAL_FILTER_NEAREST criterion on each one and take
61
* their weighted average
62
* @COGL_MATERIAL_FILTER_LINEAR_MIPMAP_LINEAR: Select the two mimap levels
63
* whose texel size most closely matches the current pixel, use
64
* the %COGL_MATERIAL_FILTER_LINEAR criterion on each one and take
65
* their weighted average
67
* Texture filtering is used whenever the current pixel maps either to more
68
* than one texture element (texel) or less than one. These filter enums
69
* correspond to different strategies used to come up with a pixel color, by
70
* possibly referring to multiple neighbouring texels and taking a weighted
71
* average or simply using the nearest texel.
74
COGL_MATERIAL_FILTER_NEAREST = GL_NEAREST,
75
COGL_MATERIAL_FILTER_LINEAR = GL_LINEAR,
76
COGL_MATERIAL_FILTER_NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST,
77
COGL_MATERIAL_FILTER_LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST,
78
COGL_MATERIAL_FILTER_NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR,
79
COGL_MATERIAL_FILTER_LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR
85
* Allocates and initializes a blank white material
87
* Return value: a handle to the new material
90
cogl_material_new (void);
94
* @source: the handle for the material to copy
96
* Creates a new material handle with the configuration copied from the
99
* We would strongly advise developers to always aim to use
100
* cogl_material_copy() instead of cogl_material_new() whenever there will
101
* be any similarity between two materials. Copying a material helps Cogl
102
* keep track of a materials ancestry which we may use to help minimize GPU
105
* Returns: a handle to the new material
110
cogl_material_copy (CoglHandle source);
112
#ifndef COGL_DISABLE_DEPRECATED
116
* @handle: a @CoglHandle.
118
* Increment the reference count for a cogl material.
120
* Return value: the @handle.
124
* Deprecated: 1.2: Use cogl_handle_ref() instead
127
cogl_material_ref (CoglHandle handle) G_GNUC_DEPRECATED;
130
* cogl_material_unref:
131
* @handle: a @CoglHandle.
133
* Decrement the reference count for a cogl material.
137
* Deprecated: 1.2: Use cogl_handle_unref() instead
140
cogl_material_unref (CoglHandle handle) G_GNUC_DEPRECATED;
142
#endif /* COGL_DISABLE_DEPRECATED */
146
* @handle: A CoglHandle
148
* Gets whether the given handle references an existing material object.
150
* Return value: %TRUE if the handle references a #CoglMaterial,
154
cogl_is_material (CoglHandle handle);
157
* cogl_material_set_color:
158
* @material: A CoglMaterial object
159
* @color: The components of the color
161
* Sets the basic color of the material, used when no lighting is enabled.
163
* Note that if you don't add any layers to the material then the color
164
* will be blended unmodified with the destination; the default blend
165
* expects premultiplied colors: for example, use (0.5, 0.0, 0.0, 0.5) for
166
* semi-transparent red. See cogl_color_premultiply().
168
* The default value is (1.0, 1.0, 1.0, 1.0)
173
cogl_material_set_color (CoglHandle material,
174
const CoglColor *color);
177
* cogl_material_set_color4ub:
178
* @material: A CoglMaterial object
179
* @red: The red component
180
* @green: The green component
181
* @blue: The blue component
182
* @alpha: The alpha component
184
* Sets the basic color of the material, used when no lighting is enabled.
186
* The default value is (0xff, 0xff, 0xff, 0xff)
191
cogl_material_set_color4ub (CoglHandle material,
198
* cogl_material_set_color4f:
199
* @material: A CoglMaterial object
200
* @red: The red component
201
* @green: The green component
202
* @blue: The blue component
203
* @alpha: The alpha component
205
* Sets the basic color of the material, used when no lighting is enabled.
207
* The default value is (1.0, 1.0, 1.0, 1.0)
212
cogl_material_set_color4f (CoglHandle material,
219
* cogl_material_get_color:
220
* @material: A CoglMaterial object
221
* @color: (out): The location to store the color
223
* Retrieves the current material color.
228
cogl_material_get_color (CoglHandle material,
232
* cogl_material_set_ambient:
233
* @material: A CoglMaterial object
234
* @ambient: The components of the desired ambient color
236
* Sets the material's ambient color, in the standard OpenGL lighting
237
* model. The ambient color affects the overall color of the object.
239
* Since the diffuse color will be intense when the light hits the surface
240
* directly, the ambient will be most apparent where the light hits at a
243
* The default value is (0.2, 0.2, 0.2, 1.0)
248
cogl_material_set_ambient (CoglHandle material,
249
const CoglColor *ambient);
252
* cogl_material_get_ambient:
253
* @material: A CoglMaterial object
254
* @ambient: The location to store the ambient color
256
* Retrieves the current ambient color for @material
261
cogl_material_get_ambient (CoglHandle material,
265
* cogl_material_set_diffuse:
266
* @material: A CoglMaterial object
267
* @diffuse: The components of the desired diffuse color
269
* Sets the material's diffuse color, in the standard OpenGL lighting
270
* model. The diffuse color is most intense where the light hits the
271
* surface directly - perpendicular to the surface.
273
* The default value is (0.8, 0.8, 0.8, 1.0)
278
cogl_material_set_diffuse (CoglHandle material,
279
const CoglColor *diffuse);
282
* cogl_material_get_diffuse:
283
* @material: A CoglMaterial object
284
* @diffuse: The location to store the diffuse color
286
* Retrieves the current diffuse color for @material
291
cogl_material_get_diffuse (CoglHandle material,
295
* cogl_material_set_ambient_and_diffuse:
296
* @material: A CoglMaterial object
297
* @color: The components of the desired ambient and diffuse colors
299
* Conveniently sets the diffuse and ambient color of @material at the same
300
* time. See cogl_material_set_ambient() and cogl_material_set_diffuse().
302
* The default ambient color is (0.2, 0.2, 0.2, 1.0)
304
* The default diffuse color is (0.8, 0.8, 0.8, 1.0)
309
cogl_material_set_ambient_and_diffuse (CoglHandle material,
310
const CoglColor *color);
313
* cogl_material_set_specular:
314
* @material: A CoglMaterial object
315
* @specular: The components of the desired specular color
317
* Sets the material's specular color, in the standard OpenGL lighting
318
* model. The intensity of the specular color depends on the viewport
319
* position, and is brightest along the lines of reflection.
321
* The default value is (0.0, 0.0, 0.0, 1.0)
326
cogl_material_set_specular (CoglHandle material,
327
const CoglColor *specular);
330
* cogl_material_get_specular:
331
* @material: A CoglMaterial object
332
* @specular: The location to store the specular color
334
* Retrieves the materials current specular color.
339
cogl_material_get_specular (CoglHandle material,
340
CoglColor *specular);
343
* cogl_material_set_shininess:
344
* @material: A CoglMaterial object
345
* @shininess: The desired shininess; range: [0.0, 1.0]
347
* Sets the materials shininess, in the standard OpenGL lighting model,
348
* which determines how specular highlights are calculated. A higher
349
* @shininess will produce smaller brigher highlights.
351
* The default value is 0.0
356
cogl_material_set_shininess (CoglHandle material,
360
* cogl_material_get_shininess:
361
* @material: A CoglMaterial object
363
* Retrieves the materials current emission color.
365
* Return value: The materials current shininess value
370
cogl_material_get_shininess (CoglHandle material);
373
* cogl_material_set_emission:
374
* @material: A CoglMaterial object
375
* @emission: The components of the desired emissive color
377
* Sets the material's emissive color, in the standard OpenGL lighting
378
* model. It will look like the surface is a light source emitting this
381
* The default value is (0.0, 0.0, 0.0, 1.0)
386
cogl_material_set_emission (CoglHandle material,
387
const CoglColor *emission);
390
* cogl_material_get_emission:
391
* @material: A CoglMaterial object
392
* @emission: The location to store the emission color
394
* Retrieves the materials current emission color.
399
cogl_material_get_emission (CoglHandle material,
400
CoglColor *emission);
403
* CoglMaterialAlphaFunc:
404
* @COGL_MATERIAL_ALPHA_FUNC_NEVER: Never let the fragment through.
405
* @COGL_MATERIAL_ALPHA_FUNC_LESS: Let the fragment through if the incoming
406
* alpha value is less than the reference alpha value
407
* @COGL_MATERIAL_ALPHA_FUNC_EQUAL: Let the fragment through if the incoming
408
* alpha value equals the reference alpha value
409
* @COGL_MATERIAL_ALPHA_FUNC_LEQUAL: Let the fragment through if the incoming
410
* alpha value is less than or equal to the reference alpha value
411
* @COGL_MATERIAL_ALPHA_FUNC_GREATER: Let the fragment through if the incoming
412
* alpha value is greater than the reference alpha value
413
* @COGL_MATERIAL_ALPHA_FUNC_NOTEQUAL: Let the fragment through if the incoming
414
* alpha value does not equal the reference alpha value
415
* @COGL_MATERIAL_ALPHA_FUNC_GEQUAL: Let the fragment through if the incoming
416
* alpha value is greater than or equal to the reference alpha value.
417
* @COGL_MATERIAL_ALPHA_FUNC_ALWAYS: Always let the fragment through.
419
* Alpha testing happens before blending primitives with the framebuffer and
420
* gives an opportunity to discard fragments based on a comparison with the
421
* incoming alpha value and a reference alpha value. The #CoglMaterialAlphaFunc
422
* determines how the comparison is done.
425
COGL_MATERIAL_ALPHA_FUNC_NEVER = GL_NEVER,
426
COGL_MATERIAL_ALPHA_FUNC_LESS = GL_LESS,
427
COGL_MATERIAL_ALPHA_FUNC_EQUAL = GL_EQUAL,
428
COGL_MATERIAL_ALPHA_FUNC_LEQUAL = GL_LEQUAL,
429
COGL_MATERIAL_ALPHA_FUNC_GREATER = GL_GREATER,
430
COGL_MATERIAL_ALPHA_FUNC_NOTEQUAL = GL_NOTEQUAL,
431
COGL_MATERIAL_ALPHA_FUNC_GEQUAL = GL_GEQUAL,
432
COGL_MATERIAL_ALPHA_FUNC_ALWAYS = GL_ALWAYS
433
} CoglMaterialAlphaFunc;
436
* cogl_material_set_alpha_test_function:
437
* @material: A CoglMaterial object
438
* @alpha_func: A @CoglMaterialAlphaFunc constant
439
* @alpha_reference: A reference point that the chosen alpha function uses
440
* to compare incoming fragments to.
442
* Before a primitive is blended with the framebuffer, it goes through an
443
* alpha test stage which lets you discard fragments based on the current
444
* alpha value. This function lets you change the function used to evaluate
445
* the alpha channel, and thus determine which fragments are discarded
446
* and which continue on to the blending stage.
448
* The default is %COGL_MATERIAL_ALPHA_FUNC_ALWAYS
453
cogl_material_set_alpha_test_function (CoglHandle material,
454
CoglMaterialAlphaFunc alpha_func,
455
float alpha_reference);
458
* cogl_material_set_blend:
459
* @material: A CoglMaterial object
460
* @blend_string: A <link linkend="cogl-Blend-Strings">Cogl blend string</link>
461
* describing the desired blend function.
462
* @error: return location for a #GError that may report lack of driver
463
* support if you give separate blend string statements for the alpha
464
* channel and RGB channels since some drivers, or backends such as
465
* GLES 1.1, don't support this feature. May be %NULL, in which case a
466
* warning will be printed out using GLib's logging facilities if an
467
* error is encountered.
469
* If not already familiar; please refer <link linkend="cogl-Blend-Strings">here</link>
470
* for an overview of what blend strings are, and their syntax.
472
* Blending occurs after the alpha test function, and combines fragments with
475
* Currently the only blend function Cogl exposes is ADD(). So any valid
476
* blend statements will be of the form:
479
* <channel-mask>=ADD(SRC_COLOR*(<factor>), DST_COLOR*(<factor>))
482
* <warning>The brackets around blend factors are currently not
483
* optional!</warning>
485
* This is the list of source-names usable as blend factors:
487
* <listitem><para>SRC_COLOR: The color of the in comming fragment</para></listitem>
488
* <listitem><para>DST_COLOR: The color of the framebuffer</para></listitem>
489
* <listitem><para>CONSTANT: The constant set via cogl_material_set_blend_constant()</para></listitem>
492
* The source names can be used according to the
493
* <link linkend="cogl-Blend-String-syntax">color-source and factor syntax</link>,
494
* so for example "(1-SRC_COLOR[A])" would be a valid factor, as would
497
* These can also be used as factors:
499
* <listitem>0: (0, 0, 0, 0)</listitem>
500
* <listitem>1: (1, 1, 1, 1)</listitem>
501
* <listitem>SRC_ALPHA_SATURATE_FACTOR: (f,f,f,1) where f = MIN(SRC_COLOR[A],1-DST_COLOR[A])</listitem>
504
* <note>Remember; all color components are normalized to the range [0, 1]
505
* before computing the result of blending.</note>
507
* <example id="cogl-Blend-Strings-blend-unpremul">
508
* <title>Blend Strings/1</title>
509
* <para>Blend a non-premultiplied source over a destination with
510
* premultiplied alpha:</para>
512
* "RGB = ADD(SRC_COLOR*(SRC_COLOR[A]), DST_COLOR*(1-SRC_COLOR[A]))"
513
* "A = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))"
517
* <example id="cogl-Blend-Strings-blend-premul">
518
* <title>Blend Strings/2</title>
519
* <para>Blend a premultiplied source over a destination with
520
* premultiplied alpha</para>
522
* "RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))"
526
* The default blend string is:
528
* RGBA = ADD (SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))
531
* That gives normal alpha-blending when the calculated color for the material
532
* is in premultiplied form.
534
* Return value: %TRUE if the blend string was successfully parsed, and the
535
* described blending is supported by the underlying driver/hardware. If
536
* there was an error, %FALSE is returned and @error is set accordingly (if
542
cogl_material_set_blend (CoglHandle material,
543
const char *blend_string,
547
* cogl_material_set_blend_constant:
548
* @material: A CoglMaterial object
549
* @constant_color: The constant color you want
551
* When blending is setup to reference a CONSTANT blend factor then
552
* blending will depend on the constant set with this function.
557
cogl_material_set_blend_constant (CoglHandle material,
558
CoglColor *constant_color);
561
* cogl_material_set_layer:
562
* @material: A #CoglHandle for a material object
563
* @layer_index: the index of the layer
564
* @texture: a #CoglHandle for the layer object
566
* In addition to the standard OpenGL lighting model a Cogl material may have
567
* one or more layers comprised of textures that can be blended together in
568
* order, with a number of different texture combine modes. This function
569
* defines a new texture layer.
571
* The index values of multiple layers do not have to be consecutive; it is
572
* only their relative order that is important.
574
* <note>In the future, we may define other types of material layers, such
575
* as purely GLSL based layers.</note>
580
cogl_material_set_layer (CoglHandle material,
585
* cogl_material_remove_layer:
586
* @material: A CoglMaterial object
587
* @layer_index: Specifies the layer you want to remove
589
* This function removes a layer from your material
592
cogl_material_remove_layer (CoglHandle material,
597
* cogl_material_set_layer_combine:
598
* @material: A CoglMaterial object
599
* @layer_index: Specifies the layer you want define a combine function for
600
* @blend_string: A <link linkend="cogl-Blend-Strings">Cogl blend string</link>
601
* describing the desired texture combine function.
602
* @error: A #GError that may report parse errors or lack of GPU/driver
603
* support. May be %NULL, in which case a warning will be printed out if an
604
* error is encountered.
606
* If not already familiar; you can refer
607
* <link linkend="cogl-Blend-Strings">here</link> for an overview of what blend
608
* strings are and there syntax.
610
* These are all the functions available for texture combining:
612
* <listitem>REPLACE(arg0) = arg0</listitem>
613
* <listitem>MODULATE(arg0, arg1) = arg0 x arg1</listitem>
614
* <listitem>ADD(arg0, arg1) = arg0 + arg1</listitem>
615
* <listitem>ADD_SIGNED(arg0, arg1) = arg0 + arg1 - 0.5</listitem>
616
* <listitem>INTERPOLATE(arg0, arg1, arg2) = arg0 x arg2 + arg1 x (1 - arg2)</listitem>
617
* <listitem>SUBTRACT(arg0, arg1) = arg0 - arg1</listitem>
620
* DOT3_RGB(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) +
621
* (arg0[G] - 0.5)) * (arg1[G] - 0.5) +
622
* (arg0[B] - 0.5)) * (arg1[B] - 0.5))
627
* DOT3_RGBA(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) +
628
* (arg0[G] - 0.5)) * (arg1[G] - 0.5) +
629
* (arg0[B] - 0.5)) * (arg1[B] - 0.5))
635
* <link linkend="cogl-Blend-String-syntax">color-source syntax</link> for
636
* describing the arguments. The valid source names for texture combining
640
* <term>TEXTURE</term>
641
* <listitem>Use the color from the current texture layer</listitem>
644
* <term>TEXTURE_0, TEXTURE_1, etc</term>
645
* <listitem>Use the color from the specified texture layer</listitem>
648
* <term>CONSTANT</term>
649
* <listitem>Use the color from the constant given with
650
* cogl_material_set_layer_constant()</listitem>
653
* <term>PRIMARY</term>
654
* <listitem>Use the color of the material as set with
655
* cogl_material_set_color()</listitem>
658
* <term>PREVIOUS</term>
659
* <listitem>Either use the texture color from the previous layer, or
660
* if this is layer 0, use the color of the material as set with
661
* cogl_material_set_color()</listitem>
665
* <refsect2 id="cogl-Layer-Combine-Examples">
666
* <title>Layer Combine Examples</title>
667
* <para>This is effectively what the default blending is:</para>
668
* <informalexample><programlisting>
669
* RGBA = MODULATE (PREVIOUS, TEXTURE)
670
* </programlisting></informalexample>
671
* <para>This could be used to cross-fade between two images, using
672
* the alpha component of a constant as the interpolator. The constant
673
* color is given by calling cogl_material_set_layer_constant.</para>
674
* <informalexample><programlisting>
675
* RGBA = INTERPOLATE (PREVIOUS, TEXTURE, CONSTANT[A])
676
* </programlisting></informalexample>
679
* <note>You can't give a multiplication factor for arguments as you can
680
* with blending.</note>
682
* Return value: %TRUE if the blend string was successfully parsed, and the
683
* described texture combining is supported by the underlying driver and
684
* or hardware. On failure, %FALSE is returned and @error is set
689
cogl_material_set_layer_combine (CoglHandle material,
691
const char *blend_string,
695
* cogl_material_set_layer_combine_constant:
696
* @material: A CoglMaterial object
697
* @layer_index: Specifies the layer you want to specify a constant used
698
* for texture combining
699
* @constant: The constant color you want
701
* When you are using the 'CONSTANT' color source in a layer combine
702
* description then you can use this function to define its value.
707
cogl_material_set_layer_combine_constant (CoglHandle material,
709
CoglColor *constant);
712
* cogl_material_set_layer_matrix:
713
* @material: A CoglMaterial object
714
* @layer_index: the index for the layer inside @material
715
* @matrix: the transformation matrix for the layer
717
* This function lets you set a matrix that can be used to e.g. translate
718
* and rotate a single layer of a material used to fill your geometry.
721
cogl_material_set_layer_matrix (CoglHandle material,
726
* cogl_material_get_layers:
727
* @material: a #CoglHandle for a material
729
* This function lets you access a materials internal list of layers
732
* Return value: (element-type Handle) (transfer none): A list of
733
* #CoglHandle<!-- -->'s that can be passed to the cogl_material_layer_*
734
* functions. The list is owned by COGL and it should not be modified or
737
G_CONST_RETURN GList *
738
cogl_material_get_layers (CoglHandle material);
741
* cogl_material_get_n_layers:
742
* @material: a #CoglHandle for a material
744
* Retrieves the number of layers defined for the given @material
746
* Return value: the number of layers
751
cogl_material_get_n_layers (CoglHandle material);
754
* CoglMaterialLayerType:
755
* @COGL_MATERIAL_LAYER_TYPE_TEXTURE: The layer represents a
756
* <link linkend="cogl-Textures">texture</link>
758
* Available types of layers for a #CoglMaterial. This enumeration
759
* might be expanded in later versions.
764
COGL_MATERIAL_LAYER_TYPE_TEXTURE
765
} CoglMaterialLayerType;
769
* cogl_material_layer_get_type:
770
* @layer: A #CoglHandle for a material layer
772
* Retrieves the type of the layer
774
* Currently there is only one type of layer defined:
775
* %COGL_MATERIAL_LAYER_TYPE_TEXTURE, but considering we may add purely GLSL
776
* based layers in the future, you should write code that checks the type
779
* Return value: the type of the layer
781
CoglMaterialLayerType
782
cogl_material_layer_get_type (CoglHandle layer);
785
* cogl_material_layer_get_texture:
786
* @layer: A #CoglHandle for a material layer
788
* Extracts a texture handle for a specific layer.
790
* <note>In the future Cogl may support purely GLSL based layers; for those
791
* layers this function which will likely return %COGL_INVALID_HANDLE if you
792
* try to get the texture handle from them. Considering this scenario, you
793
* should call cogl_material_layer_get_type() first in order check it is of
794
* type %COGL_MATERIAL_LAYER_TYPE_TEXTURE before calling this function.</note>
796
* Return value: a #CoglHandle for the texture inside the layer
799
cogl_material_layer_get_texture (CoglHandle layer);
802
* cogl_material_layer_get_min_filter:
803
* @layer: a #CoglHandle for a material layer
805
* Queries the currently set downscaling filter for a material layer
807
* Return value: the current downscaling filter
810
cogl_material_layer_get_min_filter (CoglHandle layer);
813
* cogl_material_layer_get_mag_filter:
814
* @layer: a #CoglHandle for a material layer
816
* Queries the currently set downscaling filter for a material later
818
* Return value: the current downscaling filter
821
cogl_material_layer_get_mag_filter (CoglHandle layer);
824
* cogl_material_set_layer_filters:
825
* @material: a #CoglHandle to a material.
826
* @layer_index: the layer number to change.
827
* @min_filter: the filter used when scaling a texture down.
828
* @mag_filter: the filter used when magnifying a texture.
830
* Changes the decimation and interpolation filters used when a texture is
831
* drawn at other scales than 100%.
834
cogl_material_set_layer_filters (CoglHandle material,
836
CoglMaterialFilter min_filter,
837
CoglMaterialFilter mag_filter);
841
#endif /* __COGL_MATERIAL_H__ */