mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
metal: improve texture initialization.
This commit is contained in:
@@ -78,6 +78,9 @@ Buffer::Buffer(love::graphics::Graphics *gfx, id<MTLDevice> device, const Settin
|
||||
// TODO: minimumTextureBufferAlignmentForPixelFormat
|
||||
|
||||
MTLPixelFormat pixformat = getMTLPixelFormat(getDataMember(0).decl.format);
|
||||
if (pixformat == MTLPixelFormatInvalid)
|
||||
throw love::Exception("Could not create Metal texel buffer: invalid format.");
|
||||
|
||||
size_t width = arraylength * getDataMembers().size();
|
||||
auto desc = [MTLTextureDescriptor textureBufferDescriptorWithPixelFormat:pixformat
|
||||
width:width
|
||||
|
||||
Reference in New Issue
Block a user