Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::VirtualAddress Class Reference

#include <Allocator.h>

Public Member Functions

 VirtualAddress (uintptr_t ptr)
 
bool IsValid () const
 
bool IsNull () const
 

Static Public Member Functions

static VirtualAddress CreateNull ()
 
static VirtualAddress CreateZero ()
 Creates a valid address with a zero offset.
 
static VirtualAddress CreateFromPointer (void *ptr)
 Creates an address from a pointer.
 
static VirtualAddress CreateFromOffset (uint64_t offset)
 Creates an address from an offset from a base pointer.
 

Public Attributes

uintptr_t m_ptr
 

Detailed Description

A virtual address which may be relative to a base resource. This means 0 might be a valid address (dependent on the Allocator::Descriptor::m_addressBase value). To account for this, VirtualAddress::Null is used instead. Check validity of the address using IsValid or IsNull instead of checking for 0. VirtualAddress is initialized to Null, so returning the default constructor is sufficient to represent an invalid address.


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