Skip to content

Commit

Permalink
macOS build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackoalan committed May 10, 2019
1 parent 4554fc0 commit bf3ac9e
Show file tree
Hide file tree
Showing 11 changed files with 688 additions and 17 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,13 @@ bintoc(CModelShaders.frag.glsl.cpp Shaders/CModelShaders.frag.glsl CMODELSHADERS
bintoc(CModelShaders.common.hlsl.cpp Shaders/CModelShaders.common.hlsl CMODELSHADERS_COMMON_HLSL)
bintoc(CModelShaders.vert.hlsl.cpp Shaders/CModelShaders.vert.hlsl CMODELSHADERS_VERT_HLSL)
bintoc(CModelShaders.frag.hlsl.cpp Shaders/CModelShaders.frag.hlsl CMODELSHADERS_FRAG_HLSL)
bintoc(CModelShaders.common.metal.cpp Shaders/CModelShaders.common.metal CMODELSHADERS_COMMON_METAL)
bintoc(CModelShaders.vert.metal.cpp Shaders/CModelShaders.vert.metal CMODELSHADERS_VERT_METAL)
bintoc(CModelShaders.frag.metal.cpp Shaders/CModelShaders.frag.metal CMODELSHADERS_FRAG_METAL)
add_library(CModelShaders
CModelShaders.common.glsl.cpp CModelShaders.vert.glsl.cpp CModelShaders.frag.glsl.cpp
CModelShaders.common.hlsl.cpp CModelShaders.vert.hlsl.cpp CModelShaders.frag.hlsl.cpp)
CModelShaders.common.hlsl.cpp CModelShaders.vert.hlsl.cpp CModelShaders.frag.hlsl.cpp
CModelShaders.common.metal.cpp CModelShaders.vert.metal.cpp CModelShaders.frag.metal.cpp)

if(NOT TARGET atdna)
# Import native atdna if cross-compiling
Expand Down
1 change: 0 additions & 1 deletion Shaders/CModelShaders.common.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#extension GL_ARB_enhanced_layouts: enable
#extension GL_ARB_shader_image_load_store: enable

struct VertToFrag {
Expand Down
21 changes: 21 additions & 0 deletions Shaders/CModelShaders.common.metal
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <metal_stdlib>
using namespace metal;

struct VertToFrag {
float4 mvpPos [[ position ]];
float4 mvPos;
float4 mvNorm;
float2 lightmapUv;
float2 diffuseUv;
float2 emissiveUv;
float2 specularUv;
float2 extendedSpecularUv;
float2 reflectionUv;
float2 alphaUv;
float2 extUvs0;
float2 extUvs1;
float2 extUvs2;
float2 dynReflectionUvs0;
float2 dynReflectionUvs1;
float dynReflectionAlpha;
};
Loading

0 comments on commit bf3ac9e

Please sign in to comment.