00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __PLRENDERER_SAMPLERSTATES_H__
00024 #define __PLRENDERER_SAMPLERSTATES_H__
00025 #pragma once
00026
00027
00028
00029
00030
00031 #include <PLCore/Base/Object.h>
00032 #include "PLRenderer/PLRenderer.h"
00033 #include "PLRenderer/Renderer/Types.h"
00034
00035
00036
00037
00038
00039 namespace PLRenderer {
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 class SamplerStates : public PLCore::Object {
00050
00051
00052
00053
00054
00055 pl_class(PLRENDERER_RTTI_EXPORT, SamplerStates, "PLRenderer", PLCore::Object, "Sampler states RTTI wrapper class")
00056
00057
00058 pl_attribute(AddressU, pl_enum_type(TextureAddressing::Enum), TextureAddressing::Wrap, ReadWrite, GetSet, "Texture-address mode for the u/s coordinate", "")
00059 pl_attribute(AddressV, pl_enum_type(TextureAddressing::Enum), TextureAddressing::Wrap, ReadWrite, GetSet, "Texture-address mode for the v/t coordinate", "")
00060 pl_attribute(AddressW, pl_enum_type(TextureAddressing::Enum), TextureAddressing::Wrap, ReadWrite, GetSet, "Texture-address mode for the w/r coordinate", "")
00061
00062 pl_attribute(MagFilter, pl_enum_type(TextureFiltering::Enum), TextureFiltering::Linear, ReadWrite, GetSet, "Magnification filter", "")
00063 pl_attribute(MinFilter, pl_enum_type(TextureFiltering::Enum), TextureFiltering::Linear, ReadWrite, GetSet, "Minification filter", "")
00064 pl_attribute(MipFilter, pl_enum_type(TextureFiltering::Enum), TextureFiltering::Linear, ReadWrite, GetSet, "Mipmap filter to use during minification", "")
00065
00066 pl_attribute(MipmapLODBias, float, 0.0f, ReadWrite, GetSet, "Mipmap level of detail (LOD) bias", "")
00067 pl_attribute(MaxMapLevel, PLCore::uint32, 1000, ReadWrite, GetSet, "LOD index of largest map to use. Values range from 0 to (n-1) where 0 is the largest", "")
00068 pl_attribute(MaxAnisotropy, PLCore::uint32, 1, ReadWrite, GetSet, "Maximum anisotropy", "")
00069 pl_class_end
00070
00071
00072
00073
00074
00075 public:
00076
00077 inline TextureAddressing::Enum GetAddressU() const;
00078 inline void SetAddressU(TextureAddressing::Enum nValue);
00079 inline TextureAddressing::Enum GetAddressV() const;
00080 inline void SetAddressV(TextureAddressing::Enum nValue);
00081 inline TextureAddressing::Enum GetAddressW() const;
00082 inline void SetAddressW(TextureAddressing::Enum nValue);
00083
00084 inline TextureFiltering::Enum GetMagFilter() const;
00085 inline void SetMagFilter(TextureFiltering::Enum nValue);
00086 inline TextureFiltering::Enum GetMinFilter() const;
00087 inline void SetMinFilter(TextureFiltering::Enum nValue);
00088 inline TextureFiltering::Enum GetMipFilter() const;
00089 inline void SetMipFilter(TextureFiltering::Enum nValue);
00090
00091 inline float GetMipmapLODBias() const;
00092 inline void SetMipmapLODBias(float fValue);
00093 inline PLCore::uint32 GetMaxMapLevel() const;
00094 inline void SetMaxMapLevel(int nValue);
00095 inline PLCore::uint32 GetMaxAnisotropy() const;
00096 inline void SetMaxAnisotropy(PLCore::uint32 nValue);
00097
00098
00099
00100
00101
00102 public:
00103
00104
00105
00106
00107 PLRENDERER_API SamplerStates();
00108
00109
00110
00111
00112
00113
00114
00115
00116 PLRENDERER_API SamplerStates(const SamplerStates &cSource);
00117
00118
00119
00120
00121
00122 PLRENDERER_API virtual ~SamplerStates();
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135 inline PLCore::uint32 Get(Sampler::Enum nState) const;
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154 inline bool Set(Sampler::Enum nState, PLCore::uint32 nValue);
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166 inline SamplerStates &operator =(const SamplerStates &cSource);
00167
00168
00169
00170
00171
00172 private:
00173
00174 PLCore::uint32 m_nSS[Sampler::Number];
00175
00176
00177 };
00178
00179
00180
00181
00182
00183 }
00184
00185
00186
00187
00188
00189 #include "PLRenderer/Renderer/SamplerStates.inl"
00190
00191
00192 #endif // __PLRENDERER_SAMPLERSTATES_H__