Index: third_party/gles_book_examples/Common/Source/esTransform.c |
=================================================================== |
--- third_party/gles_book_examples/Common/Source/esTransform.c (revision 35503) |
+++ third_party/gles_book_examples/Common/Source/esTransform.c (working copy) |
@@ -20,11 +20,11 @@ |
// |
#include "esUtil.h" |
#include <math.h> |
-#include <string.h> |
#define PI 3.1415926535897932384626433832795f |
-void esScale(ESMatrix *result, GLfloat sx, GLfloat sy, GLfloat sz) |
+void ESUTIL_API |
+esScale(ESMatrix *result, GLfloat sx, GLfloat sy, GLfloat sz) |
{ |
result->m[0][0] *= sx; |
result->m[0][1] *= sx; |
@@ -42,7 +42,8 @@ |
result->m[2][3] *= sz; |
} |
-void esTranslate(ESMatrix *result, GLfloat tx, GLfloat ty, GLfloat tz) |
+void ESUTIL_API |
+esTranslate(ESMatrix *result, GLfloat tx, GLfloat ty, GLfloat tz) |
{ |
result->m[3][0] += (result->m[0][0] * tx + result->m[1][0] * ty + result->m[2][0] * tz); |
result->m[3][1] += (result->m[0][1] * tx + result->m[1][1] * ty + result->m[2][1] * tz); |
@@ -50,7 +51,8 @@ |
result->m[3][3] += (result->m[0][3] * tx + result->m[1][3] * ty + result->m[2][3] * tz); |
} |
-void esRotate(ESMatrix *result, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) |
+void ESUTIL_API |
+esRotate(ESMatrix *result, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) |
{ |
GLfloat sinAngle, cosAngle; |
GLfloat mag = sqrtf(x * x + y * y + z * z); |
@@ -102,7 +104,8 @@ |
} |
} |
-void esFrustum(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ) |
+void ESUTIL_API |
+esFrustum(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ) |
{ |
float deltaX = right - left; |
float deltaY = top - bottom; |
@@ -131,7 +134,8 @@ |
} |
-void esPerspective(ESMatrix *result, float fovy, float aspect, float nearZ, float farZ) |
+void ESUTIL_API |
+esPerspective(ESMatrix *result, float fovy, float aspect, float nearZ, float farZ) |
{ |
GLfloat frustumW, frustumH; |
@@ -141,7 +145,8 @@ |
esFrustum( result, -frustumW, frustumW, -frustumH, frustumH, nearZ, farZ ); |
} |
-void esOrtho(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ) |
+void ESUTIL_API |
+esOrtho(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ) |
{ |
float deltaX = right - left; |
float deltaY = top - bottom; |
@@ -163,7 +168,8 @@ |
} |
-void esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB) |
+void ESUTIL_API |
+esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB) |
{ |
ESMatrix tmp; |
int i; |
@@ -194,7 +200,8 @@ |
} |
-void esMatrixLoadIdentity(ESMatrix *result) |
+void ESUTIL_API |
+esMatrixLoadIdentity(ESMatrix *result) |
{ |
memset(result, 0x0, sizeof(ESMatrix)); |
result->m[0][0] = 1.0f; |
@@ -202,3 +209,4 @@ |
result->m[2][2] = 1.0f; |
result->m[3][3] = 1.0f; |
} |
+ |