Skip to content

Commit

Permalink
ra: ensure func ptr initialized
Browse files Browse the repository at this point in the history
test in uwp x64 debug build
  • Loading branch information
wang-bin committed Nov 30, 2024
1 parent 2a4c556 commit 411c9dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/mdk/cpp/RenderAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct D3D12RenderAPI : RenderAPI {

const void* opaque = nullptr; // optional. callback opaque
ID3D12Resource* (*currentRenderTarget)(const void* opaque, UINT* index, UINT* count, D3D12_RESOURCE_STATES* state) = nullptr; // optional. usually for on screen rendering.
ID3D12GraphicsCommandList* (*currentCommandList)(const void* opaque); // optional. will use an internal command list if null. if not null, can be used by on screen rendering
ID3D12GraphicsCommandList* (*currentCommandList)(const void* opaque) = nullptr; // optional. will use an internal command list if null. if not null, can be used by on screen rendering
void* reserved2[1] = {};

/***
Expand Down Expand Up @@ -204,7 +204,7 @@ struct VulkanRenderAPI final : RenderAPI {
NOTE: assume transition is in the same graphics queue family.
\return (render target)image count, e.g. swapchain image count.
*/
int (*renderTargetInfo)(void* opaque, int* w, int* h, VkFormat* format, VkImageLayout* finalLayout); // return count
int (*renderTargetInfo)(void* opaque, int* w, int* h, VkFormat* format, VkImageLayout* finalLayout) = nullptr; // return count
/*!
\brief beginFrame
Optional. Can be null(or not) for offscreen rendering if rt is not null.
Expand Down

0 comments on commit 411c9dc

Please sign in to comment.