Mercurial > games > semicongine
diff semicongine/gltf.nim @ 1299:6d0162bfe48a
did: finish mentioned refactoring, no API changes still
author | sam <sam@basx.dev> |
---|---|
date | Tue, 06 Aug 2024 22:57:43 +0700 |
parents | 0369fa1ffbd9 |
children | 385dbd68a947 |
line wrap: on
line diff
--- a/semicongine/gltf.nim Tue Aug 06 17:31:13 2024 +0700 +++ b/semicongine/gltf.nim Tue Aug 06 22:57:43 2024 +0700 @@ -1,3 +1,16 @@ +import std/json +import std/logging +import std/streams +import std/strutils +import std/tables +import std/typetraits + +import ./core +import ./rendering +import ./rendering/vulkan/api +import ./image +import ./resources + type GltfNode* = object children*: seq[int] @@ -149,8 +162,6 @@ if root["images"][imageIndex].hasKey("uri"): raise newException(Exception, "Unsupported feature: Cannot load images from external files") - let imageType = root["images"][imageIndex]["mimeType"].getStr() - # assert imageType == "image/png", "glTF loader currently only supports PNG, but found '" & imageType & "'" let bufferView = root["bufferViews"][root["images"][imageIndex][ "bufferView"].getInt()]