平台:
Ubuntu 14
Opengl ES
x86_64
PVR SDK
X11 _
运行时闪一下窗口就不见了,自己编译的和PowerVR SDK官网给出编译好的Demo都是这样,debug之后发现在 FrameWork/PVRPlatformGlue/EGL/EglPlatformContext.cpp文件中els初始化 失败,代码如下:
static inline Result::Enum preInitialize(OSManager& mgr, NativePlatformHandles& handles)
{
if (!handles.get())
{
handles.reset(new NativePlatformHandles::element_type);
}
// Associate the display with EGL.
handles->display = egl::GetDisplay(reinterpret_cast<EGLNativeDisplayType>(mgr.getDisplay()));
if (handles->display == EGL_NO_DISPLAY)
{
handles->display = egl::GetDisplay(static_cast<EGLNativeDisplayType>(EGL_DEFAULT_DISPLAY));
}
if (handles->display == EGL_NO_DISPLAY)
{
return Result::UnknownError;
}
// Initialize the display
if (egl::Initialize(handles->display, NULL, NULL) != EGL_TRUE)
{
// 在这里return
return Result::UnknownError;
}