Interrupt / delve-framework

Delve is a framework for writing Games in Zig and Lua. For those who value being cross platform and keeping things simple.
MIT License
203 stars 11 forks source link

Quake MDL Support #39

Closed joshuaskelly closed 2 months ago

joshuaskelly commented 2 months ago

Summary

Add support for loading a Quake MDL file as a struct of delve-framework native types (meshes and textures).

I'd appreciate an audit/assistance of my memory management because I've mostly ignored it up to now.

Usage

var mdl = try delve.utils.quakemdl.open(allocator, "path/to/my.mdl");

Review Guide

src/examples/quakemdl.zig

Heavily based off of meshbuilder example. Illustrated how to grab a mesh from an MDL struct.

src/framework/utils/quakemdl.zig

Implementation file. User facing structs are public and at top of file. Primary way to interact with module is the open() function.