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

Separate model loading from reference renderer #2

Merged
merged 5 commits into from
Apr 19, 2024
Merged

Separate model loading from reference renderer #2

merged 5 commits into from
Apr 19, 2024

Conversation

hoffstadt
Copy link
Member

@hoffstadt hoffstadt commented Apr 17, 2024

Purpose

The purpose of this pull request is to separate model loading from the reference renderer. This was accomplished by creating a new extension.

Other

This PR also makes memory tracking safe.

API

//-----------------------------------------------------------------------------
// [SECTION] public api structs
//-----------------------------------------------------------------------------

typedef struct _plModelLoaderI
{
    bool (*load_stl) (plComponentLibrary* ptLibrary, const char* pcPath, plVec4 tColor, const plMat4* ptTransform, plModelLoaderData* ptDataOut);
    bool (*load_gltf)(plComponentLibrary* ptLibrary, const char* pcPath, const plMat4* ptTransform, plModelLoaderData* ptDataOut);

    void (*free_data)(plModelLoaderData*);
} plModelLoaderI;

//-----------------------------------------------------------------------------
// [SECTION] structs
//-----------------------------------------------------------------------------

typedef struct _plModelLoaderData
{
    uint32_t  uOpaqueCount;
    plEntity* atOpaqueObjects;
    uint32_t  uTransparentCount;
    plEntity* atTransparentObjects;
} plModelLoaderData;

@hoffstadt hoffstadt added platform: All related to all platforms priority: Normal normal priority state: Approved approved extension: Renderer related to reference renderer extension type: Feature related to a new feature type: Improvement related to an improvement labels Apr 17, 2024
@hoffstadt hoffstadt self-assigned this Apr 17, 2024
@hoffstadt hoffstadt added extension: Model Loader related to model loader extension and removed extension: Renderer related to reference renderer extension labels Apr 17, 2024
@hoffstadt hoffstadt merged commit 7951240 into master Apr 19, 2024
14 checks passed
@hoffstadt hoffstadt deleted the dev branch April 19, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: Model Loader related to model loader extension platform: All related to all platforms priority: Normal normal priority state: Approved approved type: Feature related to a new feature type: Improvement related to an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant