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

Implement Ecs::Graphics APIs and Component Ids for the C API #574

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DynamicField
Copy link
Contributor

Rendering has always been a missing part in the C API. This PR fixes this and adds all methods required to get sprites on the screen.

This PR implements:

  • A FutureResult equivalent for the C API
  • Methods for the DefaultRenderingSystem, related to textures and entities
  • TextureInfo support
  • Methods to retrieve component ids of all built-in components
  • C struct equivalents for all built-in components

This PR fixes:

Concerns:

  • Is the new LifetimeExtender.h going to work well since we have global static stuff going on?
  • Should we make it clear for the user that TextureInfo (among other objects) aren't really "created" and "destroyed" per se, but rather tracked using LifetimeExtender.h with a ConcurrentSharedPtr?
  • Is error handling good enough in NrtFutureResult and NrtTextureInfo?
  • It looks like Audio already got some components-related code going on. In the future, how should we harmonise the C API for manipulating components?

Stuff to do:

  • Write some tests (which parts to test?)
  • Review the code

@DynamicField DynamicField marked this pull request as ready for review June 16, 2023 09:10
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