From d3e988f5d07ef52786f9cda1b4f4cd20ca7282e9 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 7 Jan 2021 22:15:45 -0800 Subject: Fixed clang/gcc build error --- AssetLoader/interface/GLTFLoader.hpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'AssetLoader/interface') diff --git a/AssetLoader/interface/GLTFLoader.hpp b/AssetLoader/interface/GLTFLoader.hpp index a6a9e0b..cbe97a3 100644 --- a/AssetLoader/interface/GLTFLoader.hpp +++ b/AssetLoader/interface/GLTFLoader.hpp @@ -228,22 +228,24 @@ struct Camera std::string Name; + struct PerspectiveAttribs + { + float AspectRatio; + float YFov; + float ZNear; + float ZFar; + }; + struct OrthographicAttribs + { + float XMag; + float YMag; + float ZNear; + float ZFar; + }; union { - struct PerspectiveCamera - { - float AspectRatio = 0; - float YFov = 0; - float ZFar = 0; - float ZNear = 0; - } Perspective; - struct OrthographicCamera - { - float XMag; - float YMag; - float ZFar; - float ZNear; - } Orthographic; + PerspectiveAttribs Perspective = {}; + OrthographicAttribs Orthographic; }; float4x4 matrix; -- cgit v1.2.3