-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blending option to use blend factor from the spine file #163
Conversation
if (draw_descs_out) | ||
{ | ||
SpineDrawDesc desc; | ||
desc.m_VertexStart = batch_vindex_start; | ||
desc.m_BlendMode = (uint32_t) slot->data->blendMode; | ||
desc.m_VertexCount = vindex - batch_vindex_start; | ||
draw_descs_out->Push(desc); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only generate these if necessary
@@ -295,4 +298,30 @@ uint32_t GenerateVertexData(dmArray<SpineVertex>& vertex_buffer, const spSkeleto | |||
return vcount; | |||
} | |||
|
|||
void MergeDrawDescs(const dmArray<SpineDrawDesc>& src, dmArray<SpineDrawDesc>& dst) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could use a single array here, but it's a lot easier to read this function when we have a secondary buffer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editor changes look good!
Added support for Spine blend modes in the gameobject world - meaning, GUI support is not included in this PR.
Fixes #36
Fixes #125