26 lines
687 B
C
26 lines
687 B
C
/*
|
||
See LICENSE folder for this sample’s licensing information.
|
||
|
||
Abstract:
|
||
Header containing types and enum constants shared between Metal shaders and C/ObjC source
|
||
*/
|
||
|
||
#ifndef AAPLShaderTypes_h
|
||
#define AAPLShaderTypes_h
|
||
|
||
#undef clamp
|
||
#include <simd/simd.h>
|
||
#define clamp(a,x,b) clamp_((a),(x),(b))
|
||
|
||
// This structure defines the layout of vertices sent to the vertex
|
||
// shader. This header is shared between the .metal shader and C code, to guarantee that
|
||
// the layout of the vertex array in the C code matches the layout that the .metal
|
||
// vertex shader expects.
|
||
typedef struct
|
||
{
|
||
vector_float2 position;
|
||
vector_float4 color;
|
||
} AAPLVertex;
|
||
|
||
#endif /* AAPLShaderTypes_h */
|