Improve RPi support

This commit is contained in:
Joshua Granick
2015-09-02 23:53:14 -07:00
parent c6ed35b493
commit 34d4b9cc13
11 changed files with 42 additions and 24 deletions

View File

@@ -34,6 +34,13 @@ namespace lime {
SDL_SetHint (SDL_HINT_VIDEO_WIN_D3DCOMPILER, "d3dcompiler_47.dll");
#endif
#if defined (RASPBERRYPI)
SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_SetHint (SDL_HINT_RENDER_DRIVER, "opengles2");
#endif
if (flags & WINDOW_FLAG_DEPTH_BUFFER) {
SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 32 - (flags & WINDOW_FLAG_STENCIL_BUFFER) ? 8 : 0);
@@ -309,4 +316,4 @@ namespace lime {
}
}
}

View File

@@ -2,7 +2,7 @@
#define LIME_GRAPHICS_OPENGL_OPENGL_H
#if defined (BLACKBERRY) || defined (ANDROID) || defined (WEBOS) || defined (GPH) || defined (EMSCRIPTEN)
#if defined (BLACKBERRY) || defined (ANDROID) || defined (WEBOS) || defined (GPH) || defined (EMSCRIPTEN) || defined (RASPBERRYPI)
#define LIME_GLES
#include <GLES2/gl2.h>