IYIGPUObject implementation for GNM textures on PS4.
#include <renderer/YiGNMTextureObject.h>

Public Member Functions | |
| CYIGNMTextureObject () | |
| virtual | ~CYIGNMTextureObject () |
| virtual void | Load (const std::shared_ptr< CYIAssetHardware > &pAsset) override |
| virtual void | Unload () override |
| virtual void | Use () const override |
| virtual void | Generate () override |
| virtual void | Free () override |
| virtual void | InvalidateHandle () override |
| void | Configure (int32_t width, int32_t height, int32_t format, int32_t type, CYIGNMFramebufferObject *pFrameBufferObject=nullptr) |
| void | LoadEmpty () |
| void | Bind (uint32_t slot=0) const |
| sce::Gnm::Texture * | GetGnmTexture () |
Public Member Functions inherited from CYIGNMAbstractBufferObject | |
| CYIGNMAbstractBufferObject (int32_t handle) | |
| virtual | ~CYIGNMAbstractBufferObject () |
| virtual void | SetTarget (uint32_t target) |
| uint32_t | GetTarget () const |
| virtual uint32_t | GetHandle () |
Public Member Functions inherited from IYIGPUObject | |
| IYIGPUObject () | |
| virtual | ~IYIGPUObject () |
| YI_GPU_OBJECT_STATUS | GetStatus () const |
Additional Inherited Members | |
Public Types inherited from IYIGPUObject | |
| enum | YI_GPU_OBJECT_STATUS { INVALID, UNLOADED, LOADED_FRESH, LOADED_STALE } |
Protected Attributes inherited from CYIGNMAbstractBufferObject | |
| uint32_t | m_handle |
| uint32_t | m_target |
Protected Attributes inherited from IYIGPUObject | |
| YI_GPU_OBJECT_STATUS | m_status |
| CYIGNMTextureObject::CYIGNMTextureObject | ( | ) |
Upon creation, a texture object will generate a valid handle in graphics memory
|
virtual |
Upon deletion, a texture object will free all of its memory and invalidate its handle
| void CYIGNMTextureObject::Bind | ( | uint32_t | slot = 0 | ) | const |
| void CYIGNMTextureObject::Configure | ( | int32_t | width, |
| int32_t | height, | ||
| int32_t | format, | ||
| int32_t | type, | ||
| CYIGNMFramebufferObject * | pFrameBufferObject = nullptr |
||
| ) |
Parameters used are identical to those used for OpenGL's glTexImage2D(). Direct3D equivalents are implemented.
|
overridevirtual |
Deallocates the GPU memory associated with this object.
Implements IYIGPUObject.
|
overridevirtual |
Generates a valid handle. No GPU memory is allocated until Load() is called.
Implements IYIGPUObject.
| sce::Gnm::Texture* CYIGNMTextureObject::GetGnmTexture | ( | ) |
|
overridevirtual |
This function can be called to invalidate the buffer handle without freeing the associated memory.
This can be used if the GL context is lost and GPU memory is freed implicitly. Calling Free() on this object will result in a crash if the handle is no longer pointing to valid memory, and a new handle may not be created with Generate() if the current handle is valid. This function allows you to inform the buffer object that the GL data has been freed externally and that the handle should be disconnected.
Implements IYIGPUObject.
|
overridevirtual |
Loads the software data from the associated CYIAsset into graphics memory. If the YI_GPU_OBJECT_STATUS is LOADED_FRESH upon a call to load, meaning that data was previously successfully loaded, the status may become LOADED_STALE in the case where this load failed. See the YI_GPU_OBJECT_STATUS documentation for more details.
Implements IYIGPUObject.
| void CYIGNMTextureObject::LoadEmpty | ( | ) |
|
overridevirtual |
Frees any previously loaded data from video memory, but retains the handle.
Implements IYIGPUObject.
|
overridevirtual |
Makes the GPU Object active, called by the renderer
Implements IYIGPUObject.