![]() |
VR-Forces Developer's Guide
|
Abstract base for any operation that runs on the GPU via DtGpuArena.
A DtGpuOperation encapsulates a discrete unit of GPU work — texture allocation, pixel upload, deletion, compute dispatch, or any other GL call that must be issued on the render-context thread. Concrete subclasses override execute() to carry out the GL work.
Operations are queued through DtGpuArena::addOneTimeGpuOp() for single-shot execution, or DtGpuArena::addPersistentOp() for once-per-frame execution.

Public Member Functions | |
| DtGpuOperation (const std::string &name, DtDe &de) | |
| virtual | ~DtGpuOperation () |
| virtual void | execute ()=0 |
| virtual void | execute (DtGpuArenaUploadState &uploadState) |
Protected Attributes | |
| DtDe & | myDe |
| const std::string | myName |
Private Member Functions | |
| DtGpuOperation ()=delete | |
| DtGpuOperation (const DtGpuOperation &rhs)=delete | |
| DtGpuOperation & | operator= (const DtGpuOperation &rhs)=delete |
| makVrv::DtGpuOperation::DtGpuOperation | ( | const std::string & | name, |
| DtDe & | de | ||
| ) |
Construct a named GPU operation associated with a drawing entity.
| name | Human-readable name used for debugging and profiling. |
| de | Drawing entity that owns or triggered this operation. |
|
virtual |
Destructor.
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
pure virtual |
Execute the GPU operation on the render thread.
Called by DtGpuArena on the GL context thread. Subclasses perform all GL work here (glGenTextures, glTexImage2D, glDeleteTextures, etc.).
Implemented in makVrv::DtMipmapGenerateOp, makVrv::DtTextureSubRegionUploadOp, makVrv::DtGlDeleteOp, makVrv::DtBallisticComputeComponent, makVrv::DtTextureUploadOp, makVrv::DtTextureAllocOp, makVrv::DtOsgWaterRipplesManager::TextureAddressOp, makVrv::DtWeatherFogFroxelGrid::FroxelGenerationOp, makVrv::DtShaderEffectManager::DtTextureAddressOp, and makVrv::DtRainEffectGeneration.
|
virtual |
Execute this op with access to the per-frame upload-budget state. Default forwards to execute() and ignores the state. Override this in subclasses that need to participate in the upload budget or contribute to upload byte statistics.
| uploadState | Per-frame upload state for the current arena pass. |
Reimplemented in makVrv::DtGlTextureOp.
|
protected |
Drawing entity associated with this operation.
|
protected |
Human-readable name for debugging and profiling.