iOS compilation fixes

This commit is contained in:
Xawotihs
2010-11-19 23:16:31 +00:00
parent 6d855e6cda
commit 8339cdd3b3
30 changed files with 327 additions and 220 deletions

View File

@@ -219,7 +219,7 @@ bool JMD2Model::Load(char *filename, char *textureName)
//-------------------------------------------------------------------------------------------------
// given 3 points, calculates the normal to the points
#if defined (WIN32) || defined (LINUX)
#if defined (WIN32) || defined (LINUX) || defined (IOS)
void JMD2Model::CalculateNormal(float *p1, float *p2, float *p3)
#else
void JMD2Model::CalculateNormal(ScePspFVector3 *normal, float *p1, float *p2, float *p3)
@@ -243,7 +243,7 @@ void JMD2Model::CalculateNormal(ScePspFVector3 *normal, float *p1, float *p2, fl
// calculate the length of the normal
length = (float)sqrt(result[0]*result[0] + result[1]*result[1] + result[2]*result[2]);
#if defined (WIN32) || defined (LINUX)
#if defined (WIN32) || defined (LINUX) || defined (IOS)
// normalize and specify the normal
#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
glNormal3f(result[0]/length, result[1]/length, result[2]/length);
@@ -277,7 +277,7 @@ void JMD2Model::Render(int frameNum)
mRenderer->BindTexture(mModel->modelTex);
#if defined (WIN32) || defined (LINUX)
#if defined (WIN32) || defined (LINUX) || defined (IOS)
// display the textured model with proper lighting normals
#if (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0)
@@ -481,7 +481,7 @@ void JMD2Model::Render()
mRenderer->BindTexture(mModel->modelTex);
#if defined (WIN32) || defined (LINUX)
#if defined (WIN32) || defined (LINUX) || defined (IOS)
#if (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0)
// FIXME