emulator: opengl: add initLibrary function to render library

This adds an initLibrary() function to libOpenglRender.

It will be used by the emulator to fallback on software rendering
if the library cannot be initialized properly, e.g. if it is not
possible to load the host EGL/GLES libraries.

Change-Id: I41e8ad73a315166e4a15cbee1db72c2552370f46
This commit is contained in:
David 'Digit' Turner
2011-08-29 16:57:38 +02:00
parent 56eca4e089
commit 5d1e8b2f28
5 changed files with 45 additions and 20 deletions

View File

@@ -107,24 +107,6 @@ bool FrameBuffer::initialize(int width, int height)
return true;
}
//
// Load EGL Plugin
//
if (!init_egl_dispatch()) {
// Failed to load EGL
printf("Failed to init_egl_dispatch\n");
return false;
}
//
// Load GLES Plugin
//
if (!init_gl_dispatch()) {
// Failed to load GLES
ERR("Failed to init_gl_dispatch\n");
return false;
}
//
// allocate space for the FrameBuffer object
//
@@ -142,7 +124,7 @@ bool FrameBuffer::initialize(int width, int height)
fb->m_caps.hasGL2 = false;
}
else {
fb->m_caps.hasGL2 = init_gl2_dispatch();
fb->m_caps.hasGL2 = s_gl2_enabled;
}
#else
fb->m_caps.hasGL2 = false;