HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
contextArena.h
Go to the documentation of this file.
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_CONTEXT_ARENA_H
8
#define PXR_IMAGING_HGIGL_CONTEXT_ARENA_H
9
10
#include "
pxr/pxr.h
"
11
#include "
pxr/imaging/hgi/handle.h
"
12
#include "
pxr/imaging/hgiGL/api.h
"
13
14
#include <ostream>
15
#include <memory>
16
17
PXR_NAMESPACE_OPEN_SCOPE
18
19
struct
HgiGraphicsCmdsDesc
;
20
21
/// \class HgiGLContextArena
22
///
23
/// Represents an arena for the HgiGL instance to manage container object
24
/// resources that are tied to the current GL context (and can't be shared).
25
/// (e.g. framebuffer objects)
26
///
27
/// See notes and relevant API in hgiGL/hgi.h
28
///
29
class
HgiGLContextArena
final
30
{
31
public
:
32
HGIGL_API
33
~HgiGLContextArena
();
34
35
private
:
36
friend
class
HgiGL
;
37
friend
class
HgiGLDevice
;
38
39
HGIGL_API
40
HgiGLContextArena
();
41
42
/// Returns a framebuffer id that matches the descriptor.
43
uint32_t _AcquireFramebuffer(
44
HgiGraphicsCmdsDesc
const
& desc,
45
bool
resolved =
false
);
46
47
void
_GarbageCollect();
48
49
HgiGLContextArena
& operator=(
const
HgiGLContextArena
&) =
delete
;
50
HgiGLContextArena
(
const
HgiGLContextArena
&) =
delete
;
51
52
friend
std::ostream&
operator<<
(
53
std::ostream& out,
54
const
HgiGLContextArena
& arena);
55
56
// Implementation detail.
57
class
_FramebufferCache;
58
std::unique_ptr<_FramebufferCache> _framebufferCache;
59
};
60
61
using
HgiGLContextArenaHandle
=
HgiHandle<HgiGLContextArena>
;
62
63
PXR_NAMESPACE_CLOSE_SCOPE
64
65
#endif
HgiGLContextArena
Definition:
contextArena.h:29
api.h
HgiGLDevice
Definition:
device.h:29
handle.h
HgiGLContextArena::~HgiGLContextArena
HGIGL_API ~HgiGLContextArena()
HgiGL
Definition:
hgi.h:54
pxr.h
HGIGL_API
#define HGIGL_API
Definition:
api.h:23
HgiGraphicsCmdsDesc
Definition:
graphicsCmdsDesc.h:44
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
HgiGLContextArena::operator<<
friend std::ostream & operator<<(std::ostream &out, const HgiGLContextArena &arena)
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
HgiHandle
Definition:
handle.h:32
pxr
imaging
hgiGL
contextArena.h
Generated on Wed Aug 27 2025 03:07:56 for HDK by
1.8.6