cogl-material: Add support for point sprites

This adds a new API call to enable point sprite coordinate generation
for a material layer:

void
cogl_material_set_layer_point_sprite_coords_enabled (CoglHandle material,
                                                     int layer_index,
                                                     gboolean enable);

There is also a corresponding get function.

Enabling point sprite coords simply sets the GL_COORD_REPLACE of the
GL_POINT_SPRITE glTexEnv when flusing the material. There is no
separate application control for glEnable(GL_POINT_SPRITE). Instead it
is left permanently enabled under the assumption that it has no affect
unless GL_COORD_REPLACE is enabled for a texture unit.

http://bugzilla.openedhand.com/show_bug.cgi?id=2047
This commit is contained in:
Neil Roberts
2010-03-22 13:33:55 +00:00
committed by Robert Bragg
parent 06b58baa10
commit da3be3df6b
10 changed files with 306 additions and 31 deletions

View File

@ -491,6 +491,8 @@ cogl_material_remove_layer
cogl_material_set_layer_combine
cogl_material_set_layer_combine_constant
cogl_material_set_layer_matrix
cogl_material_set_layer_point_sprite_coords_enabled
cogl_material_get_layer_point_sprite_coords_enabled
cogl_material_get_layers
cogl_material_get_n_layers
CoglMaterialFilter