All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
graphicsEncoder.h
1 //
2 // Copyright 2019 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef HGIGL_GRAPHICS_ENCODER_H
25 #define HGIGL_GRAPHICS_ENCODER_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/base/gf/vec4i.h"
29 #include "pxr/imaging/hgiGL/api.h"
30 #include "pxr/imaging/hgi/graphicsEncoder.h"
31 #include <cstdint>
32 
33 PXR_NAMESPACE_OPEN_SCOPE
34 
37 
38 
44 {
45 public:
46  HGIGL_API
48 
49  HGIGL_API
50  virtual ~HgiGLGraphicsEncoder();
51 
52  HGIGL_API
53  void EndEncoding() override;
54 
55  HGIGL_API
56  void SetViewport(GfVec4i const& vp) override;
57 
58  HGIGL_API
59  void PushDebugGroup(const char* label) override;
60 
61  HGIGL_API
62  void PopDebugGroup() override;
63 
64 private:
65  HgiGLGraphicsEncoder() = delete;
66  HgiGLGraphicsEncoder & operator=(const HgiGLGraphicsEncoder&) = delete;
67  HgiGLGraphicsEncoder(const HgiGLGraphicsEncoder&) = delete;
68 
69  // Encoder is used only one frame so storing multi-frame state on encoder
70  // will not survive. Store onto HgiGLImmediateCommandBuffer instead.
71 };
72 
73 PXR_NAMESPACE_CLOSE_SCOPE
74 
75 #endif
Basic type for a vector of 4 int components.
Definition: vec4i.h:61
HGIGL_API void SetViewport(GfVec4i const &vp) override
Set viewport [left, BOTTOM, width, height] - OpenGL coords.
OpenGL implementation of HgiGraphicsEncoder.
HGIGL_API void PopDebugGroup() override
Pop the lastest debug marker off encoder.
A graphics API independent abstraction of graphics commands.
OpenGL implementation of HgiImmediateCommandBuffer.
HGIGL_API void PushDebugGroup(const char *label) override
Push a debug marker onto the encoder.
Describes the properties to begin a HgiGraphicsEncoder.
HGIGL_API void EndEncoding() override
Finish recording of commands. No further commands can be recorded.