Skip to content

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

Open
DynamicField wants to merge 1 commit intonovelrt:mainfrom
DynamicField:feature/ecs-graphics-c-api
Open

Implement Ecs::Graphics APIs and Component Ids for the C API#574
DynamicField wants to merge 1 commit intonovelrt:mainfrom
DynamicField:feature/ecs-graphics-c-api

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