|
@@ -998,6 +998,8 @@ int laGetReadyWith(laInitArguments* ia){
|
|
memcpy(&MAIN.InitArgs,ia,sizeof(laInitArguments));
|
|
memcpy(&MAIN.InitArgs,ia,sizeof(laInitArguments));
|
|
if(MAIN.InitArgs.GLMajor>4||MAIN.InitArgs.GLMajor<1){ MAIN.InitArgs.GLMajor=3; }
|
|
if(MAIN.InitArgs.GLMajor>4||MAIN.InitArgs.GLMajor<1){ MAIN.InitArgs.GLMajor=3; }
|
|
if(MAIN.InitArgs.GLMinor<1){ MAIN.InitArgs.GLMinor=3; }
|
|
if(MAIN.InitArgs.GLMinor<1){ MAIN.InitArgs.GLMinor=3; }
|
|
|
|
+ if(MAIN.InitArgs.GLESMajor>3||MAIN.InitArgs.GLESMajor<2){ MAIN.InitArgs.GLESMajor=3; }
|
|
|
|
+ if(MAIN.InitArgs.GLESMinor<0){ MAIN.InitArgs.GLESMinor=0; }
|
|
if(MAIN.BufferSamples==1){ MAIN.BufferSamples=0; }
|
|
if(MAIN.BufferSamples==1){ MAIN.BufferSamples=0; }
|
|
|
|
|
|
tnsInit();
|
|
tnsInit();
|
|
@@ -1025,7 +1027,12 @@ int laGetReadyWith(laInitArguments* ia){
|
|
la_ScanWacomDevices(MAIN.dpy,XIAllDevices);
|
|
la_ScanWacomDevices(MAIN.dpy,XIAllDevices);
|
|
|
|
|
|
MAIN.GLMajor=MAIN.InitArgs.GLMajor; MAIN.GLMinor=MAIN.InitArgs.GLMinor; MAIN.BufferSamples=MAIN.InitArgs.BufferSamples;
|
|
MAIN.GLMajor=MAIN.InitArgs.GLMajor; MAIN.GLMinor=MAIN.InitArgs.GLMinor; MAIN.BufferSamples=MAIN.InitArgs.BufferSamples;
|
|
|
|
+ MAIN.GLESMajor=MAIN.InitArgs.GLESMajor; MAIN.GLESMinor=MAIN.InitArgs.GLESMinor;
|
|
|
|
+#ifdef LA_USE_GLES
|
|
|
|
+ logPrint("Chosen OpenGL version %d.%d\n",MAIN.GLESMajor,MAIN.GLESMinor);
|
|
|
|
+#else
|
|
logPrint("Chosen OpenGL version %d.%d\n",MAIN.GLMajor,MAIN.GLMinor);
|
|
logPrint("Chosen OpenGL version %d.%d\n",MAIN.GLMajor,MAIN.GLMinor);
|
|
|
|
+#endif
|
|
|
|
|
|
#ifdef LA_USE_GLES
|
|
#ifdef LA_USE_GLES
|
|
|
|
|
|
@@ -1071,7 +1078,7 @@ int laGetReadyWith(laInitArguments* ia){
|
|
|
|
|
|
eglBindAPI(EGL_OPENGL_ES_API);
|
|
eglBindAPI(EGL_OPENGL_ES_API);
|
|
static const EGLint ctx_attribs[] = {
|
|
static const EGLint ctx_attribs[] = {
|
|
- EGL_CONTEXT_CLIENT_VERSION, 3,
|
|
|
|
|
|
+ EGL_CONTEXT_CLIENT_VERSION, MAIN.GLESMajor,
|
|
EGL_CONTEXT_MINOR_VERSION, 2,
|
|
EGL_CONTEXT_MINOR_VERSION, 2,
|
|
EGL_NONE
|
|
EGL_NONE
|
|
};
|
|
};
|