Loading...
Searching...
No Matches
dynamicCubemapTextureObject.h
1//
2// Copyright 2025 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_HD_ST_DYNAMIC_CUBEMAP_TEXTURE_OBJECT_H
8#define PXR_IMAGING_HD_ST_DYNAMIC_CUBEMAP_TEXTURE_OBJECT_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdSt/api.h"
12
13#include "pxr/imaging/hdSt/textureObject.h"
14
15PXR_NAMESPACE_OPEN_SCOPE
16
18
37class HdStDynamicCubemapTextureObject final : public HdStCubemapTextureObject
38{
39public:
40 HDST_API
41 HdStDynamicCubemapTextureObject(
42 const HdStTextureIdentifier &textureId,
43 HdSt_TextureObjectRegistry *textureObjectRegistry);
44
45 HDST_API
46 ~HdStDynamicCubemapTextureObject() override;
47
51 void CreateTexture(const HgiTextureDesc &desc) {
52 _CreateTexture(desc);
53 }
54
57 void GenerateMipmaps()
58 {
59 _GenerateMipmaps();
60 }
61
63 void DestroyTexture() {
64 _DestroyTexture();
65 }
66
70 HDST_API
71 bool IsValid() const override;
72
73protected:
74 HDST_API
75 void _Load() override;
76
77 HDST_API
78 void _Commit() override;
79
80private:
82};
83
84PXR_NAMESPACE_CLOSE_SCOPE
85
86#endif
A base class for cubemap textures.
Allows external clients to specify how a cubemap texture is loaded from, e.g., a file and how it is c...
Class to identify a texture file or a texture within the texture file (e.g., a frame in a movie).
virtual HDST_API void _Load()=0
Load texture to CPU (thread-safe)
virtual HDST_API bool IsValid() const =0
Is texture valid? Only correct after commit phase.
virtual HDST_API void _Commit()=0
Commit texture to GPU (not thread-safe)
Describes the properties needed to create a GPU texture.
Definition: texture.h:91