Nameless Engine
|
#include <GpuResource.h>
Public Member Functions | |
GpuResource (GpuResourceManager *pManager, const std::string &sResourceName, unsigned int iElementSizeInBytes, unsigned int iElementCount) | |
GpuResource (GpuResource &)=delete | |
GpuResource & | operator= (GpuResource &)=delete |
std::string | getResourceName () const |
unsigned int | getElementSizeInBytes () const |
unsigned int | getElementCount () const |
GpuResourceManager * | getResourceManager () const |
Private Attributes | |
std::shared_ptr< GlobalShaderResourceBinding > | pGlobalShaderResourceBinding |
GpuResourceManager *const | pManager = nullptr |
const unsigned int | iElementSizeInBytes = 0 |
const unsigned int | iElementCount = 0 |
const std::string | sResourceName |
Friends | |
class | GlobalShaderResourceBinding |
Resource stored in the GPU memory.
ne::GpuResource::GpuResource | ( | GpuResourceManager * | pManager, |
const std::string & | sResourceName, | ||
unsigned int | iElementSizeInBytes, | ||
unsigned int | iElementCount | ||
) |
Initializes resource.
pManager | Manager that created this resource. |
sResourceName | Name of this resource. |
iElementSizeInBytes | Resource size information. Size of one array element (if array), otherwise specify size of the whole resource. |
iElementCount | Resource size information. Total number of elements in the array (if array), otherwise specify 1. |
unsigned int ne::GpuResource::getElementCount | ( | ) | const |
Returns resource size information. Total number of elements in the array (if array), otherwise 1.
unsigned int ne::GpuResource::getElementSizeInBytes | ( | ) | const |
Returns resource size information. Size of one array element (if array), otherwise size of the whole resource.
GpuResourceManager * ne::GpuResource::getResourceManager | ( | ) | const |
Returns resource manager that created this resource.
std::string ne::GpuResource::getResourceName | ( | ) | const |
Returns resource name.
|
private |
Resource size information (may be zero in some cases).
|
private |
Resource size information (may be zero in some cases).
|
private |
Not nullptr
if this resource was binded as a global shader resource.
|
private |
Manager that created this resource.
|
private |
Name of this resource.