[mupen64plus-video-rice] 70/191: Synchronize MipMapping options in Arachnoid and Rice

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:17:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-video-rice.

commit eef778ba090319961b6228fe36b6e29809eceb9b
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sun Jul 24 11:03:53 2011 +0200

    Synchronize MipMapping options in Arachnoid and Rice
---
 debian/changelog                |   1 +
 debian/patches/mipmapping.patch | 139 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series           |   1 +
 3 files changed, 141 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6ef0a31..6476bcc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ mupen64plus-video-rice (1.99.4-3) UNRELEASED; urgency=low
     - Add wom_corruption.patch, Remove write-only member variables m_bClampS and
       m_bClampT
     - Add z_coordinate_lines.patch, Fix z coordinate in 3d line rendering
+    - Add mipmapping.patch, Synchronize MipMapping options in Arachnoid and Rice
   * Depend on pkg-config in debian/control for new Makefile
 
  -- Sven Eckelmann <sven at narfation.org>  Sat, 23 Jul 2011 16:42:59 +0200
diff --git a/debian/patches/mipmapping.patch b/debian/patches/mipmapping.patch
new file mode 100644
index 0000000..79e615a
--- /dev/null
+++ b/debian/patches/mipmapping.patch
@@ -0,0 +1,139 @@
+Description: Synchronize MipMapping options in Arachnoid and Rice
+Origin: upstream, https://bitbucket.org/richard42/mupen64plus-video-rice/changeset/2d33cae8a164
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/Config.cpp b/src/Config.cpp
+index 248b955d575bc358dbd6b6d2768cfae7e80e8441..f6d1564ad9e081c5c0772424b368283d3570732e 100644
+--- a/src/Config.cpp
++++ b/src/Config.cpp
+@@ -341,11 +341,10 @@ BOOL InitConfiguration(void)
+     ConfigSetDefaultBool(l_ConfigVideoRice, "LoadHiResTextures", FALSE, "Enable hi-resolution texture file loading");
+     ConfigSetDefaultBool(l_ConfigVideoRice, "DumpTexturesToFiles", FALSE, "Enable texture dumping");
+     ConfigSetDefaultBool(l_ConfigVideoRice, "ShowFPS", FALSE, "Display On-screen FPS");
+-    ConfigSetDefaultBool(l_ConfigVideoRice, "EnableMipmaping", TRUE, "Enable/Disable Mipmaping");
+ 
++    ConfigSetDefaultInt(l_ConfigVideoRice, "Mipmapping", 2, "Use Mipmapping? 0=no, 1=nearest, 2=bilinear, 3=trilinear");
+     ConfigSetDefaultInt(l_ConfigVideoRice, "FogMethod", 0, "Enable, Disable or Force fog generation (0=Disable, 1=Enable n64 choose, 2=Force Fog)");
+     ConfigSetDefaultInt(l_ConfigVideoRice, "ForceTextureFilter", 0, "Force to use texture filtering or not (0=auto: n64 choose, 1=force no filtering, 2=force filtering)");
+-    ConfigSetDefaultInt(l_ConfigVideoRice, "TextureFilteringMethod", 1, "Choose wich texture filtering method will be used by your graphic card(0=no filtering, 1=bilinear, 2=trilinear)");
+     ConfigSetDefaultInt(l_ConfigVideoRice, "TextureEnhancement", 0, "Primary texture enhancement filter (0=None, 1=2X, 2=2XSAI, 3=HQ2X, 4=LQ2X, 5=HQ4X, 6=Sharpen, 7=Sharpen More, 8=External, 9=Mirrored)");
+     ConfigSetDefaultInt(l_ConfigVideoRice, "TextureEnhancementControl", 0, "Secondary texture enhancement filter (0 = none, 1-4 = filtered)");
+     ConfigSetDefaultInt(l_ConfigVideoRice, "TextureQuality", TXT_QUALITY_DEFAULT, "Color bit depth to use for textures (0=default, 1=32 bits, 2=16 bits)");
+@@ -353,7 +352,7 @@ BOOL InitConfiguration(void)
+     ConfigSetDefaultInt(l_ConfigVideoRice, "MultiSampling", 0, "Enable/Disable MultiSampling (0=off, 2,4,8,16=quality)");
+     ConfigSetDefaultInt(l_ConfigVideoRice, "ColorQuality", TEXTURE_FMT_A8R8G8B8, "Color bit depth for rendering window (0=32 bits, 1=16 bits)");
+     ConfigSetDefaultInt(l_ConfigVideoRice, "OpenGLRenderSetting", OGL_DEVICE, "OpenGL level to support (0=auto, 1=OGL_1.1, 2=OGL_1.2, 3=OGL_1.3, 4=OGL_1.4, 5=OGL_1.4_V2, 6=OGL_TNT2, 7=NVIDIA_OGL, 8=OGL_FRAGMENT_PROGRAM)");
+-    ConfigSetDefaultInt(l_ConfigVideoRice, "AnisotropicFiltering", 0, "Enable/Disable Anisotropic Filtering for Mipmaping (0=no filtering, 2-16=quality). This is uneffective if EnableMipmaping is false. If the given value is to high to be supported by your graphic card, the value will be the highest value your graphic card can support. Better result with Trilinear filtering");
++    ConfigSetDefaultInt(l_ConfigVideoRice, "AnisotropicFiltering", 0, "Enable/Disable Anisotropic Filtering for Mipmapping (0=no filtering, 2-16=quality). This is uneffective if Mipmapping is 0. If the given value is to high to be supported by your graphic card, the value will be the highest value your graphic card can support. Better result with Trilinear filtering");
+     return TRUE;
+ }
+ 
+@@ -453,11 +452,10 @@ static void ReadConfiguration(void)
+     options.bLoadHiResTextures = ConfigGetParamBool(l_ConfigVideoRice, "LoadHiResTextures");
+     options.bDumpTexturesToFiles = ConfigGetParamBool(l_ConfigVideoRice, "DumpTexturesToFiles");
+     options.bShowFPS = ConfigGetParamBool(l_ConfigVideoRice, "ShowFPS");
+-    options.bEnableMipmaping = ConfigGetParamBool(l_ConfigVideoRice, "EnableMipmaping");
+ 
++    options.mipmapping = ConfigGetParamInt(l_ConfigVideoRice, "Mipmapping");
+     options.fogMethod = ConfigGetParamInt(l_ConfigVideoRice, "FogMethod");
+     options.forceTextureFilter = ConfigGetParamInt(l_ConfigVideoRice, "ForceTextureFilter");
+-    options.textureFilteringMethod = ConfigGetParamInt(l_ConfigVideoRice, "TextureFilteringMethod");
+     options.textureEnhancement = ConfigGetParamInt(l_ConfigVideoRice, "TextureEnhancement");
+     options.textureEnhancementControl = ConfigGetParamInt(l_ConfigVideoRice, "TextureEnhancementControl");
+     options.textureQuality = ConfigGetParamInt(l_ConfigVideoRice, "TextureQuality");
+diff --git a/src/Config.h b/src/Config.h
+index bd9bab2002804b57fff5aee35fb2c42a93231665..c3b74f5ecc90dd4505711f1e8a3d3470aa7cea44 100644
+--- a/src/Config.h
++++ b/src/Config.h
+@@ -105,6 +105,7 @@ enum {
+ };
+ 
+ enum {
++    TEXTURE_NO_MIPMAP = 0,
+     TEXTURE_NO_FILTER,
+     TEXTURE_BILINEAR_FILTER,
+     TEXTURE_TRILINEAR_FILTER,
+@@ -210,11 +211,10 @@ typedef struct {
+     BOOL    bUseFullTMEM;
+ 
+     BOOL    bShowFPS;
+-    BOOL    bEnableMipmaping;
+ 
++    uint32  mipmapping;
+     uint32  fogMethod;
+     uint32  forceTextureFilter;
+-    uint32  textureFilteringMethod;
+     uint32  textureEnhancement;
+     uint32  textureEnhancementControl;
+     uint32  textureQuality;
+diff --git a/src/OGLExtRender.cpp b/src/OGLExtRender.cpp
+index c58a61da3f98662115f7fcf8910250d2e1ba4a5c..5eb92052c504b81e12345a30745be4dd4fdab6cf 100644
+--- a/src/OGLExtRender.cpp
++++ b/src/OGLExtRender.cpp
+@@ -244,25 +244,20 @@ void COGLExtRender::ApplyTextureFilter()
+         {
+             iMagFilter = GL_LINEAR;
+ 
+-            if(options.bEnableMipmaping)
+-            {
+-                //Texture filtering method user want
+-                switch(options.textureFilteringMethod)
+-                {
+-                case TEXTURE_BILINEAR_FILTER:
+-                    iMinFilter = GL_LINEAR_MIPMAP_NEAREST;
+-                    break;
+-                case TEXTURE_TRILINEAR_FILTER:
+-                    iMinFilter = GL_LINEAR_MIPMAP_LINEAR;
+-                    break;
+-                case TEXTURE_NO_FILTER:
+-                default:
+-                    iMinFilter = GL_NEAREST_MIPMAP_NEAREST;
+-                    break;
+-                }
+-            }
+-            else
++            //Texture filtering method user want
++            switch(options.mipmapping)
+             {
++            case TEXTURE_BILINEAR_FILTER:
++                iMinFilter = GL_LINEAR_MIPMAP_NEAREST;
++                break;
++            case TEXTURE_TRILINEAR_FILTER:
++                iMinFilter = GL_LINEAR_MIPMAP_LINEAR;
++                break;
++            case TEXTURE_NO_FILTER:
++                iMinFilter = GL_NEAREST_MIPMAP_NEAREST;
++                break;
++	    case TEXTURE_NO_MIPMAP:
++            default:
+                 //Bilinear without mipmap
+                 iMinFilter = GL_LINEAR;
+             }
+@@ -271,7 +266,7 @@ void COGLExtRender::ApplyTextureFilter()
+         {
+             iMagFilter = GL_NEAREST;
+ 
+-            if(options.bEnableMipmaping)
++            if(options.mipmapping)
+             {
+                 iMinFilter = GL_NEAREST_MIPMAP_NEAREST;
+             }
+diff --git a/src/OGLTexture.cpp b/src/OGLTexture.cpp
+index 00e7048610b8a287b1662ec41906045525dcdc35..b8182c6b11753b3ba264fe1726b604c395868c9c 100644
+--- a/src/OGLTexture.cpp
++++ b/src/OGLTexture.cpp
+@@ -104,11 +104,11 @@ void COGLTexture::EndUpdate(DrawInfo *di)
+     OPENGL_CHECK_ERRORS;
+ 
+     // mipmap support
+-    if(options.bEnableMipmaping)
++    if(options.mipmapping)
+     {
+         int m_maximumAnistropy = pcontext->getMaxAnisotropicFiltering(); //if getMaxAnisotropicFiltering() return more than 0, so aniso is supported and maxAnisotropicFiltering is set
+ 
+-        // Set Anisotropic filtering (mipmaping have to be activated, aniso filtering is not effective without)
++        // Set Anisotropic filtering (mipmapping have to be activated, aniso filtering is not effective without)
+         if( m_maximumAnistropy )	
+         {
+             glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, m_maximumAnistropy);
diff --git a/debian/patches/series b/debian/patches/series
index a46d49a..3411a11 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ portable_movsxl.patch
 infinit_loop.patch
 wom_corruption.patch
 z_coordinate_lines.patch
+mipmapping.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-rice.git



More information about the Pkg-games-commits mailing list