Loading...
Searching...
No Matches
device.h
1
//
2
// Copyright 2020 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
#ifndef PXR_IMAGING_HGIGL_DEVICE_H
8
#define PXR_IMAGING_HGIGL_DEVICE_H
9
10
#include "
pxr/pxr.h
"
11
#include "pxr/imaging/hgi/graphicsCmdsDesc.h"
12
#include "pxr/imaging/hgiGL/api.h"
13
#include "pxr/imaging/hgiGL/contextArena.h"
14
#include "pxr/imaging/hgiGL/hgi.h"
15
16
#include <fstream>
17
#include <ostream>
18
19
PXR_NAMESPACE_OPEN_SCOPE
20
21
class
HgiGraphicsCmdDesc;
22
29
class
HgiGLDevice
final {
30
public
:
31
HGIGL_API
32
HgiGLDevice
();
33
34
HGIGL_API
35
~HgiGLDevice
();
36
38
HGIGL_API
39
void
SubmitOps
(HgiGLOpsVector
const
& ops);
40
44
HGIGL_API
45
void
SetCurrentArena
(
HgiGLContextArenaHandle
const
& arenaHandle);
46
48
HGIGL_API
49
uint32_t
AcquireFramebuffer
(
50
HgiGraphicsCmdsDesc
const
& desc,
51
bool
resolved =
false
);
52
54
HGIGL_API
55
void
GarbageCollect
();
56
57
private
:
58
HgiGLContextArena
const
* _GetArena()
const
;
59
HgiGLContextArena
* _GetArena();
60
61
HgiGLDevice
& operator=(
const
HgiGLDevice
&) =
delete
;
62
HgiGLDevice
(
const
HgiGLDevice
&) =
delete
;
63
64
friend
std::ofstream& operator<<(
65
std::ofstream& out,
66
const
HgiGLDevice
& dev);
67
68
// The default arena is used in the absence of a user provided arena.
69
HgiGLContextArena
_defaultArena;
70
HgiGLContextArena
*_activeArena;
71
};
72
73
74
PXR_NAMESPACE_CLOSE_SCOPE
75
76
#endif
HgiGLContextArena
Represents an arena for the HgiGL instance to manage container object resources that are tied to the ...
Definition:
contextArena.h:30
HgiGLDevice
OpenGL implementation of GPU device.
Definition:
device.h:29
HgiGLDevice::SubmitOps
HGIGL_API void SubmitOps(HgiGLOpsVector const &ops)
Execute the provided functions / ops. This will emit the GL calls.
HgiGLDevice::GarbageCollect
HGIGL_API void GarbageCollect()
Garbage collect resources in the active arena.
HgiGLDevice::AcquireFramebuffer
HGIGL_API uint32_t AcquireFramebuffer(HgiGraphicsCmdsDesc const &desc, bool resolved=false)
Returns a framebuffer object id that is managed by the active arena.
HgiGLDevice::SetCurrentArena
HGIGL_API void SetCurrentArena(HgiGLContextArenaHandle const &arenaHandle)
Sets the active arena to use when submitting commands.
HgiHandle
Handle that contains a hgi object and unique id.
Definition:
handle.h:33
pxr.h
HgiGraphicsCmdsDesc
Describes the properties to begin a HgiGraphicsCmds.
Definition:
graphicsCmdsDesc.h:45
pxr
imaging
hgiGL
device.h
© Copyright 2025, Pixar Animation Studios. |
Terms of Use
| Generated on Tue Nov 18 2025 10:36:08 by
1.9.6