Skip to content

Reimplement MaterialManager and MaterialParser #216

@marcinn

Description

@marcinn

Platform

Other (provide info in a description)

Description

May require #215 and #208 to be done before.

  1. MaterialManager i creating Ref<> with memnew
  2. it is incorrectly allocating MaterialParser with memnew
  3. MaterialParser extends RefCounted -> should be implemented as singleton

Minor:

  1. game_dir handling issues -> Reimplement UserSettings in C++ #215
  2. Incorrect (circular) dependency on MaterialManager: MaterialParser::parse(MaterialManager *material_manager, const String &model_path, const String &material_path) -> should be just FileAccess there

This could lead to memory leaks and segfaults.

Reproduction steps

  1. Read the source code
  2. Analyse objects memory lifecycle / Use profiler
  3. Observe strange segfaults and behaviors

Screenshots and attachments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions