Fixed one huge bug in GLES init code
This commit is contained in:
@@ -674,6 +674,8 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
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 class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
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 class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Submodule project/jni/application/openarena/engine updated: 6f1dd087cc...18cec9de7c
Reference in New Issue
Block a user