Skip to content
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

"Immediate Mode" render api #20

Closed
cart opened this issue Jun 8, 2020 · 1 comment
Closed

"Immediate Mode" render api #20

cart opened this issue Jun 8, 2020 · 1 comment

Comments

@cart
Copy link
Member

cart commented Jun 8, 2020

Certain types of rendering are made much easier by an immediate mode api (canvases, text, etc).

I also think there is potential here to make the "immediate mode" api the foundation for the following:

  • The existing Renderable abstraction
  • A "canvas" style api
  • Batching
  • Text
  • IMGui

I like the idea of having a core set of "batchable" draw calls and building Drawable abstractions on top. A breadth of engines use this approach and it works quite well.

Draw calls would be scoped to entities in some ImmediateMode or DrawCall component. Then during render graph execution a draw call list would be generated based on some draw order algorithm (ex: z-sort). State changes could then be reduced as much as possible according to the draw call ordering.

This would probably remove the need for the existing DrawTarget abstraction. Instead, the current graph nodes would be fully responsible for producing an ordered list of draw calls from the input World.

@cart
Copy link
Member Author

cart commented Jun 10, 2020

Fixed by 3d07fbd

@cart cart closed this as completed Jun 10, 2020
superdump referenced this issue in superdump/bevy Jul 8, 2021
* Fix writing less than the full capacity to the staging buffer

* Add missing TrackedRenderPass::draw command
cart pushed a commit that referenced this issue Jul 24, 2021
* Fix writing less than the full capacity to the staging buffer

* Add missing TrackedRenderPass::draw command
cart pushed a commit that referenced this issue Jul 24, 2021
* Fix writing less than the full capacity to the staging buffer

* Add missing TrackedRenderPass::draw command
pcwalton pushed a commit to pcwalton/bevy that referenced this issue Aug 30, 2021
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

No branches or pull requests

1 participant