From e99589a3ebf32b86046429c025fb0d3db6e44a68 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 21 Jan 2021 22:17:35 +0100 Subject: fixed anisotropic filtering; updated librw --- src/rw/TexRead.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rw') diff --git a/src/rw/TexRead.cpp b/src/rw/TexRead.cpp index c5252f77..4eb06ad1 100644 --- a/src/rw/TexRead.cpp +++ b/src/rw/TexRead.cpp @@ -5,7 +5,7 @@ #define WITHD3D #endif #include "common.h" -#ifndef LIBRW +#ifdef ANISOTROPIC_FILTERING #include "rpanisot.h" #endif #include "crossplatform.h" @@ -58,9 +58,9 @@ RwTextureGtaStreamRead(RwStream *stream) if(tex == nil) return nil; -#ifndef LIBRW - if(RpAnisotTextureGetMaxAnisotropy(tex) > 1) - RpAnisotTextureSetMaxAnisotropy(tex, RpAnisotTextureGetMaxAnisotropy(tex)); +#ifdef ANISOTROPIC_FILTERING + if(RpAnisotGetMaxSupportedMaxAnisotropy() > 1) // BUG? this was RpAnisotTextureGetMaxAnisotropy, but that doesn't make much sense + RpAnisotTextureSetMaxAnisotropy(tex, RpAnisotGetMaxSupportedMaxAnisotropy()); #endif return tex; -- cgit v1.2.3 From 94ff96699477fcbcd0dba949691cbf6641ebb485 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 21 Jan 2021 22:25:14 +0100 Subject: bletch --- src/rw/TexRead.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/rw') diff --git a/src/rw/TexRead.cpp b/src/rw/TexRead.cpp index 4eb06ad1..632cec02 100644 --- a/src/rw/TexRead.cpp +++ b/src/rw/TexRead.cpp @@ -55,11 +55,8 @@ RwTextureGtaStreamRead(RwStream *stream) texNumLoaded++; } - if(tex == nil) - return nil; - #ifdef ANISOTROPIC_FILTERING - if(RpAnisotGetMaxSupportedMaxAnisotropy() > 1) // BUG? this was RpAnisotTextureGetMaxAnisotropy, but that doesn't make much sense + if(tex && RpAnisotGetMaxSupportedMaxAnisotropy() > 1) // BUG? this was RpAnisotTextureGetMaxAnisotropy, but that doesn't make much sense RpAnisotTextureSetMaxAnisotropy(tex, RpAnisotGetMaxSupportedMaxAnisotropy()); #endif -- cgit v1.2.3