99 lines
2.3 KiB
C++
99 lines
2.3 KiB
C++
/*
|
|
ZSamplerBase.hpp
|
|
Author: James Russell <jcrussell@762studios.com>
|
|
Created: 7/1/2012
|
|
|
|
Purpose:
|
|
|
|
TODO
|
|
|
|
License:
|
|
|
|
TODO
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef _ZSAMPLERBASE_HPP
|
|
#define _ZSAMPLERBASE_HPP
|
|
|
|
#include <ZRenderer/ZSampler.hpp>
|
|
|
|
//Base implementation of ZSampler Interface
|
|
class ZSamplerBase : public ZSampler
|
|
{
|
|
private:
|
|
DISABLE_COPY_AND_ASSIGN(ZSamplerBase);
|
|
|
|
protected:
|
|
//Current sampler state
|
|
ZSamplerState State;
|
|
|
|
//Flag indicating values have changed
|
|
bool bIsDirty;
|
|
|
|
//Default Constructor, which initializes with some sane default settings
|
|
ZSamplerBase();
|
|
|
|
public:
|
|
//Virtual Destructor
|
|
virtual ~ZSamplerBase() { }
|
|
|
|
/*
|
|
public ZSamplerBase::GetSamplerStateResetDirty
|
|
|
|
Gets the sampler state for this device. This will return
|
|
NULL if the sampler has not been modified since the last call to
|
|
this function, and in the case it has been modified, a call to this
|
|
resets the 'dirty' flag for the buffer.
|
|
|
|
@return (ZSamplerState*)
|
|
@context (all)
|
|
*/
|
|
ZSamplerState* GetSamplerStateResetDirty();
|
|
|
|
//Subclass Getter Implementations
|
|
virtual ZSamplerWrapMode GetSWrapMode();
|
|
virtual ZSamplerWrapMode GetTWrapMode();
|
|
virtual ZSamplerWrapMode GetRWrapMode();
|
|
|
|
virtual ZSamplerMinFilter GetMinFilter();
|
|
virtual ZSamplerMagFilter GetMagFilter();
|
|
|
|
virtual float GetMaxAnisotropy();
|
|
virtual float GetMinLOD();
|
|
virtual float GetMaxLOD();
|
|
virtual float GetLODBias();
|
|
|
|
virtual const float* GetBorderColor();
|
|
|
|
virtual ZSamplerCompareMode GetCompareMode();
|
|
virtual ZSamplerCompareFunc GetCompareFunc();
|
|
|
|
virtual const ZSamplerState& GetSamplerState();
|
|
|
|
//Subclass Setter Implementations
|
|
virtual bool SetSWrapMode( ZSamplerWrapMode _mode );
|
|
virtual bool SetTWrapMode( ZSamplerWrapMode _mode );
|
|
virtual bool SetRWrapMode( ZSamplerWrapMode _mode );
|
|
|
|
virtual bool SetMinFilter( ZSamplerMinFilter _filter );
|
|
virtual bool SetMagFilter( ZSamplerMagFilter _filter );
|
|
|
|
virtual bool SetMaxAnisotropy( float _max );
|
|
virtual bool SetMinLOD( float _min );
|
|
virtual bool SetMaxLOD( float _max );
|
|
virtual bool SetLODBias( float _bias );
|
|
|
|
virtual bool SetBorderColor( float _r, float _g, float _b, float _a );
|
|
|
|
virtual bool SetCompareMode(ZSamplerCompareMode _mode);
|
|
virtual bool SetCompareFunc(ZSamplerCompareFunc _func);
|
|
|
|
virtual bool SetSamplerState(const ZSamplerState& _state);
|
|
};
|
|
|
|
#endif
|
|
|