Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ if(WIN32 AND BUILD_SHARED_LIBS)
elseif(XBOX_CONSOLE_TARGET MATCHES "durango")
target_link_libraries(${PROJECT_NAME} PRIVATE kernelx.lib combase.lib d3d12_x.lib xi.lib)
else()
target_link_libraries(${PROJECT_NAME} PRIVATE d3d12.lib)
target_link_libraries(${PROJECT_NAME} PRIVATE d3d12.lib dxguid.lib)
endif()

if(MINGW AND BUILD_XINPUT)
Expand Down
50 changes: 44 additions & 6 deletions Inc/Effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ namespace DirectX
DIRECTX_TOOLKIT_API void __cdecl SetSpecularTexture(D3D12_GPU_DESCRIPTOR_HANDLE srvDescriptor);

protected:
// Private implementation.
// internal implementation.
class Impl;

std::unique_ptr<Impl> pImpl;
Expand Down Expand Up @@ -663,7 +663,7 @@ namespace DirectX
DIRECTX_TOOLKIT_API void __cdecl SetRenderTargetSizeInPixels(int width, int height);

protected:
// Private implementation.
// Internal implementation.
class Impl;

std::unique_ptr<Impl> pImpl;
Expand All @@ -674,6 +674,7 @@ namespace DirectX
const EffectPipelineStateDescription& pipelineDescription,
bool skinningEnabled);

private:
// Unsupported interface methods.
DIRECTX_TOOLKIT_API void XM_CALLCONV SetAmbientLightColor(FXMVECTOR value) override;
DIRECTX_TOOLKIT_API void XM_CALLCONV SetLightSpecularColor(int whichLight, FXMVECTOR value) override;
Expand Down Expand Up @@ -763,11 +764,13 @@ namespace DirectX
Mode_MatCap, // Material Capture shading
};

DIRECTX_TOOLKIT_API NPREffect(
DIRECTX_TOOLKIT_API inline NPREffect(
_In_ ID3D12Device* device,
uint32_t effectFlags,
const EffectPipelineStateDescription& pipelineDescription,
Mode nprMode = Mode_Cel);
Mode nprMode = Mode_Cel) :
NPREffect(device, effectFlags, pipelineDescription, nprMode, false)
{}

DIRECTX_TOOLKIT_API NPREffect(NPREffect&&) noexcept;
DIRECTX_TOOLKIT_API NPREffect& operator= (NPREffect&&) noexcept;
Expand Down Expand Up @@ -821,19 +824,54 @@ namespace DirectX
DIRECTX_TOOLKIT_API void __cdecl SetRimLightingRange(float start, float end);
DIRECTX_TOOLKIT_API void __cdecl DisableRimLighting();

private:
// Private implementation.
protected:
// Internal implementation.
class Impl;

std::unique_ptr<Impl> pImpl;

DIRECTX_TOOLKIT_API NPREffect(
_In_ ID3D12Device* device,
uint32_t effectFlags,
const EffectPipelineStateDescription& pipelineDescription,
Mode nprMode,
bool skinningEnabled);

private:
// Unsupported interface methods.
DIRECTX_TOOLKIT_API void XM_CALLCONV SetAmbientLightColor(FXMVECTOR value) override;
DIRECTX_TOOLKIT_API void __cdecl SetLightEnabled(int whichLight, bool value) override;
DIRECTX_TOOLKIT_API void XM_CALLCONV SetLightDiffuseColor(int whichLight, FXMVECTOR value) override;
DIRECTX_TOOLKIT_API void XM_CALLCONV SetLightSpecularColor(int whichLight, FXMVECTOR value) override;
};

class DIRECTX_TOOLKIT_API SkinnedNPREffect : public NPREffect, public IEffectSkinning
{
public:
SkinnedNPREffect(
_In_ ID3D12Device* device,
uint32_t effectFlags,
const EffectPipelineStateDescription& pipelineDescription,
Mode nprMode = Mode_Cel) :
NPREffect(device, effectFlags, pipelineDescription, nprMode, true)
{}

SkinnedNPREffect(SkinnedNPREffect&&) = default;
SkinnedNPREffect& operator= (SkinnedNPREffect&&) = default;

SkinnedNPREffect(SkinnedNPREffect const&) = delete;
SkinnedNPREffect& operator= (SkinnedNPREffect const&) = delete;

~SkinnedNPREffect() override;

// IEffect methods.
void __cdecl Apply(_In_ ID3D12GraphicsCommandList* commandList) override;

// Animation settings.
void __cdecl SetBoneTransforms(_In_reads_(count) XMMATRIX const* value, size_t count) override;
void __cdecl ResetBoneTransforms() override;
};


//------------------------------------------------------------------------------
// Abstract interface to factory texture resources
Expand Down
Loading
Loading