Fixed: Getters for Anisotropic Filtering

--HG--
branch : develop
hg/compatibility-develop
kervala 9 years ago
parent d8102a8c67
commit d4dd2b7264

@ -415,6 +415,16 @@ public:
*/ */
virtual void setAnisotropicFilter(sint filter) = 0; 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..) /** if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..)
* to be divided by Divisor (2, 4, 8...) * to be divided by Divisor (2, 4, 8...)
* Default is 1. * Default is 1.

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

@ -646,6 +646,16 @@ public:
*/ */
virtual void setAnisotropicFilter(sint filter)=0; 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..) /** if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..)
* to be divided by Divisor (2, 4, 8...) * to be divided by Divisor (2, 4, 8...)
* Default is 1. * Default is 1.

@ -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" ) IDriver::IDriver() : _SyncTexDrvInfos( "IDriver::_SyncTexDrvInfos" )

@ -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) void CDriverD3D::forceTextureResize(uint divisor)
{ {
H_AUTO_D3D(CDriverD3D_forceTextureResize); H_AUTO_D3D(CDriverD3D_forceTextureResize);

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

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

@ -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) void CDriverGL::forceTextureResize(uint divisor)
{ {

@ -1481,6 +1481,20 @@ void CDriverUser::setAnisotropicFilter(sint filter)
_Driver->setAnisotropicFilter(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) void CDriverUser::forceTextureResize(uint divisor)
{ {
NL3D_HAUTO_UI_DRIVER; NL3D_HAUTO_UI_DRIVER;

Loading…
Cancel
Save