--- a/src/MacSrc/Shock.c 2026-07-19 21:10:52.654910439 +0200 +++ b/src/MacSrc/Shock.c 2026-07-19 21:10:52.658910394 +0200 @@ -167,9 +167,21 @@ } // TODO: figure out some universal set of settings that work... +#ifdef __ANDROID__ + // Desktop GL's compatibility/core profile split doesn't exist on + // Android - EGL only ever gives out GLES contexts. Quest hardware + // (Adreno on the XR2/XR2 Gen 2) supports GLES 3.2, which - unlike + // GLES 2.0 - has GL_UNPACK_ROW_LENGTH and GL_CLAMP_TO_BORDER as core + // (see android/engine-patches/03-android-opengl-es-render.patch), + // avoiding needing workarounds for either in OpenGL.cc. + 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); +#else SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); +#endif SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);