Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed one huge bug in GLES init code

  • Loading branch information...
commit 685a415c63966fc237e90a32a934f7bb8be73a0d 1 parent e42289a
@pelya authored
View
14 project/java/GLSurfaceView_SDL.java
@@ -674,6 +674,8 @@ public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
String cfglog = "";
int idx = 0;
int selectidx = -1;
+
+ Log.v("SDL", "Desired GL config: " + "R" + mRedSize + "G" + mGreenSize + "B" + mBlueSize + "A" + mAlphaSize + " depth " + mDepthSize + " stencil " + mStencilSize + " type " + (mIsGles2 ? "GLES2" : "GLES"));
for(EGLConfig config : configs) {
if ( config == null )
continue;
@@ -699,12 +701,16 @@ public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
int distance = Math.abs(r - mRedSize)
+ Math.abs(g - mGreenSize)
+ Math.abs(b - mBlueSize) + Math.abs(a - mAlphaSize);
+ int dist2 = distance;
if( (d > 0) != (mDepthSize > 0) )
- distance += (d > 0) ? 5 : 1; // Small penalty if we don't need zbuffer but it is present
- if( (s > 0) == (mStencilSize > 0) )
- distance += (s > 0) ? 5 : 1;
+ distance += (mDepthSize > 0) ? 5 : 1; // Small penalty if we don't need zbuffer but it is present
+ int dist3 = distance;
+ if( (s > 0) != (mStencilSize > 0) )
+ distance += (mStencilSize > 0) ? 5 : 1;
+ int dist4 = distance;
if( (rendertype & desiredtype) == 0 )
distance += 5;
+ int dist5 = distance;
if( caveat == EGL10.EGL_SLOW_CONFIG )
distance += 4;
if( caveat == EGL10.EGL_NON_CONFORMANT_CONFIG ) // dunno what that means, probably R and B channels swapped
@@ -726,7 +732,7 @@ public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
caveat == EGL10.EGL_NON_CONFORMANT_CONFIG ? "non-conformant" :
String.valueOf(caveat)));
cfgcur += " nr " + nativeRender;
- cfgcur += " pos " + distance;
+ cfgcur += " pos " + distance + " (" + dist2 + "," + dist3 + "," + dist4 + "," + dist5 + ")";
Log.v("SDL", "GL config " + idx + ": " + cfgcur);
if (distance < closestDistance) {
closestDistance = distance;
View
6 project/jni/application/openarena/AndroidAppSettings.cfg
@@ -8,7 +8,7 @@ InhibitSuspend=n
AppDataDownloadUrl="!Game data|:baseoa/pak0.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak0.pk3/download^!Game data|:baseoa/pak1-maps.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak1-maps.pk3/download^!Game data|:baseoa/pak2-players-mature.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak2-players-mature.pk3/download^!Game data|:baseoa/pak2-players.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak2-players.pk3/download^!Game data|:baseoa/pak4-textures.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak4-textures.pk3/download^!Game data|:baseoa/pak5-TA.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak5-TA.pk3/download^!Game data|:baseoa/pak6-misc.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-misc.pk3/download^!Game data|:baseoa/pak6-patch085.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-patch085.pk3/download^!Game data|:baseoa/pak6-patch088.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-patch088.pk3/download^!Game data|:baseoa/skn-arachna-forlorna.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/skn-arachna-forlorna.pk3/download^!Game logic|:baseoa/pak7-android.pk3:pak7-android.pk3"
VideoDepthBpp=24
NeedDepthBuffer=y
-NeedStencilBuffer=y
+NeedStencilBuffer=n
NeedGles2=n
SwVideoMode=n
SdlVideoResize=y
@@ -37,8 +37,8 @@ HiddenMenuOptions='OptionalDownloadConfig DisplaySizeConfig'
FirstStartMenuOptions=''
MultiABI=y
AppMinimumRAM=350
-AppVersionCode=08811
-AppVersionName="0.8.8.11"
+AppVersionCode=08813
+AppVersionName="0.8.8.13"
ResetSdlConfigForThisVersion=y
DeleteFilesOnUpgrade="libsdl-DownloadFinished-10.flag .openarena/baseoa/q3config.cfg"
CompiledLibraries="sdl_mixer sdl_image freetype curl vorbis ogg"
2  project/jni/application/openarena/engine
@@ -1 +1 @@
-Subproject commit 6f1dd087cc692308e96e8a0cb36e70a6e826b45c
+Subproject commit 18cec9de7cba9e47ec75ce009176f95fdfc37595
2  project/jni/application/openarena/vm
@@ -1 +1 @@
-Subproject commit 7d662db628c6a254f2cf45d88ad634240866e03a
+Subproject commit 86f8d32314a322712afd0b23c6f33cda7d9ac726
Please sign in to comment.
Something went wrong with that request. Please try again.