-------------------------------------------------------------------------------------- Description: Descibes texture sampler. Used in creation of Tr2SamplerStateAL objects. --------------------------------------------------------------------------------------
| 135 | // Descibes texture sampler. Used in creation of Tr2SamplerStateAL objects. |
| 136 | // -------------------------------------------------------------------------------------- |
| 137 | struct Tr2SamplerDescription |
| 138 | { |
| 139 | Tr2SamplerDescription() : |
| 140 | m_minFilter( Tr2RenderContextEnum::TF_POINT ), |
| 141 | m_magFilter( Tr2RenderContextEnum::TF_POINT ), |
| 142 | m_mipFilter( Tr2RenderContextEnum::TF_POINT ), |
| 143 | m_isComparisonFilter( false ), |
| 144 | m_addressU( Tr2RenderContextEnum::TA_WRAP ), |
| 145 | m_addressV( Tr2RenderContextEnum::TA_WRAP ), |
| 146 | m_addressW( Tr2RenderContextEnum::TA_WRAP ), |
| 147 | m_mipLODBias( 0 ), |
| 148 | m_maxAnisotropy( 1 ), |
| 149 | m_comparisonFunc( Tr2RenderContextEnum::CMP_ALWAYS ), |
| 150 | m_minLOD( 0.f ), |
| 151 | m_maxLOD( std::numeric_limits<float>::max() ) |
| 152 | { |
| 153 | m_borderColor[0] = 0; |
| 154 | m_borderColor[1] = 0; |
| 155 | m_borderColor[2] = 0; |
| 156 | m_borderColor[3] = 0; |
| 157 | } |
| 158 | |
| 159 | Tr2SamplerDescription( |
| 160 | Tr2RenderContextEnum::TextureFilter minFilter, |
| 161 | Tr2RenderContextEnum::TextureFilter magFilter, |
| 162 | Tr2RenderContextEnum::TextureFilter mipFilter, |
| 163 | bool isComparisonFilter, |
| 164 | Tr2RenderContextEnum::TextureAddressMode addressU, |
| 165 | Tr2RenderContextEnum::TextureAddressMode addressV, |
| 166 | Tr2RenderContextEnum::TextureAddressMode addressW, |
| 167 | float mipLODBias, |
| 168 | uint32_t maxAnisotropy, |
| 169 | Tr2RenderContextEnum::CompareFunc comparisonFunc, |
| 170 | const float* borderColor, |
| 171 | float minLOD, |
| 172 | float maxLOD ) : |
| 173 | m_minFilter( minFilter ), |
| 174 | m_magFilter( magFilter ), |
| 175 | m_mipFilter( mipFilter ), |
| 176 | m_isComparisonFilter( isComparisonFilter ), |
| 177 | m_addressU( addressU ), |
| 178 | m_addressV( addressV ), |
| 179 | m_addressW( addressW ), |
| 180 | m_mipLODBias( mipLODBias ), |
| 181 | m_maxAnisotropy( maxAnisotropy ), |
| 182 | m_comparisonFunc( comparisonFunc ), |
| 183 | m_minLOD( minLOD ), |
| 184 | m_maxLOD( maxLOD ) |
| 185 | { |
| 186 | m_borderColor[0] = borderColor[0]; |
| 187 | m_borderColor[1] = borderColor[1]; |
| 188 | m_borderColor[2] = borderColor[2]; |
| 189 | m_borderColor[3] = borderColor[3]; |
| 190 | } |
| 191 | |
| 192 | Tr2SamplerDescription( |
| 193 | Tr2RenderContextEnum::TextureFilter filter, |
| 194 | Tr2RenderContextEnum::TextureAddressMode address, |
no outgoing calls
no test coverage detected