i have the same problem , with running my game in landscape but i couldn’t do the same , i still have the problem here is my code :
CCDirector pDirector = CCDirector::sharedDirector;
pDirector~~>setOpenGLView);
pDirector~~>setProjection;
float w, h;
w = 1136;
h =640;
float angle = s3eSurfaceGetInt 90.0f;
UpdateProjection(angle,w, h); //its same as above,
CCEGLView::sharedOpenGLView()>setDesignResolutionSize;
// turn on display FPS
pDirector>setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don’t call this
pDirector~~>setAnimationInterval;
// create a scene. it’s an autorelease object
CCScene *pScene = PlayScene::scene;
// run
pDirector~~>runWithScene(pScene);
I’m using Marmalade 6.1.2 I don’t know if there is some issue with DispFixRot stuff in Marmalade 6.1.
Have you tried to upgrade to 6.1.2? Right now yo can download 6.2 version… but I’m having issues when getting the width and height from
s3eSurfaceGetInt() method!
Im going to download it now , i’ll post here result i hope it will make it right ,i’ve been busy with this problem since three days ago , it’s really annoying ,
with which version you have issue with s3eSurfaceGetInt() ?
if (IwGLGetInt(IW_GL_VIRTUAL_WIDTH) >= 0) {
w = (float)IwGLGetInt(IW_GL_VIRTUAL_WIDTH);
h = (float)IwGLGetInt(IW_GL_VIRTUAL_HEIGHT);
}
else {
w = (float)s3eSurfaceGetInt(S3E_SURFACE_WIDTH);
h = (float)s3eSurfaceGetInt(S3E_SURFACE_HEIGHT);
}
if ((angle 90.0f) || (angle 270.0f)) {
// Swap w and h
float oh = h;
h = w;
w = oh;
}
CCEGLView::sharedOpenGLView()>setFrameSize;
CCEGLView::sharedOpenGLView>setViewPortInPoints;
kmGLMatrixMode;
kmGLLoadIdentity;
kmGLRotatef, 0.0f, 0.0f, 1.0f );
kmMat4 orthoMatrix;
kmMat4OrthographicProjection;
kmGLMultMatrix;
kmGLMatrixMode;
kmGLLoadIdentity;
}
bool AppDelegate::applicationDidFinishLaunching {
// initialize director
CCDirector pDirector = CCDirector::sharedDirector;
pDirector~~>setOpenGLView);
pDirector~~>setProjection;
float w, h;
w = 1136;
h =640;
float angle = s3eSurfaceGetInt 90.0f;
UpdateProjection;
//pDirector~~>setContentScaleFactor;
CCEGLView::sharedOpenGLView~~>setDesignResolutionSize;
// turn on display FPS
pDirector~~>setDisplayStats;
// set FPS. the default value is 1.0/60 if you don’t call this
pDirector~~>setAnimationInterval(1.0 / 60);
// create a scene. it’s an autorelease object
CCScene *pScene = PlayScene::scene();
// run
pDirector->runWithScene(pScene);
return true;
}
// This function will be called when the app is inactive. When comes a phone call,it’s be invoked too
void AppDelegate::applicationDidEnterBackground() {
CCDirector::sharedDirector()->stopAnimation();
// if you use SimpleAudioEngine, it must be pause
// SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
CCDirector::sharedDirector()->startAnimation();
// if you use SimpleAudioEngine, it must resume here
// SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
}