Skip to content

Adds .Merge() method to combine model structs#12

Open
cicadian wants to merge 4 commits intoJujuAdams:masterfrom
cicadian:master
Open

Adds .Merge() method to combine model structs#12
cicadian wants to merge 4 commits intoJujuAdams:masterfrom
cicadian:master

Conversation

@cicadian
Copy link
Copy Markdown

NOTE: vertex_update_buffer_from_vertex(); is not available in LTS 2022. This functionality is commented out and must be manually turned back on and the project must be run in a more recent runtime to observe the feature being added.
#DotobjClassMesh LINE 120

Usage: Dotobj model class method .Merge(_model) where _model is another instantiated Dotobj model class
It calls subsequently added Merge methods for the groups and meshes of a model.
#DotobjClassModel LINE 65
#DotobjClassGroup LINE 58
#DotobjClassMesh LINE 93

Functionality:

  1. The calling model class iterates through every mesh until it finds the first defined vertex buffer
  2. The calling mesh is appended with all valid vertex buffers found in the supplied model class using vertex_update_buffer_from_vertex();
  3. The functions return true to prevent duplicate mergers from occurring

Supplied in this project are 3 models (model_a, model_b, model_c) with different materials which have the appearance of the letters "A" "B" "C"
additional models, defined as model_ab, model_ba and model_abc are created and then merged with other models
Each are rendered in the scene individually

@JujuAdams JujuAdams changed the title adds capability of merging a model struct into another Adds .Merge() method to combine model structs Oct 29, 2024
@JujuAdams
Copy link
Copy Markdown
Owner

Thank you for your PR. As you note, this PR would only be compatible with a newer version of GameMaker than the one dotobj currently supports. I'll will consider how I want to proceed and, at a future time, I anticipate accepting this PR.

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.

2 participants