22 {
24 if (!source_mtl) {
25 return false;
26 }
27
29 if (!destination_mtl) {
30 return false;
31 }
32
33 auto source_origin_mtl =
35 auto source_size_mtl =
37 auto destination_origin_mtl =
39
40 [
encoder copyFromTexture:source_mtl
41 sourceSlice:0
42 sourceLevel:0
43 sourceOrigin:source_origin_mtl
44 sourceSize:source_size_mtl
45 toTexture:destination_mtl
46 destinationSlice:0
47 destinationLevel:0
48 destinationOrigin:destination_origin_mtl];
49
50 return true;
51};
static TextureMTL & Cast(Texture &base)
id< MTLTexture > GetMTLTexture() const
IPoint destination_origin
constexpr Type GetY() const
Returns the Y coordinate of the upper left corner, equivalent to |GetOrigin().y|.
constexpr Type GetHeight() const
Returns the height of the rectangle, equivalent to |GetSize().height|.
constexpr Type GetX() const
Returns the X coordinate of the upper left corner, equivalent to |GetOrigin().x|.
constexpr Type GetWidth() const
Returns the width of the rectangle, equivalent to |GetSize().width|.