From b2fece761e8a055edf947ed83f2e0d4a90dbe2d7 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 25 Mar 2022 19:34:44 +0000 Subject: [PATCH] Make context create correctly --- android/app/src/main/cpp/code/sdl/sdl_glimp.c | 9 +++++---- android/app/src/main/cpp/main.cpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/android/app/src/main/cpp/code/sdl/sdl_glimp.c b/android/app/src/main/cpp/code/sdl/sdl_glimp.c index a78efbaf..9df3f744 100644 --- a/android/app/src/main/cpp/code/sdl/sdl_glimp.c +++ b/android/app/src/main/cpp/code/sdl/sdl_glimp.c @@ -589,6 +589,7 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, samples ? 1 : 0 ); SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, samples ); +#if 0 if(r_stereoEnabled->integer) { glConfig.stereoEnabled = qtrue; @@ -602,7 +603,7 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); -#if 0 // if multisampling is enabled on X11, this causes create window to fail. + // if multisampling is enabled on X11, this causes create window to fail. // If not allowing software GL, demand accelerated if( !r_allowSoftwareGL->integer ) SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 ); @@ -615,7 +616,7 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool continue; } - if( fullscreen ) + if( qfalse ) //fullscreen ) { SDL_DisplayMode mode; @@ -638,7 +639,7 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool } } - SDL_SetWindowIcon( SDL_window, icon ); + //SDL_SetWindowIcon( SDL_window, icon ); if (!fixedFunction) { @@ -648,7 +649,7 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minorVersion); ri.Printf(PRINT_ALL, "Trying to get an OpenGL 3.2 core context\n"); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); if ((SDL_glContext = SDL_GL_CreateContext(SDL_window)) == NULL) diff --git a/android/app/src/main/cpp/main.cpp b/android/app/src/main/cpp/main.cpp index 791522fc..0c36789d 100644 --- a/android/app/src/main/cpp/main.cpp +++ b/android/app/src/main/cpp/main.cpp @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) { engine_t* engine = nullptr; engine = VR_Init(java); - //sleep(30); + sleep(30); //First set up resolution cached values int width, height;