The highres textures should be created in a buffer with the size calculated
from the desired native size and the size of the highres texture. The size used
here should be 2**scaleShift as calculated by FindScaleFactor. This information
is later used to correctly clamp and mirror textures. Therefore,
(2**scaleShift)*(Width|Height)ToCreate is the size of the final texture and
(2**scaleShift)*(Width|Height)ToLoad is the size of the texture information
which are loaded from the external image. The mirror factor is already part of
the (Width|Height)ToCreate value and it must not be multiplied by it again to
get the texture buffer size.
nogagplz tested mupen64plus on 32-bit ppc and didn't detect any big show
stoppers with interpreter cores and the mupen64plus example rom. This makes the
PowerPC an interesting target for further tests and may reveal other endianness
problems.
nogagplz noticed on ppc32 that PIC is necessary to compile everything as shared
object. Therefore, it seems to be a better idea to have architecture specific
PIC default settings instead of checking only whether it is a 32 or 64 bit
architecture.
Write access to m_bClampS and m_bClampT resulted in memory corruption due to
write access outside of the array bounds. It is never read and thus it can
savely be removed.
Posix only defines that PATH_MAX may is defined through limits.h.
GNU/Hurd has removed this definition without violating the standards.
Mupen64Plus still relies on it and we work around that problem by
defining PATH_MAX as 4096 in all places it is needed. This is not 100%
correct as their are ways to generate longer paths, but mupen64plus must
be heavily refactored in some places to fix the actual problem.
Some games experience fog problems (like goldeneye with doors wich are not "fogged" while the rest of the scene is).
Before, you can only disable, or let n64 choose if an object have to be "fogged" or not.
With this new method, you can disable, let n64 choose, or force fog generation on all rendered objects.
Force fog generation can create probs on some game during rendering (goldeneye mission selection menu) but can increase visual quality of some games (Goldeneye doors).
I change option, it's no more "EnableFog" but "FogMethod" (wich is more explicite):
"Enable, Disable or Force fog generation (0=Disable, 1=Enable n64 choose, 2=Force Fog)"
Anisotropic filtering:
-This filtering method is independant of others (Bilinear and Trilinear) but only work with mipmaping.
-It create a new option in .cfg: "AnisotropicFiltering".
-Valid value are: 2-4-8-16
OGLGraphicsContext check if extension is avaible and get the maximum value of aniso supported by hardware (If user want less, it set this maximum value to the value user want).
I also add two methods:
-IsSupportAnisotropicFiltering() << Return the bool value
-getMaxAnisotropicFiltering() << Return max value of aniso to use (limited by hardware or user)
OGLTexture now need access to "OGLGraphicsContext.h" class to work well:
-It just apply max aniso value that OGLGraphicsContext return
-Little modifications about mipmap: gluBuild2DMipmaps has been remove (this remove a dep) for a better option: GL_GENERATE_MIPMAP wich automaticaly generate mipmap when glTexImage2D function is called (It's even possible that this is done directly by hardware. I hope this will remove ATI radeon lag with some games when mipmap is activated).
-Because we don't use two methods (one for mipmap: gluBuild2DMipmaps, and one without: glTexImage2D) because now we use GL_GENERATE_MIPMAP: glTexImage2D has been "factorised" and put to the end of the method.