Mountain  1.0.0
Simple C++ 2D Game Framework
Mountain::Effect Class Referenceabstract
+ Inheritance diagram for Mountain::Effect:
+ Collaboration diagram for Mountain::Effect:

Classes

struct  ImageBinding
 

Public Member Functions

virtual MOUNTAIN_API void LoadResources ()=0
 
MOUNTAIN_API void Apply (Vector2i textureSize, bool_t synchronizeImageData) const
 Applies this effect to the bound images. More...
 

Public Attributes

List< ImageBindingimageBindings
 

Protected Attributes

Pointer< ComputeShaderm_ComputeShader
 

Detailed Description

Definition at line 10 of file effect.hpp.

Member Function Documentation

◆ Apply()

MOUNTAIN_API void Mountain::Effect::Apply ( Vector2i  textureSize,
bool_t  synchronizeImageData 
) const

Applies this effect to the bound images.

Parameters
textureSizeThe texture size to give to the compute shader. The shader will be called once for each pixel of the given size.
synchronizeImageDataWhether to synchronize the CPU image data with the modified GPU one. This effectively means that the CPU will wait for the compute shader to finish executing before returning from this function. If this is false, and you want to access the modified GPU image, you need to manually synchronize the GPU data afterward using Graphics::SynchronizeGpuData() with GpuDataSynchronizationFlags::ShaderImageAccess.

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