axmol/cocos2dx/platform/android/CCXApplication_android.cpp

59 lines
1.2 KiB
C++
Raw Normal View History

2010-11-03 11:01:17 +08:00
#include "CCXApplication_android.h"
#include "CCXUIImage_android.h"
#include "CCXEGLView_android.h"
#include "CCDirector.h"
// #include "CCXGLExtFunc.h"
#include <GLES/glext.h>
#include <android/log.h>
namespace cocos2d {
static CCXApplication *s_pApplication;
CCXApplication::CCXApplication()
{
s_pApplication = this;
}
CCXApplication::~CCXApplication()
{
}
ccDeviceOrientation CCXApplication::setDeviceOrientation(ccDeviceOrientation eOritation)
{
return eOritation;
}
CGRect CCXApplication::statusBarFrame()
{
CGRect rc;
return rc;
}
//////////////////////////////////////////////////////////////////////////
/// Implement static class member
//////////////////////////////////////////////////////////////////////////
CCXApplication * CCXApplication::getSharedApplication()
{
return s_pApplication;
}
}
extern "C"
{
JavaVM *gJavaVM = NULL;
jint JNI_OnLoad(JavaVM *vm, void *reserved)
{
gJavaVM = vm;
return JNI_VERSION_1_4;
}
2010-11-04 17:33:31 +08:00
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeRender(JNIEnv* env)
2010-11-03 11:01:17 +08:00
{
cocos2d::CCDirector::getSharedDirector()->preMainLoop();
}
}