mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
iOS: fix build
This commit is contained in:
parent
639ea9fdbc
commit
a452a08458
@ -424,7 +424,7 @@ METAL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||||||
data.mtlpipelineprims = MakePipelineCache(data, "SDL primitives pipeline ", SDL_METAL_VERTEX_SOLID, SDL_METAL_FRAGMENT_SOLID);
|
data.mtlpipelineprims = MakePipelineCache(data, "SDL primitives pipeline ", SDL_METAL_VERTEX_SOLID, SDL_METAL_FRAGMENT_SOLID);
|
||||||
data.mtlpipelinecopy = MakePipelineCache(data, "SDL texture pipeline ", SDL_METAL_VERTEX_COPY, SDL_METAL_FRAGMENT_COPY);
|
data.mtlpipelinecopy = MakePipelineCache(data, "SDL texture pipeline ", SDL_METAL_VERTEX_COPY, SDL_METAL_FRAGMENT_COPY);
|
||||||
|
|
||||||
MTLSamplerDescriptor *samplerdesc = [[[MTLSamplerDescriptor alloc] init] autorelease];
|
MTLSamplerDescriptor *samplerdesc = [[MTLSamplerDescriptor alloc] init];
|
||||||
|
|
||||||
samplerdesc.minFilter = MTLSamplerMinMagFilterNearest;
|
samplerdesc.minFilter = MTLSamplerMinMagFilterNearest;
|
||||||
samplerdesc.magFilter = MTLSamplerMinMagFilterNearest;
|
samplerdesc.magFilter = MTLSamplerMinMagFilterNearest;
|
||||||
@ -434,6 +434,10 @@ METAL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||||||
samplerdesc.magFilter = MTLSamplerMinMagFilterLinear;
|
samplerdesc.magFilter = MTLSamplerMinMagFilterLinear;
|
||||||
data.mtlsamplerlinear = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];
|
data.mtlsamplerlinear = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];
|
||||||
|
|
||||||
|
#if !__has_feature(objc_arc)
|
||||||
|
[samplerdesc release];
|
||||||
|
#endif
|
||||||
|
|
||||||
static const float clearverts[] = { 0, 0, 0, 3, 3, 0 };
|
static const float clearverts[] = { 0, 0, 0, 3, 3, 0 };
|
||||||
data.mtlbufclearverts = [data.mtldevice newBufferWithBytes:clearverts length:sizeof(clearverts) options:MTLResourceCPUCacheModeWriteCombined];
|
data.mtlbufclearverts = [data.mtldevice newBufferWithBytes:clearverts length:sizeof(clearverts) options:MTLResourceCPUCacheModeWriteCombined];
|
||||||
data.mtlbufclearverts.label = @"SDL_RenderClear vertices";
|
data.mtlbufclearverts.label = @"SDL_RenderClear vertices";
|
||||||
|
Loading…
Reference in New Issue
Block a user