Hi all! Please help me to run cocos2d-1.0.1-x-0.13.0-beta with latest Marmalade SDK (6.1.1).
I build the HelloWorld project using X-Code 4.4.1.
Got assertion failure in emulator:
15/10/12 19:49:21.609: [0xfa0] DEBUG: s3eDebugAssertShow 0x00000000 type=2 'IwAssert failure (S3E, 1694).
Message: Unavailable GLES function called
Assertion failure occurs in CCGL.cpp:
void gluPerspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar)
{
GLfloat xmin, xmax, ymin, ymax;
ymax = zNear * (GLfloat)tanf(fovy * (float)M_PI / 360);
ymin = -ymax;
xmin = ymin * aspect;
xmax = ymax * aspect;
glFrustumf(xmin, xmax, <---------- ASSERTION HERE
ymin, ymax,
zNear, zFar);
}
It’s called from CCDirector.cpp: CCDirectior::setProjection():
case kCCDirectorProjection3D:
if (m_pobOpenGLView)
{
m_pobOpenGLView->setViewPortInPoints(0, 0, size.width, size.height);
}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// accommodate iPad retina while keep backward compatibility
if (m_pobOpenGLView && m_pobOpenGLView->isIpad() && m_pobOpenGLView->getMainScreenScale() > 1.0)
{
gluPerspective(60, (GLfloat)size.width/size.height, zeye-size.height/2, zeye+size.height/2);
}
else
{
gluPerspective(60, (GLfloat)size.width/size.height, 0.5f, 1500.0f); ///////// CALLED FROM HERE
}
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt( size.width/2, size.height/2, zeye,
size.width/2, size.height/2, 0,
0.0f, 1.0f, 0.0f);
break;
Maybe this is ATI-videocard related. Marmalade had problems with ATI videocards before which were at least partially fixed (at least their OpenGL samples work).
I have ATI Radeon HD 6870.
Got cocos2d-x working on Windows 7 virtual machine / VS2010 / Marmalade 6.1.1, but had to change OpenGL driver from PowerVR to Qualcomm one in emulator.
Please help me to get it running on MacOS. Any suggestions are welcome.
Thank you very much!