10#include <Utility/Concurrent/TAtomicQuasiQueue.h>
11#include <Utility/TFunction.h>
12#include <Common/primitive_type.h>
80 std::string shaderSource)
override;
87 std::size_t numVertices,
92 std::size_t numIndices,
97 TSpanView<VertexStorageHandle> vertexStorages,
103 TSpanView<std::byte> pixelData,
121 template<
typename OpenglObjType, CWeakHandle HandleType>
128 void deleteAllObjects();
129 void deleteAllTextures();
132 TAtomicQuasiQueue<OpenglObjectCreator> m_creationQueue;
133 TAtomicQuasiQueue<OpenglObjectManipulator> m_manipulationQueue;
134 TAtomicQuasiQueue<OpenglObjectDeleter> m_deletionQueue;
135 std::vector<OpenglObjectDeleter> m_failedDeleterCache;
Definition GHIThreadUpdateContext.h:11
Item pool for simple types. This item pool is designed to minimize execution time and memory footprin...
Definition TTrivialItemPool.h:50
Definition ghi_infos.h:124
Manages the creation and deletion of graphics-related resource objects. All create<XXX>() and delete<...
Definition GraphicsObjectManager.h:26
Definition OpenglContext.h:14
Definition OpenglObjectManager.h:67
TextureHandle createTexture(const TextureDesc &desc) override
Definition OpenglObjectManager.cpp:30
OpenglObjectManager(OpenglContext &ctx)
Definition OpenglObjectManager.cpp:14
void removeShader(ShaderHandle handle) override
Definition OpenglObjectManager.cpp:146
void beginFrameUpdate(const GHIThreadUpdateContext &ctx) override
Called by GHI thread when a frame begins.
Definition OpenglObjectManager.cpp:217
void removeIndexStorage(IndexStorageHandle handle) override
Definition OpenglObjectManager.cpp:155
VertexStorageHandle createVertexStorage(std::size_t numVertices, const VertexGroupFormatInfo &format, EStorageUsage usage) override
Definition OpenglObjectManager.cpp:69
void removeShaderProgram(ShaderProgramHandle handle) override
Definition OpenglObjectManager.cpp:149
MeshHandle createMesh(TSpanView< VertexStorageHandle > vertexStorages, const MeshVertexLayoutInfo &layout, IndexStorageHandle indexStorage) override
Definition OpenglObjectManager.cpp:85
void removeVertexStorage(VertexStorageHandle handle) override
Definition OpenglObjectManager.cpp:152
void removeMesh(MeshHandle handle) override
Definition OpenglObjectManager.cpp:158
void endFrameUpdate(const GHIThreadUpdateContext &ctx) override
Called by GHI thread when a frame ends.
Definition OpenglObjectManager.cpp:235
ShaderProgramHandle createShaderProgram(std::string name, const ShaderSetInfo &shaders) override
Definition OpenglObjectManager.cpp:62
void removeFramebuffer(FramebufferHandle handle) override
Definition OpenglObjectManager.cpp:143
void onGHIUnload() override
Called by GHI thread before GHI is unloaded.
Definition OpenglObjectManager.cpp:186
FramebufferHandle createFramebuffer(const FramebufferDesc &desc) override
Definition OpenglObjectManager.cpp:48
void uploadPixelData(TextureHandle handle, TSpanView< std::byte > pixelData, EPixelFormat pixelFormat, EPixelComponent pixelComponent) override
Definition OpenglObjectManager.cpp:93
IndexStorageHandle createIndexStorage(std::size_t numIndices, EStorageElement indexType, EStorageUsage usage) override
Definition OpenglObjectManager.cpp:77
ShaderHandle createShader(std::string name, EShadingStage shadingStage, std::string shaderSource) override
Definition OpenglObjectManager.cpp:54
void removeTexture(TextureHandle handle) override
Definition OpenglObjectManager.cpp:118
~OpenglObjectManager() override
TPool< OpenglTexture, TextureHandle > textures
Definition OpenglObjectManager.h:124
TPool< OpenglFramebuffer, FramebufferHandle > framebuffers
Definition OpenglObjectManager.h:125
void onGHILoad() override
Called by GHI thread after GHI is loaded.
Definition OpenglObjectManager.cpp:183
Definition ghi_infos.h:46
Definition ghi_infos.h:101
Definition PlatformDisplay.h:13
EPixelFormat
Definition ghi_enums.h:31
EStorageElement
Definition ghi_enums.h:70
EShadingStage
Definition ghi_enums.h:104
EStorageUsage
Definition ghi_enums.h:86
EPixelComponent
Definition ghi_enums.h:42
Definition OpenglObjectManager.h:22
TFunction< void(), 64 > CreateOperation
Definition OpenglObjectManager.h:23
CreateOperation op
Definition OpenglObjectManager.h:25
void create() const
Run the create operation.
Definition OpenglObjectManager.h:29
Definition OpenglObjectManager.h:50
TFunction< bool(), 32 > DeleteOperation
Definition OpenglObjectManager.h:51
bool tryDelete() const
Run the delete operation.
Definition OpenglObjectManager.h:60
DeleteOperation op
Definition OpenglObjectManager.h:53
uint32 numRetries
Definition OpenglObjectManager.h:54
Definition OpenglObjectManager.h:36
void manipulate() const
Run the manipulate operation.
Definition OpenglObjectManager.h:43
TFunction< void(), 64 > ManipulateOperation
Definition OpenglObjectManager.h:37
ManipulateOperation op
Definition OpenglObjectManager.h:39