[Automatic fixed-to-float.sh change] Applies all scripted changes

This is the result of running a number of sed and perl scripts over the code to
do 90% of the work in converting from 16.16 fixed to single precision floating
point.

Note: A pristine cogl-fixed.c has been maintained as a standalone utility API
      so that applications may still take advantage of fixed point if they
      desire for certain optimisations where lower precision may be acceptable.

Note: no API changes were made in Clutter, only in Cogl.

Overview of changes:
- Within clutter/* all usage of the COGL_FIXED_ macros have been changed to use
the CLUTTER_FIXED_ macros.

- Within cogl/* all usage of the COGL_FIXED_ macros have been completly stripped
and expanded into code that works with single precision floats instead.

- Uses of cogl_fixed_* have been replaced with single precision math.h
alternatives.

- Uses of COGL_ANGLE_* and cogl_angle_* have been replaced so we use a float for
angles and math.h replacements.
This commit is contained in:
Robert Bragg
2009-01-20 16:20:54 +00:00
parent abc2a359ea
commit e82f656590
43 changed files with 1428 additions and 1434 deletions

View File

@ -35,24 +35,24 @@
/* These are defined in the particular backend (float in GL vs fixed
in GL ES) */
void _cogl_set_clip_planes (CoglFixed x,
CoglFixed y,
CoglFixed width,
CoglFixed height);
void _cogl_add_stencil_clip (CoglFixed x,
CoglFixed y,
CoglFixed width,
CoglFixed height,
void _cogl_set_clip_planes (float x,
float y,
float width,
float height);
void _cogl_add_stencil_clip (float x,
float y,
float width,
float height,
gboolean first);
void _cogl_add_path_to_stencil_buffer (CoglFixedVec2 nodes_min,
CoglFixedVec2 nodes_max,
void _cogl_add_path_to_stencil_buffer (floatVec2 nodes_min,
floatVec2 nodes_max,
guint path_size,
CoglPathNode *path,
gboolean merge);
void _cogl_enable_clip_planes (void);
void _cogl_disable_clip_planes (void);
void _cogl_disable_stencil_buffer (void);
void _cogl_set_matrix (const CoglFixed *matrix);
void _cogl_set_matrix (const float *matrix);
typedef struct _CoglClipStack CoglClipStack;
@ -75,13 +75,13 @@ struct _CoglClipStackEntryRect
CoglClipStackEntryType type;
/* The rectangle for this clip */
CoglFixed x_offset;
CoglFixed y_offset;
CoglFixed width;
CoglFixed height;
float x_offset;
float y_offset;
float width;
float height;
/* The matrix that was current when the clip was set */
CoglFixed matrix[16];
float matrix[16];
};
struct _CoglClipStackEntryPath
@ -89,20 +89,20 @@ struct _CoglClipStackEntryPath
CoglClipStackEntryType type;
/* The matrix that was current when the clip was set */
CoglFixed matrix[16];
float matrix[16];
CoglFixedVec2 path_nodes_min;
CoglFixedVec2 path_nodes_max;
floatVec2 path_nodes_min;
floatVec2 path_nodes_max;
guint path_size;
CoglPathNode path[1];
};
void
cogl_clip_set (CoglFixed x_offset,
CoglFixed y_offset,
CoglFixed width,
CoglFixed height)
cogl_clip_set (float x_offset,
float y_offset,
float width,
float height)
{
CoglClipStackEntryRect *entry;
CoglClipStack *stack;