do surface copy properly

This commit is contained in:
Samuliak 2024-08-28 13:43:06 +02:00
parent 1b44269d70
commit be76dadb90
4 changed files with 13 additions and 9 deletions

View file

@ -10,6 +10,7 @@ MetalLayerHandle::MetalLayerHandle(MTL::Device* device, const Vector2i& size)
m_layer = (CA::MetalLayer*)CreateMetalLayer(windowInfo.handle, m_layerScaleX, m_layerScaleY);
m_layer->setDevice(device);
m_layer->setDrawableSize(CGSize{(float)size.x * m_layerScaleX, (float)size.y * m_layerScaleY});
m_layer->setFramebufferOnly(true);
}
MetalLayerHandle::~MetalLayerHandle()