Fixed: Getters for Anisotropic Filtering

This commit is contained in:
kervala 2015-12-02 18:56:49 +01:00
parent e96f954a87
commit f720072e7b
9 changed files with 75 additions and 1 deletions

View file

@ -415,6 +415,16 @@ public:
*/
virtual void setAnisotropicFilter(sint filter) = 0;
/**
* Get current anisotropic filter value
*/
virtual uint getAnisotropicFilter() const = 0;
/**
* Get maximum anisotropic filter value
*/
virtual uint getAnisotropicFilterMaximum() const = 0;
/** if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..)
* to be divided by Divisor (2, 4, 8...)
* Default is 1.

View file

@ -474,6 +474,8 @@ public:
virtual TPolygonMode getPolygonMode ();
virtual void forceDXTCCompression(bool dxtcComp);
virtual void setAnisotropicFilter(sint filter);
virtual uint getAnisotropicFilter() const;
virtual uint getAnisotropicFilterMaximum() const;
virtual void forceTextureResize(uint divisor);
virtual bool setMonitorColorProperties (const CMonitorColorProperties &properties);
// @}

View file

@ -646,6 +646,16 @@ public:
*/
virtual void setAnisotropicFilter(sint filter)=0;
/**
* Get current anisotropic filter value
*/
virtual uint getAnisotropicFilter() const = 0;
/**
* Get maximum anisotropic filter value
*/
virtual uint getAnisotropicFilterMaximum() const = 0;
/** if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..)
* to be divided by Divisor (2, 4, 8...)
* Default is 1.

View file

@ -32,7 +32,7 @@ namespace NL3D
{
// ***************************************************************************
const uint32 IDriver::InterfaceVersion = 0x6e; // gpu program interface
const uint32 IDriver::InterfaceVersion = 0x6f; // getters for anisotropic filter
// ***************************************************************************
IDriver::IDriver() : _SyncTexDrvInfos( "IDriver::_SyncTexDrvInfos" )

View file

@ -2103,6 +2103,24 @@ void CDriverD3D::setAnisotropicFilter(sint filter)
// ***************************************************************************
uint CDriverD3D::getAnisotropicFilter() const
{
H_AUTO_D3D(CDriverD3D_getAnisotropicFilter);
return _AnisotropicFilter;
}
// ***************************************************************************
uint CDriverD3D::getAnisotropicFilterMaximum() const
{
H_AUTO_D3D(CDriverD3D_getAnisotropicFilterMaximum);
return _MaxAnisotropy;
}
// ***************************************************************************
void CDriverD3D::forceTextureResize(uint divisor)
{
H_AUTO_D3D(CDriverD3D_forceTextureResize);

View file

@ -879,6 +879,8 @@ public:
virtual void disableHardwareTextureShader();
virtual void forceDXTCCompression(bool dxtcComp);
virtual void setAnisotropicFilter(sint filter);
virtual uint getAnisotropicFilter() const;
virtual uint getAnisotropicFilterMaximum() const;
virtual void forceTextureResize(uint divisor);
// Driver information

View file

@ -381,6 +381,8 @@ public:
virtual void forceDXTCCompression(bool dxtcComp);
virtual void setAnisotropicFilter(sint filter);
virtual uint getAnisotropicFilter() const;
virtual uint getAnisotropicFilterMaximum() const;
virtual void forceTextureResize(uint divisor);

View file

@ -2128,6 +2128,22 @@ void CDriverGL::setAnisotropicFilter(sint filtering)
}
}
// ***************************************************************************
uint CDriverGL::getAnisotropicFilter() const
{
H_AUTO_OGL(CDriverGL_getAnisotropicFilter);
return (uint)_AnisotropicFilter;
}
// ***************************************************************************
uint CDriverGL::getAnisotropicFilterMaximum() const
{
H_AUTO_OGL(CDriverGL_getAnisotropicFilterMaximum);
return (uint)_Extensions.EXTTextureFilterAnisotropicMaximum;
}
// ***************************************************************************
void CDriverGL::forceTextureResize(uint divisor)
{

View file

@ -1481,6 +1481,20 @@ void CDriverUser::setAnisotropicFilter(sint filter)
_Driver->setAnisotropicFilter(filter);
}
uint CDriverUser::getAnisotropicFilter() const
{
NL3D_HAUTO_UI_DRIVER;
return _Driver->getAnisotropicFilter();
}
uint CDriverUser::getAnisotropicFilterMaximum() const
{
NL3D_HAUTO_UI_DRIVER;
return _Driver->getAnisotropicFilterMaximum();
}
void CDriverUser::forceTextureResize(uint divisor)
{
NL3D_HAUTO_UI_DRIVER;