Permalink
Browse files

Renamed some drawing functions, for consistency.

  • Loading branch information...
darkuranium committed Apr 24, 2014
1 parent be24c85 commit 028b9dae92e15eaaa04103c4cab836c7c9641ed1
Showing with 26 additions and 12 deletions.
  1. +8 −4 include/siege/graphics/draw.h
  2. +4 −4 src/examples/physics.c
  3. +14 −4 src/siege/graphics/draw.c
@@ -185,8 +185,8 @@ void SG_CALL sgDrawPoint(float x, float y);
*
* \param size New point size
*/
void SG_CALL sgDrawPointSetSize(float size);
//float SG_CALL sgDrawPointGetSize(void);
void SG_CALL sgDrawSetPointSize(float size);
//float SG_CALL sgDrawGetPointSize(void);
/// @}
/**
@@ -207,8 +207,8 @@ void SG_CALL sgDrawLine(float x1, float y1, float x2, float y2);
*
* \param width New line width
*/
void SG_CALL sgDrawLineSetWidth(float width);
//float SG_CALL sgDrawLineGetWidth(void);
void SG_CALL sgDrawSetLineWidth(float width);
//float SG_CALL sgDrawGetLineWidth(void);
/// @}
/**
@@ -266,6 +266,10 @@ void SG_CALL sgDrawArcRads(float x, float y, float r, float a1, float a2, SGbool
void SG_CALL sgDrawArcDegs(float x, float y, float r, float a1, float a2, SGbool ccw, SGbool fill);
/// @}
/* DEPRECATED */
void SG_CALL SG_HINT_DEPRECATED sgDrawPointSetSize(float size);
void SG_CALL SG_HINT_DEPRECATED sgDrawLineSetWidth(float width);
#ifdef __cplusplus
}
#endif // __cplusplus
View
@@ -143,8 +143,8 @@ void boxDrawDBG(SGEntity* entity)
sgEntityDraw(entity);
}
//sgDrawLineSetWidth(2.0);
sgDrawPointSetSize(2.0);
//sgDrawSetLineWidth(2.0);
sgDrawSetPointSize(2.0);
/*SGVec2 pos;
sgEntityGetPos(entity, &pos.x, &pos.y);*/
@@ -167,8 +167,8 @@ void boxDrawDBG(SGEntity* entity)
}
}
//sgDrawLineSetWidth(1.0);
sgDrawPointSetSize(1.0);
//sgDrawSetLineWidth(1.0);
sgDrawSetPointSize(1.0);
sgDrawColor4f(1.0, 1.0, 1.0, 1.0);
sgPhysicsShapeDrawDBG(box->shape);
View
@@ -660,11 +660,11 @@ void SG_CALL sgDrawPoint(float x, float y)
sgDrawVertex2f(x, y);
sgDrawEnd();
}
void SG_CALL sgDrawPointSetSize(float size)
void SG_CALL sgDrawSetPointSize(float size)
{
glPointSize(size);
}
//float SG_CALL sgDrawPointGetSize(void);
//float SG_CALL sgDrawGetPointSize(void);
void SG_CALL sgDrawLine(float x1, float y1, float x2, float y2)
{
@@ -673,11 +673,11 @@ void SG_CALL sgDrawLine(float x1, float y1, float x2, float y2)
sgDrawVertex2f(x2, y2);
sgDrawEnd();
}
void SG_CALL sgDrawLineSetWidth(float width)
void SG_CALL sgDrawSetLineWidth(float width)
{
glLineWidth(width);
}
//float SG_CALL sgDrawLineGetWidth(void);
//float SG_CALL sgDrawGetLineWidth(void);
void SG_CALL sgDrawTriangle(float x1, float y1, float x2, float y2, float x3, float y3, SGbool fill)
{
@@ -807,3 +807,13 @@ void SG_CALL sgDrawArcDegs(float x, float y, float r, float a1, float a2, SGbool
{
sgDrawEArcDegs(x, y, r, r, a1, a2, ccw, fill);
}
/* DEPRECATED */
void SG_CALL SG_HINT_DEPRECATED sgDrawPointSetSize(float size)
{
sgDrawSetPointSize(size);
}
void SG_CALL SG_HINT_DEPRECATED sgDrawLineSetWidth(float width)
{
sgDrawSetLineWidth(width);
}

0 comments on commit 028b9da

Please sign in to comment.