You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something I have enjoyed in other game frameworks is the ability to debug ideas by first using shape primitives such as circles, rectangles, lines, etc, using some sort of shape renderer. Off the top of my head LibGDX, as well as Love2D support this feature.
I propose a similar API for prototyping with Coffee.
A ShapeBatch type and possibly rename Batch to SpriteBatch to avoid confusion.
Where each method returns self, or ShapeBatch for method chaining if desired.
The implementation would likely require a separate render pass, shader set, and a different per-vertex definition with just position and color. Fill vs Line drawing per shape would need to change the primitive type from lines to triangles and generate slightly different geometry.
Of course, this is just a rough idea and can use much improvement and could be improved by debate. Let me know what you think of the idea.
The text was updated successfully, but these errors were encountered:
The implementation would likely require a separate render pass, shader set, and a different per-vertex definition with just position and color.
Yes, the idea is to create another pipeline module inside each graphics backend (and probably rename the current one to quad_pipeline or something).
Fill vs Line drawing per shape would need to change the primitive type from lines to triangles and generate slightly different geometry.
Hmm... Interesting. I guess that changing the primitive type mid-batch would need an additional draw call.
It looks like lyon always produces triangles even when tesellating shape strokes. We could always render triangles as a first iteration.
I am currently working on something cool for Coffee, I will open a PR soon... 🤓 After that, I had plans to tackle this. Once we are able to render meshes, then we can try to tackle #17.
PS: I wrote some thoughts about this in #4, but do not worry about duplicated issues. I am totally fine with it, any discussion is welcome. Wherever it is. It does not matter.
Something I have enjoyed in other game frameworks is the ability to debug ideas by first using shape primitives such as circles, rectangles, lines, etc, using some sort of shape renderer. Off the top of my head LibGDX, as well as Love2D support this feature.
I propose a similar API for prototyping with Coffee.
A
ShapeBatch
type and possibly renameBatch
toSpriteBatch
to avoid confusion.Some possible methods:
Where each method returns
self
, orShapeBatch
for method chaining if desired.The implementation would likely require a separate render pass, shader set, and a different per-vertex definition with just position and color. Fill vs Line drawing per shape would need to change the primitive type from lines to triangles and generate slightly different geometry.
Of course, this is just a rough idea and can use much improvement and could be improved by debate. Let me know what you think of the idea.
The text was updated successfully, but these errors were encountered: