зеркало из https://github.com/microsoft/DirectXTK.git
Minor code review (#469)
This commit is contained in:
Родитель
3c45ee7529
Коммит
fb0a22e6cb
|
@ -43,6 +43,12 @@ class AlphaTestEffect::Impl : public EffectBase<AlphaTestEffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
D3D11_COMPARISON_FUNC alphaFunction;
|
||||
int referenceAlpha;
|
||||
|
||||
|
|
|
@ -54,6 +54,12 @@ class BasicEffect::Impl : public EffectBase<BasicEffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
bool lightingEnabled;
|
||||
bool preferPerPixelLighting;
|
||||
bool vertexColorEnabled;
|
||||
|
|
|
@ -246,6 +246,12 @@ public:
|
|||
static_assert(MaxDirectionalLights == 4, "Mismatch with DGSL pipline");
|
||||
}
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
void Initialize(_In_ ID3D11Device* device, bool enableSkinning)
|
||||
{
|
||||
weightsPerVertex = enableSkinning ? 4 : 0;
|
||||
|
|
|
@ -44,6 +44,12 @@ class DebugEffect::Impl : public EffectBase<DebugEffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
bool vertexColorEnabled;
|
||||
bool biasedVertexNormals;
|
||||
bool instancing;
|
||||
|
|
|
@ -43,6 +43,12 @@ class DualTextureEffect::Impl : public EffectBase<DualTextureEffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
bool vertexColorEnabled;
|
||||
|
||||
EffectColor color;
|
||||
|
|
|
@ -60,6 +60,12 @@ class EnvironmentMapEffect::Impl : public EffectBase<EnvironmentMapEffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
bool preferPerPixelLighting;
|
||||
bool fresnelEnabled;
|
||||
bool specularEnabled;
|
||||
|
|
|
@ -26,6 +26,12 @@ class GeometricPrimitive::Impl
|
|||
public:
|
||||
Impl() noexcept : mIndexCount(0) {}
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
void Initialize(_In_ ID3D11DeviceContext* deviceContext, const VertexCollection& vertices, const IndexCollection& indices);
|
||||
|
||||
void XM_CALLCONV Draw(FXMMATRIX world, CXMMATRIX view, CXMMATRIX projection,
|
||||
|
|
|
@ -70,6 +70,12 @@ class NormalMapEffect::Impl : public EffectBase<NormalMapEffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
void Initialize(_In_ ID3D11Device* device, bool enableSkinning);
|
||||
|
||||
ComPtr<ID3D11ShaderResourceView> normalTexture;
|
||||
|
|
|
@ -73,6 +73,12 @@ class PBREffect::Impl : public EffectBase<PBREffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
void Initialize(_In_ ID3D11Device* device, bool enableSkinning);
|
||||
|
||||
ComPtr<ID3D11ShaderResourceView> albedoTexture;
|
||||
|
|
|
@ -24,6 +24,12 @@ class PrimitiveBatchBase::Impl
|
|||
public:
|
||||
Impl(_In_ ID3D11DeviceContext* deviceContext, size_t maxIndices, size_t maxVertices, size_t vertexSize);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
void Begin();
|
||||
void End();
|
||||
|
||||
|
|
|
@ -56,6 +56,12 @@ class SkinnedEffect::Impl : public EffectBase<SkinnedEffectTraits>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11Device* device);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
bool preferPerPixelLighting;
|
||||
bool biasedVertexNormals;
|
||||
int weightsPerVertex;
|
||||
|
|
|
@ -63,6 +63,12 @@ XM_ALIGNED_STRUCT(16) SpriteBatch::Impl : public AlignedNew<SpriteBatch::Impl>
|
|||
public:
|
||||
explicit Impl(_In_ ID3D11DeviceContext* deviceContext);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
void XM_CALLCONV Begin(SpriteSortMode sortMode,
|
||||
_In_opt_ ID3D11BlendState* blendState,
|
||||
_In_opt_ ID3D11SamplerState* samplerState,
|
||||
|
|
|
@ -33,6 +33,12 @@ public:
|
|||
size_t glyphCount,
|
||||
float lineSpacing) noexcept(false);
|
||||
|
||||
Impl(const Impl&) = delete;
|
||||
Impl& operator=(const Impl&) = delete;
|
||||
|
||||
Impl(Impl&&) = default;
|
||||
Impl& operator=(Impl&&) = default;
|
||||
|
||||
Glyph const* FindGlyph(wchar_t character) const;
|
||||
|
||||
void SetDefaultCharacter(wchar_t character);
|
||||
|
|
Загрузка…
Ссылка в новой задаче