API Documentation
Sampler.h
1 // Sampler.h
3 //
5 
6 namespace nkGraphics
7 {
13  class Sampler : public Resource, public nkExport::Exportable
14  {
15  public :
16 
17  // Getters
21  virtual FILTER getFiltering () const = 0 ;
25  virtual TEXTURE_ADDRESS_MODE getAddressModeU () const = 0 ;
29  virtual TEXTURE_ADDRESS_MODE getAddressModeV () const = 0 ;
33  virtual TEXTURE_ADDRESS_MODE getAddressModeW () const = 0 ;
41  virtual float getMipBias () const = 0 ;
45  virtual unsigned int getMaxAnisotropy () const = 0 ;
49  virtual float getMinLodLevel () const = 0 ;
53  virtual float getMaxLodLevel () const = 0 ;
57  virtual float getBorderColorR () const = 0 ;
61  virtual float getBorderColorG () const = 0 ;
65  virtual float getBorderColorB () const = 0 ;
69  virtual float getBorderColorA () const = 0 ;
90 
91  // Setters
100  virtual void setBorderColors (float r, float g, float b, float a) = 0 ;
106  virtual void setBorderColorR (float value) = 0 ;
112  virtual void setBorderColorG (float value) = 0 ;
118  virtual void setBorderColorB (float value) = 0 ;
124  virtual void setBorderColorA (float value) = 0 ;
131  virtual void setLodLevels (float min, float max) = 0 ;
137  virtual void setMaxAnisotropy (unsigned int value) = 0 ;
143  virtual void setMipMapBias (float value) = 0 ;
149  virtual void setFilterMethod (FILTER value) = 0 ;
155  virtual void setAddressModeU (TEXTURE_ADDRESS_MODE value) = 0 ;
161  virtual void setAddressModeV (TEXTURE_ADDRESS_MODE value) = 0 ;
167  virtual void setAddressModeW (TEXTURE_ADDRESS_MODE value) = 0 ;
173  virtual void setComparisonFunction (COMPARISON_FUNCTION value) = 0 ;
177  virtual void resetToDefault () = 0 ;
208 
209  // Import / Export
210  virtual void exportClassToTree (nkExport::Node* rootNode) override ;
211  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
212 
213  public :
214 
215  // Statics
223  static nkMemory::UniquePtr<Sampler> create (System* system = nullptr) ;
224  } ;
225 }
nkGraphics::Sampler::setLodLevels
virtual void setLodLevels(float min, float max)=0
nkGraphics::Sampler::getBorderColorG
virtual float getBorderColorG() const =0
nkGraphics::System
Main interface with the component system.
Definition: System.h:14
nkGraphics::Sampler::setBorderColorB
virtual void setBorderColorB(float value)=0
nkGraphics::Sampler::getComparisonFunction
virtual COMPARISON_FUNCTION getComparisonFunction() const =0
nkGraphics::Sampler::setMipMapBias
virtual void setMipMapBias(float value)=0
nkGraphics::Sampler::getBorderColorB
virtual float getBorderColorB() const =0
nkGraphics::Sampler::getFilteringAsString
nkMemory::StringView getFilteringAsString() const
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkGraphics::Sampler::getAddressModeU
virtual TEXTURE_ADDRESS_MODE getAddressModeU() const =0
nkGraphics::Sampler::getAddressModeUAsString
nkMemory::StringView getAddressModeUAsString() const
nkGraphics::Sampler::setFilterMethod
virtual void setFilterMethod(FILTER value)=0
nkGraphics::Sampler::setAddressModeWFromString
void setAddressModeWFromString(nkMemory::StringView value)
nkGraphics::Sampler::getMipBias
virtual float getMipBias() const =0
nkGraphics::Sampler::create
static nkMemory::UniquePtr< Sampler > create(System *system=nullptr)
nkGraphics::Sampler::setAddressModeUFromString
void setAddressModeUFromString(nkMemory::StringView value)
nkGraphics::Sampler::setAddressModeU
virtual void setAddressModeU(TEXTURE_ADDRESS_MODE value)=0
nkGraphics::Sampler::setBorderColorR
virtual void setBorderColorR(float value)=0
nkGraphics::Sampler::getAddressModeW
virtual TEXTURE_ADDRESS_MODE getAddressModeW() const =0
nkGraphics::Sampler::setMaxAnisotropy
virtual void setMaxAnisotropy(unsigned int value)=0
nkGraphics::Sampler::getAddressModeV
virtual TEXTURE_ADDRESS_MODE getAddressModeV() const =0
nkGraphics::Sampler::getBorderColorA
virtual float getBorderColorA() const =0
nkGraphics::Sampler::resetToDefault
virtual void resetToDefault()=0
nkGraphics::Sampler::setComparisonFuncFromString
void setComparisonFuncFromString(nkMemory::StringView value)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkGraphics::Sampler::setAddressModeVFromString
void setAddressModeVFromString(nkMemory::StringView value)
nkGraphics::Sampler::getMaxAnisotropy
virtual unsigned int getMaxAnisotropy() const =0
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkGraphics::Sampler::getBorderColorR
virtual float getBorderColorR() const =0
nkGraphics::Sampler::getAddressModeVAsString
nkMemory::StringView getAddressModeVAsString() const
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkGraphics::Sampler::getMinLodLevel
virtual float getMinLodLevel() const =0
nkGraphics::Sampler::setFilterMethodFromString
void setFilterMethodFromString(nkMemory::StringView value)
nkGraphics::Sampler
Holds all the information needed of a sampler used during rendering.
Definition: Sampler.h:14
nkGraphics::Sampler::getFiltering
virtual FILTER getFiltering() const =0
nkGraphics::Sampler::setAddressModeW
virtual void setAddressModeW(TEXTURE_ADDRESS_MODE value)=0
nkGraphics::Sampler::getMaxLodLevel
virtual float getMaxLodLevel() const =0
nkGraphics::Sampler::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkGraphics::Resource
Base class for a resource in the component.
Definition: Resource.h:12
nkGraphics::Sampler::setBorderColorA
virtual void setBorderColorA(float value)=0
nkGraphics::TEXTURE_ADDRESS_MODE
TEXTURE_ADDRESS_MODE
Available address mode for the samplers.
Definition: TextureAddressMode.h:12
nkGraphics::FILTER
FILTER
Available filtering methods a sampler can use, when magnifying or minifying during sampling.
Definition: Filter.h:12
nkGraphics::Sampler::getAddressModeWAsString
nkMemory::StringView getAddressModeWAsString() const
nkGraphics::Sampler::setBorderColorG
virtual void setBorderColorG(float value)=0
nkGraphics::Sampler::setBorderColors
virtual void setBorderColors(float r, float g, float b, float a)=0
nkGraphics::Sampler::setComparisonFunction
virtual void setComparisonFunction(COMPARISON_FUNCTION value)=0
nkGraphics::COMPARISON_FUNCTION
COMPARISON_FUNCTION
Available comparison functions available during sampling (for samplers, and depth stencil states).
Definition: ComparisonFunction.h:12
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::Sampler::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkGraphics::Sampler::setAddressModeV
virtual void setAddressModeV(TEXTURE_ADDRESS_MODE value)=0
nkGraphics::Sampler::getComparisonFuncAsString
nkMemory::StringView getComparisonFuncAsString() const