目录

VolumeCloudRenderAPI

Class Info

VolumeCloudRenderAPI

A class that implements volumetric cloud rendering, including initializing environment, passing arguments, rendering volumetric clouds, and destroying allocations.

Public Constructor Summary

Constructor Name

VolumeCloudRenderAPI()

Default constructor.

Public Destructor Summary

Destructor Name

~VolumeCloudRenderAPI()

A destructor used to free memory.

Public Method Summary

Qualifier and Type

Method Name and Description

bool

CreateResources()

Creates the rendering environment and resources.

void

RenderCloudFrameTexture(void* textureHandle, void* depthTexHandle, int textureWidth, int textureHeight)

Renders volumetric clouds on textureHandle.

bool

SetRenderCloudParas(VolumeRenderParas &paras)

Sets required volumetric cloud rendering parameters.

void

ReleaseData()

Destroys the allocations.

Public Constructors

[h2]VolumeCloudRenderAPI

Constructor

VolumeCloudRenderAPI()

A constructor that takes no arguments.

Public Destructors

[h2]~VolumeCloudRenderAPI

Destructor

~VolumeCloudRenderAPI()

A destructor.

Public Methods

[h2]CreateResources

Method

bool CreateResources()

Creates the rendering environment and resources.

Returns

Type

Description

bool

true if the environment and resources are created successfully; false otherwise.

[h2]RenderCloudFrameTexture

Method

void RenderCloudFrameTexture(void* textureHandle, void* depthTexHandle, int textureWidth, int textureHeight)

Renders volumetric clouds on textureHandle.

Parameters

Name

Description

textureHandle

Memory for drawing textures.

depthTexHandle

Depth texture with the same size as textureHandle.

textureWidth

Texture width, up to 4680 pixels.

textureHeight

Texture height, up to 4680 pixels.

[h2]SetRenderCloudParas

Method

bool SetRenderCloudParas(VolumeRenderParas &paras)

Sets required volumetric cloud rendering parameters.

Parameters

Name

Description

paras

Volumetric cloud rendering parameters, including the camera position, lighting, and wind speed.

Returns

Type

Description

bool

true if the parameters are set successfully; false otherwise.

[h2]ReleaseData

Method

void ReleaseData()

Destroys the allocations.