Skip to content

Expose contra-variant interface in sub-classes.#91

Merged
crud89 merged 3 commits intomainfrom
interface-improvements
Mar 28, 2023
Merged

Expose contra-variant interface in sub-classes.#91
crud89 merged 3 commits intomainfrom
interface-improvements

Conversation

@crud89
Copy link
Copy Markdown
Owner

@crud89 crud89 commented Mar 28, 2023

Describe the pull request

Currently, if a class holds an interface pointer or reference to any object, it cannot use it to call contra-variant methods in sub-classes. For example, a ICommandBuffer pointer cannot be submitted to a VulkanCommandQueue, even if the instance actually is a VulkanCommandBuffer and the ICommandQueue interface exposes a proper overload, that performs a dynamic up-cast. This PR addresses this issue by importing contra-variant overloads into sub-classes, which removes the manual casting involved.

@crud89 crud89 added Priority: Low A low priority issue. Type: Requirement Vulkan πŸŒ‹ The issue involves the Vulkan backend. DX12 ❎ The issue involves the DX12 backend. labels Mar 28, 2023
@crud89 crud89 added this to the Alpha #04 milestone Mar 28, 2023
@crud89 crud89 self-assigned this Mar 28, 2023
@crud89 crud89 marked this pull request as ready for review March 28, 2023 14:32
@crud89 crud89 merged commit ca8a1fe into main Mar 28, 2023
@crud89 crud89 deleted the interface-improvements branch March 29, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DX12 ❎ The issue involves the DX12 backend. Priority: Low A low priority issue. Vulkan πŸŒ‹ The issue involves the Vulkan backend.

Projects

Status: v0.4.1

Development

Successfully merging this pull request may close these issues.

1 participant