Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/metal-cpp/Metal/MTLCaptureScope.hpp
21082 views
1
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2
//
3
// Metal/MTLCaptureScope.hpp
4
//
5
// Copyright 2020-2024 Apple Inc.
6
//
7
// Licensed under the Apache License, Version 2.0 (the "License");
8
// you may not use this file except in compliance with the License.
9
// You may obtain a copy of the License at
10
//
11
// http://www.apache.org/licenses/LICENSE-2.0
12
//
13
// Unless required by applicable law or agreed to in writing, software
14
// distributed under the License is distributed on an "AS IS" BASIS,
15
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
// See the License for the specific language governing permissions and
17
// limitations under the License.
18
//
19
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
20
21
#pragma once
22
23
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
24
25
#include "MTLDefines.hpp"
26
#include "MTLPrivate.hpp"
27
28
#include "../Foundation/Foundation.hpp"
29
30
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
31
32
namespace MTL
33
{
34
class CaptureScope : public NS::Referencing<CaptureScope>
35
{
36
public:
37
class Device* device() const;
38
39
NS::String* label() const;
40
void setLabel(const NS::String* pLabel);
41
42
class CommandQueue* commandQueue() const;
43
44
void beginScope();
45
void endScope();
46
};
47
}
48
49
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
50
51
_MTL_INLINE MTL::Device* MTL::CaptureScope::device() const
52
{
53
return Object::sendMessage<Device*>(this, _MTL_PRIVATE_SEL(device));
54
}
55
56
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
57
58
_MTL_INLINE NS::String* MTL::CaptureScope::label() const
59
{
60
return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(label));
61
}
62
63
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
64
65
_MTL_INLINE void MTL::CaptureScope::setLabel(const NS::String* pLabel)
66
{
67
Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setLabel_), pLabel);
68
}
69
70
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
71
72
_MTL_INLINE MTL::CommandQueue* MTL::CaptureScope::commandQueue() const
73
{
74
return Object::sendMessage<CommandQueue*>(this, _MTL_PRIVATE_SEL(commandQueue));
75
}
76
77
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
78
79
_MTL_INLINE void MTL::CaptureScope::beginScope()
80
{
81
return Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(beginScope));
82
}
83
84
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
85
86
_MTL_INLINE void MTL::CaptureScope::endScope()
87
{
88
return Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(endScope));
89
}
90
91
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
92
93