Skip to content

Conversation

@jambuttenshaw
Copy link
Contributor

Allows extension of the donut::render::DrawItem structure via a user data void*.

My use case for this is I have a mesh instance with multiple representations, and I want to select the representation I use in the draw strategy. The render pass can then recover the desired representation from the draw item keeping the scene and renderer decoupled. However, without DrawItem being polymorphic, there is no safe way to extend DrawItem in my code via inheritance.

I saw packaging user data inside a void* to be a more general purpose solution and imagine it could be generally useful to implementations of more complex render passes or scene content that still want to make use of the draw strategy interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant