Public Member Functions

sp::video::ComputeShaderIO Class Reference
[Shaders]

#include <spComputeShader.hpp>

Inheritance diagram for sp::video::ComputeShaderIO:
sp::video::Direct3D11ComputeShaderIO

List of all members.

Public Member Functions

 ComputeShaderIO ()
virtual ~ComputeShaderIO ()
virtual u32 addInputBuffer (u32 BufferSize, u32 Count, void *InitData=0)
virtual u32 addOutputBuffer (u32 BufferSize, u32 Count)
virtual void setBuffer (const u32 Index, const void *InputBuffer)
virtual bool getBuffer (const u32 Index, void *OutputBuffer)

Detailed Description

ComputeShaderIO is used to have an access to input- and output buffers between your program and the compute shader on the GPU.


Constructor & Destructor Documentation

sp::video::ComputeShaderIO::ComputeShaderIO (  )  [inline]
virtual sp::video::ComputeShaderIO::~ComputeShaderIO (  )  [inline, virtual]

Member Function Documentation

virtual u32 sp::video::ComputeShaderIO::addInputBuffer ( u32  BufferSize,
u32  Count,
void *  InitData = 0 
) [inline, virtual]

Adds an input buffer to set user data to a compute shader.

Parameters:
BufferSize,: Size (in bytes) of one element of the buffer.
Count,: Count of elements.
InitData,: Initial data for the buffer. If this parameter is none zero it needs to point to a buffer which has the size of [BufferSize * Count] bytes.
Returns:
Zero based buffer index.

Reimplemented in sp::video::Direct3D11ComputeShaderIO.

virtual u32 sp::video::ComputeShaderIO::addOutputBuffer ( u32  BufferSize,
u32  Count 
) [inline, virtual]

Adds an output buffer to get the result from a compute shader.

Parameters:
BufferSize,: Size (in bytes) of one element of the buffer.
Count,: Count of elements.
Returns:
Zero based buffer index.

Reimplemented in sp::video::Direct3D11ComputeShaderIO.

virtual bool sp::video::ComputeShaderIO::getBuffer ( const u32  Index,
void *  OutputBuffer 
) [inline, virtual]

Gets the data of a buffer.

Parameters:
Index,: Zero based buffer index. Add an ouput buffer and use the returned index. Input buffers can also be used.
OutputBuffer,: Pointer to the buffer data where the output data is to be copied. The buffer needs to point to a buffer data with the same size of the created output buffer.

Reimplemented in sp::video::Direct3D11ComputeShaderIO.

virtual void sp::video::ComputeShaderIO::setBuffer ( const u32  Index,
const void *  InputBuffer 
) [inline, virtual]

Sets the data of a buffer.

Parameters:
Index,: Zero based buffer index. Add an input buffer and use the returned index.
InputBuffer,: Input buffer data which is to be set. The buffer needs to point to a buffer data with the same size of the created input buffer.

Reimplemented in sp::video::Direct3D11ComputeShaderIO.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines