Model caching and instancing for declarative, restarting code #11

Open
opened 2024-09-21 18:01:01 +00:00 by veclavtalica · 0 comments
Collaborator
if (!model_exists("terrain")) {
    declare_model("terrain");
    /* push triangles */
    conclude_model("terrain"); /* must be the same as in declare_model, for sanity checking */
}
unfurl_model("terrain", /* possible options */);

When code reload happens all model caches are invalidated, meaning all models get redeclared.
This is useful for static meshes generated on runtime, such as terrain.

```c if (!model_exists("terrain")) { declare_model("terrain"); /* push triangles */ conclude_model("terrain"); /* must be the same as in declare_model, for sanity checking */ } unfurl_model("terrain", /* possible options */); ``` When code reload happens all model caches are invalidated, meaning all models get redeclared. This is useful for static meshes generated on runtime, such as terrain.
veclavtalica added the
feature
label 2024-09-21 18:01:01 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: wanp/townengine#11
No description provided.