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 | Protected Attributes | Static Protected Attributes
makVrv::DtIndirectGlTextureObject Class Reference

Encapsulate an OpenGL texture object that is created/used in indirect rendering.

The life time of these is managed by DtIndirectGlTextureObjectManager/

See DtIndirectGlTextureObjectManager for detailed documentation of this c;lass

Public Member Functions

 DtIndirectGlTextureObject (DtDe &de, unsigned int textureId)
 
virtual ~DtIndirectGlTextureObject ()
 
 DtIndirectGlTextureObject ()=delete
 
 DtIndirectGlTextureObject (DtIndirectGlTextureObject &rhs)=delete
 
DtIndirectGlTextureObjectoperator= (DtIndirectGlTextureObject &rhs)=delete
 
virtual bool isResident (const void *glContext) const
 
virtual void makeResident ()
 
virtual void makeNonResident ()
 
virtual int numOfContextsResidentIn (void) const
 
virtual uint64_t textureAddress (void) const
 
virtual void addGpuCullingUser (const DtGpuCulling *culling)
 
virtual void removeGpuCullingUser (const DtGpuCulling *culling)
 
virtual unsigned int textureId (void) const
 
virtual int incrementNumUsers ()
 
virtual int decrementNumUsers ()
 

Protected Attributes

unsigned int myGlTextureId
 
std::uint64_t myTextureAddress
 
std::string myTextureName
 
std::unordered_set< const void * > myContextsInWhichResident
 
std::unordered_set< const
DtGpuCulling * > 
myUsers
 
boost::mutex myUserMutex
 
DtIndirectGlTextureObjectManagermyParent
 
DtIndirectGlTextureObjectTrackermyIndirectGlTextureObjectTracker
 
DtIndirectLogmyIndirectLog
 
DtDemyDe
 
std::atomic< intmyNumUsers
 

Static Protected Attributes

static std::thread::id theMainThreadId
 

Constructor & Destructor Documentation

makVrv::DtIndirectGlTextureObject::DtIndirectGlTextureObject ( DtDe de,
unsigned int  textureId 
)

constructor

virtual makVrv::DtIndirectGlTextureObject::~DtIndirectGlTextureObject ( )
virtual

destructor

makVrv::DtIndirectGlTextureObject::DtIndirectGlTextureObject ( )
delete

not allowed

makVrv::DtIndirectGlTextureObject::DtIndirectGlTextureObject ( DtIndirectGlTextureObject rhs)
delete

not allowed

Member Function Documentation

DtIndirectGlTextureObject& makVrv::DtIndirectGlTextureObject::operator= ( DtIndirectGlTextureObject rhs)
delete

not allowed

virtual bool makVrv::DtIndirectGlTextureObject::isResident ( const void *  glContext) const
virtual

Whether resident in this context. This function does not need a valid gl context while calling. Just the gc pointer corresponding to the passed in gl context.

virtual void makVrv::DtIndirectGlTextureObject::makeResident ( )
virtual

This function needs a valid gl context during the call.

virtual void makVrv::DtIndirectGlTextureObject::makeNonResident ( )
virtual

This function needs a valid gl context during the call.

virtual int makVrv::DtIndirectGlTextureObject::numOfContextsResidentIn ( void  ) const
virtual

how many contexts is this resident in? This function does not need a valid gl context while calling.

virtual uint64_t makVrv::DtIndirectGlTextureObject::textureAddress ( void  ) const
virtual

This does not change for the lifetime of the DtIndirectGlTextureObject (gl texture object) This address is made resident/non-resident externally in the DtIndirectTextureResidencyManager and the first time the DtIndirectGlTexture is created in DtIndirectGlTextureObjectManager.

virtual void makVrv::DtIndirectGlTextureObject::addGpuCullingUser ( const DtGpuCulling culling)
virtual

Currently, DtIndirectGeometry(and in reality DtGpuCulling inside of it) are the only 'users' of bindless textures. Note: In reality however we are using bindless textures in a roundabout fashion, elsewhere. See for example: https://jira.mak.com/browse/VRV-4316 So, this comment needs to be updated and the function extended/abstracted/refined when we do that properly.

virtual void makVrv::DtIndirectGlTextureObject::removeGpuCullingUser ( const DtGpuCulling culling)
virtual

Currently, DtIndirectGeometry(and in reality DtGpuCulling inside of it) are the only 'users' of bindless textures. Note: In reality however we are using bindless textures in a roundabout fashion, elsewhere. See for example: https://jira.mak.com/browse/VRV-4316 So, this comment needs to be updated and the function extended/abstracted/refined when we do that properly.

virtual unsigned int makVrv::DtIndirectGlTextureObject::textureId ( void  ) const
virtual

the actual gl texture object id

virtual int makVrv::DtIndirectGlTextureObject::incrementNumUsers ( )
virtual

ref counting tracking for when DtIndirectGlTextureObject is used directly

virtual int makVrv::DtIndirectGlTextureObject::decrementNumUsers ( )
virtual

ref counting tracking for when DtIndirectGlTextureObject is used directly

Member Data Documentation

unsigned int makVrv::DtIndirectGlTextureObject::myGlTextureId
protected

the gl texture id

std::uint64_t makVrv::DtIndirectGlTextureObject::myTextureAddress
protected
std::string makVrv::DtIndirectGlTextureObject::myTextureName
protected
std::unordered_set<const void*> makVrv::DtIndirectGlTextureObject::myContextsInWhichResident
protected
std::unordered_set<const DtGpuCulling*> makVrv::DtIndirectGlTextureObject::myUsers
protected
boost::mutex makVrv::DtIndirectGlTextureObject::myUserMutex
protected
DtIndirectGlTextureObjectManager& makVrv::DtIndirectGlTextureObject::myParent
protected
DtIndirectGlTextureObjectTracker& makVrv::DtIndirectGlTextureObject::myIndirectGlTextureObjectTracker
protected
DtIndirectLog& makVrv::DtIndirectGlTextureObject::myIndirectLog
protected
DtDe& makVrv::DtIndirectGlTextureObject::myDe
protected
std::atomic<int> makVrv::DtIndirectGlTextureObject::myNumUsers
protected
std::thread::id makVrv::DtIndirectGlTextureObject::theMainThreadId
staticprotected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)