Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_gpu_resource_base.h File Reference

GPU resource base definitions. More...

Data Structures

struct  KzuGPUResourceClass
 Defines functions for different resource types. More...
 
struct  KzuGPUResource
 GPU resource is a subtype of resource, which can be deployed to GPU. More...
 

Enumerations

enum  KzuGPUResourceDeployState { KZU_GPU_RESOURCE_DEPLOYMENT_STATE_NOT_DEPLOYED, KZU_GPU_RESOURCE_DEPLOYMENT_STATE_DEPLOYING, KZU_GPU_RESOURCE_DEPLOYMENT_STATE_DEPLOYED }
 GPU resource deployment state. More...
 

Functions

kzsError kzuGPUResourceCreate_protected (struct KzuGPUResource *gpuResource, const struct KzuGPUResourceClass *resourceClass, struct KzuResourceManager *resourceManager, kzString name, struct KzuResourceLoader *loader)
 Base function for creating GPU resources. More...
 
kzsError kzuGPUResourceDestructor_protected (struct KzuResource *resource)
 Base destructor for GPU resources. More...
 
kzsError kzuGPUResourceLoadFromKZB_protected (struct KzuResource *resource, const struct KzuResourceLoaderThreadContext *threadContext, struct KzcInputStream *inputStream, struct KzuBinaryFileInfo *file)
 Base function for loading GPU resources from .KZB. More...
 
kzsError kzuGPUResourceFinishLoading_protected (struct KzuResource *resource, const struct KzuResourceLoaderThreadContext *threadContext)
 Base function for finishing the loading of GPU resources. More...
 
kzsError kzuGPUResourceUnload_protected (struct KzuResource *resource)
 Base function for unloading GPU resources. More...
 
kzUint kzuGPUResourceGetCPUMemoryUsage_protected (const struct KzuResource *resource)
 Base function for getting CPU memory usage of GPU resources. More...
 
kzsError kzuGPUResourceDeploy_protected (struct KzuGPUResource *gpuResource)
 Base function for deploying GPU resources. More...
 
kzsError kzuGPUResourceUndeploy_protected (struct KzuGPUResource *gpuResource)
 Base function for undeploying GPU resources. More...
 
kzsError kzuGPUResourceFreeCommonData_protected (struct KzuGPUResource *gpuResource)
 Base function for freeing RAM of GPU resources. More...
 
kzsError kzuGPUResourceInvalidate_protected (struct KzuGPUResource *gpuResource)
 Base function for invalidating GPU resources. More...
 
kzUint kzuGPUResourceGetGPUMemoryUsage_protected (const struct KzuGPUResource *gpuResource)
 Base function for getting GPU memory usage of GPU resources. More...
 
struct KzcRendererkzuGPUResourceGetRenderer_protected (const struct KzuGPUResource *gpuResource)
 Gets the renderer needed for the GPU resource. More...
 

Variables

struct KzuGPUResourceClass KZU_GPU_RESOURCE_CLASS
 GPU resource class. More...
 

Detailed Description

GPU resource base definitions.

Copyright 2008-2019 by Rightware. All rights reserved.

Enumeration Type Documentation

GPU resource deployment state.

Enumerator
KZU_GPU_RESOURCE_DEPLOYMENT_STATE_NOT_DEPLOYED 

The GPU resource has not yet been deployed.

KZU_GPU_RESOURCE_DEPLOYMENT_STATE_DEPLOYING 

The GPU resource deployment is in progress.

KZU_GPU_RESOURCE_DEPLOYMENT_STATE_DEPLOYED 

The GPU resource has been deployed.

Function Documentation

kzsError kzuGPUResourceCreate_protected ( struct KzuGPUResource gpuResource,
const struct KzuGPUResourceClass resourceClass,
struct KzuResourceManager resourceManager,
kzString  name,
struct KzuResourceLoader loader 
)

Base function for creating GPU resources.

All GPU resource constructors should call this first.

kzsError kzuGPUResourceDestructor_protected ( struct KzuResource resource)

Base destructor for GPU resources.

kzsError kzuGPUResourceLoadFromKZB_protected ( struct KzuResource resource,
const struct KzuResourceLoaderThreadContext threadContext,
struct KzcInputStream inputStream,
struct KzuBinaryFileInfo file 
)

Base function for loading GPU resources from .KZB.

kzsError kzuGPUResourceFinishLoading_protected ( struct KzuResource resource,
const struct KzuResourceLoaderThreadContext threadContext 
)

Base function for finishing the loading of GPU resources.

kzsError kzuGPUResourceUnload_protected ( struct KzuResource resource)

Base function for unloading GPU resources.

kzUint kzuGPUResourceGetCPUMemoryUsage_protected ( const struct KzuResource resource)

Base function for getting CPU memory usage of GPU resources.

kzsError kzuGPUResourceDeploy_protected ( struct KzuGPUResource gpuResource)

Base function for deploying GPU resources.

kzsError kzuGPUResourceUndeploy_protected ( struct KzuGPUResource gpuResource)

Base function for undeploying GPU resources.

kzsError kzuGPUResourceFreeCommonData_protected ( struct KzuGPUResource gpuResource)

Base function for freeing RAM of GPU resources.

kzsError kzuGPUResourceInvalidate_protected ( struct KzuGPUResource gpuResource)

Base function for invalidating GPU resources.

kzUint kzuGPUResourceGetGPUMemoryUsage_protected ( const struct KzuGPUResource gpuResource)

Base function for getting GPU memory usage of GPU resources.

struct KzcRenderer* kzuGPUResourceGetRenderer_protected ( const struct KzuGPUResource gpuResource)

Gets the renderer needed for the GPU resource.

Variable Documentation

struct KzuGPUResourceClass KZU_GPU_RESOURCE_CLASS

GPU resource class.