#ifndef XNA_GRAPHICS_SAMPLERSTATE_HPP #define XNA_GRAPHICS_SAMPLERSTATE_HPP #include "../default.hpp" #include "gresource.hpp" namespace xna { //Contains sampler state, which determines how to sample texture data. class SamplerState : GraphicsResource { public: SamplerState(); SamplerState(sptr const& device); //Gets or sets the maximum anisotropy. The default value is 0. void MaxAnisotropy(Uint value); //Gets or sets the maximum anisotropy. The default value is 0. Uint MaxAnisotropy() const; //Gets or sets the type of filtering during sampling. void Filter(TextureFilter value); //Gets or sets the type of filtering during sampling. TextureFilter Filter() const; ////Gets or sets the texture-address mode for the u-coordinate. void AddressU(TextureAddressMode value); //Gets or sets the texture-address mode for the u-coordinate. TextureAddressMode AddressU() const; //Gets or sets the texture-address mode for the v-coordinate. TextureAddressMode AddressV() const; //Gets or sets the texture-address mode for the v-coordinate. void AddressV(TextureAddressMode value); //Gets or sets the texture-address mode for the w-coordinate. TextureAddressMode AddressW() const; ////Gets or sets the texture-address mode for the w-coordinate. void AddressW(TextureAddressMode value); //Gets or sets the mipmap LOD bias. The default value is 0. void MipMapLevelOfDetailBias(float value); //Gets or sets the mipmap LOD bias. The default value is 0. float MipMapLevelOfDetailBias() const; //Gets or sets the level of detail (LOD) index of the largest map to use. float MaxMipLevel() const; //Gets or sets the level of detail (LOD) index of the largest map to use. void MaxMipLevel(float value); //Gets or sets the level of detail (LOD) index of the smaller map to use. void MinMipLevel(float value); //Gets or sets the level of detail (LOD) index of the smaller map to use. float MinMipLevel() const; //Contains default state for point filtering and texture coordinate wrapping. static uptr PoinWrap(); //Contains default state for point filtering and texture coordinate clamping. static uptr PointClamp(); //Contains default state for linear filtering and texture coordinate wrapping. static uptr LinearWrap(); //Contains default state for linear filtering and texture coordinate clamping. static uptr LinearClamp(); //Contains default state for anisotropic filtering and texture coordinate wrapping. static uptr AnisotropicWrap(); //Contains default state for anisotropic filtering and texture coordinate clamping. static uptr AnisotropicClamp(); ComparisonFunction Comparison() const; void Comparison(ComparisonFunction value); bool Initialize(); bool Apply(); public: struct PlatformImplementation; uptr impl = nullptr; }; } #endif