VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
makVrv::DtGlTextureOp Class Reference

Intermediate base for GL operations that work with texture objects.

Subclasses implement the no-arg execute() to perform GL work (texture allocation, pixel upload, deletion, etc.).

The execute(DtGpuArenaUploadState&) overload defined on this class is called by DtGpuArena for every op queued in myOneTimeGpuOps. It invokes execute() and then automatically credits textureByteCount() to the arena's upload-statistics state. Subclasses do not need to handle this accounting themselves.

The default textureByteCount() returns 0; allocation and deletion ops do not upload pixel data and therefore do not override it.

Inheritance diagram for makVrv::DtGlTextureOp:
Inheritance graph
[legend]

Public Member Functions

 DtGlTextureOp (const std::string &name, DtDe &de)
 
virtual ~DtGlTextureOp ()
 
virtual unsigned int textureByteCount () const
 
virtual void execute (DtGpuArenaUploadState &uploadState) override
 
- Public Member Functions inherited from makVrv::DtGpuOperation
 DtGpuOperation (const std::string &name, DtDe &de)
 
virtual ~DtGpuOperation ()
 
virtual void execute ()=0
 

Additional Inherited Members

- Protected Attributes inherited from makVrv::DtGpuOperation
DtDe & myDe
 
const std::string myName
 

Constructor & Destructor Documentation

makVrv::DtGlTextureOp::DtGlTextureOp ( const std::string &  name,
DtDe &  de 
)

Construct with a name and engine context.

Parameters
nameLogical name for this operation.
deEngine context (not owned).
virtual makVrv::DtGlTextureOp::~DtGlTextureOp ( )
virtual

Member Function Documentation

virtual unsigned int makVrv::DtGlTextureOp::textureByteCount ( ) const
virtual

Returns the number of texture bytes this op uploads to the GPU. Default returns 0 (allocation ops do not upload data).

Returns
Byte count of texture data uploaded by execute().

Reimplemented in makVrv::DtTextureSubRegionUploadOp, makVrv::DtTextureUploadOp, and makVrv::DtTextureAllocOp.

virtual void makVrv::DtGlTextureOp::execute ( DtGpuArenaUploadState &  uploadState)
overridevirtual

Calls execute(), then credits textureByteCount() to the upload state.

This is the mechanism by which all DtGlTextureOp subclasses participate in statsUploadedTextureMemory accounting without any extra action by the subclass. DtGpuArena calls this overload for every op in myOneTimeGpuOps; the subclass only needs to implement the no-arg execute() and, if it uploads data, textureByteCount().

Parameters
uploadStatePer-frame upload state for the current arena pass.
Note
Subclasses should override the no-arg execute() for GL work and textureByteCount() for byte accounting. Do not override this overload.

Reimplemented from makVrv::DtGpuOperation.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)