mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
metal: Fix compilation when using older Apple SDKs (bug #4828).
This commit is contained in:
parent
6be83e6141
commit
216f5b98ac
@ -271,7 +271,7 @@ MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache,
|
|||||||
case SDL_METAL_VERTEX_SOLID:
|
case SDL_METAL_VERTEX_SOLID:
|
||||||
/* position (float2) */
|
/* position (float2) */
|
||||||
vertdesc.layouts[0].stride = sizeof(float) * 2;
|
vertdesc.layouts[0].stride = sizeof(float) * 2;
|
||||||
vertdesc.layouts[0].stepFunction = MTLStepFunctionPerVertex;
|
vertdesc.layouts[0].stepFunction = MTLVertexStepFunctionPerVertex;
|
||||||
|
|
||||||
vertdesc.attributes[0].format = MTLVertexFormatFloat2;
|
vertdesc.attributes[0].format = MTLVertexFormatFloat2;
|
||||||
vertdesc.attributes[0].offset = 0;
|
vertdesc.attributes[0].offset = 0;
|
||||||
@ -280,7 +280,7 @@ MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache,
|
|||||||
case SDL_METAL_VERTEX_COPY:
|
case SDL_METAL_VERTEX_COPY:
|
||||||
/* position (float2), texcoord (float2) */
|
/* position (float2), texcoord (float2) */
|
||||||
vertdesc.layouts[0].stride = sizeof(float) * 4;
|
vertdesc.layouts[0].stride = sizeof(float) * 4;
|
||||||
vertdesc.layouts[0].stepFunction = MTLStepFunctionPerVertex;
|
vertdesc.layouts[0].stepFunction = MTLVertexStepFunctionPerVertex;
|
||||||
|
|
||||||
vertdesc.attributes[0].format = MTLVertexFormatFloat2;
|
vertdesc.attributes[0].format = MTLVertexFormatFloat2;
|
||||||
vertdesc.attributes[0].offset = 0;
|
vertdesc.attributes[0].offset = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user