- 分析Platform.h
/* * ===================================================================================== * * Filename: Platform.h * * Description: 应用平台抽象 * * Version: 1.0 * Created: 2013年12月25日 16时47分06秒 * Revision: >
- 分析安卓平台的实现 PlatformAndroid.cpp
#include "Platform.h" #include "FileSystem.h" #include "Game.h" // 引用android> // 窗口销毁命令
> >}
// 进入消息主循环
int Platform::enterMessagePump()
{
> __suspended => JNIEnv*> jvm->GetEnv((void **)&env, JNI_VERSION_1_6);
jint> > {
GP_ERROR("Failed> jmethodID>
jclass> jmethodID>
// Now>
// Now> >
// 设置默认资源路径
> >
FileSystem::setResourcePath(assetsPath.c_str());
// 释放字符串对象
>
// 设置应用消息回调和输入回调
__state->onAppCmd =>
// 获取程序启动时间
> __timeAbsolute = 0L;
> }
}
}
// 提交渲染结果到设备
void Platform::swapBuffers()
{
if (__eglDisplay && __eglSurface)
eglSwapBuffers(__eglDisplay, __eglSurface);
}
3D游戏引擎学习四(应用平台抽象Platform)
最新推荐文章于 2025-04-26 15:00:25 发布