1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-02-23 15:05:34 +01:00

Fix building for SDL2 in GLES mode, and fix black screen on GLES mode. (#195)

This commit is contained in:
Manuel Alfayate Corchete 2019-07-10 06:35:21 +02:00 committed by Timur Gagiev
parent 5366ec795b
commit e02e582db8
2 changed files with 1 additions and 5 deletions

View File

@ -857,7 +857,7 @@ namespace GAPI {
glGenerateMipmap(target);
if ((opt & (OPT_VOLUME | OPT_CUBEMAP | OPT_NEAREST)) == 0 && (Core::support.maxAniso > 0)) {
glTexParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, min(int(Core::support.maxAniso), 8));
#if !defined(_OS_RPI) && !defined(_OS_CLOVER) && !defined(_GAPI_GLES2) // TODO
#if !defined(_OS_RPI) && !defined(_OS_CLOVER) && !(defined (__SDL2__) && defined (_GAPI_GLES))// TODO
glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, 3);
#endif
}

View File

@ -439,10 +439,6 @@ int main(int argc, char **argv) {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);