GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://cubosengine.org
MIT License
83 stars 36 forks source link

Allow importing plugins from shared libraries #1222

Closed RiscadoA closed 3 months ago

RiscadoA commented 4 months ago

Description

This is the first step towards having a standalone editor application! This PR just adds a new class, DynamicPlugin, which is used to load shared libraries and import plugins from them, in a cross-platform manner.

For example, you could do something like:

DynamicPlugin plugin{};
plugin.load("game.dll"); // would have a different name in linux, probably "game.so" or smth
cubos.plugin(plugin.function());

This isn't meant to be used directly by the user - it will be mostly used internally by the Tesseratos application.

Also included a small commit adding some missing @ingroup tags.

Checklist

github-actions[bot] commented 4 months ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/docs-preview/pr-1222/ on branch gh-pages at 2024-06-10 12:14 UTC

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 40.48%. Comparing base (8a9e086) to head (388251e).

Files Patch % Lines
core/src/ecs/dynamic.cpp 0.00% 21 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1222 +/- ## ========================================== - Coverage 40.51% 40.48% -0.04% ========================================== Files 351 352 +1 Lines 26152 26173 +21 ========================================== Hits 10596 10596 - Misses 15556 15577 +21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

diogomsmiranda commented 4 months ago

Is this supposed to have no test coverage?

RiscadoA commented 4 months ago

Is this supposed to have no test coverage?

Take a look at the checklist, I added a note there. Will probably be easier to cover it on an upper layer.

diogomsmiranda commented 4 months ago

Is this supposed to have no test coverage?

Take a look at the checklist, I added a note there. Will probably be easier to cover it on an upper layer.

Got it!! thanks