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

@@ -22,6 +22,16 @@ extern "C" {
#include "render_api_platform_types.h"
// initLibrary - initialize the library and tries to load the corresponding
// GLES translator libraries. This function must be called before anything
// else to ensure that everything works. If it returns an error, then
// you cannot use the library at all (this can happen under certain
// environments where the desktop GL libraries are not available)
//
// returns true if the library could be initialized successfully;
//
bool initLibrary(void);
//
// initOpenGLRenderer - initialize the OpenGL renderer process.
// portNum is the tcp port number the renderer is listening to.
@@ -31,7 +41,7 @@ extern "C" {
// returns true if renderer has been started successfully;
//
// This function is *NOT* thread safe and should be called first
// to initialize the renderer.
// to initialize the renderer after initLibrary().
//
bool initOpenGLRenderer(int width, int height, int portNum);