void SetGlobal( StringToken token, GpuBuffer buffer )
void SetGlobal( StringToken token, int i )
void SetGlobal( StringToken token, bool b )
void SetGlobal( StringToken token, float f )
void SetGlobal( StringToken token, System.Double f )
void SetGlobal( StringToken token, Vector2 vector2 )
void SetGlobal( StringToken token, Vector3 vector3 )
void SetGlobal( StringToken token, Vector4 vector4 )
void SetGlobal( StringToken token, Matrix matrix )
void SetGlobal( StringToken token, Texture texture )

robot_2Generated
code_blocksInput

Description

The SetGlobal method in the CommandList class is used to set a global GPU buffer for rendering operations. This method allows you to bind a GpuBuffer to a specific StringToken, which can then be accessed globally within the rendering pipeline.

Usage

To use the SetGlobal method, you need to provide a StringToken that identifies the global variable and a GpuBuffer that you want to bind to this token. This setup is typically used in advanced rendering scenarios where you need to share data across different shaders or rendering passes.

Example

// Example of using SetGlobal method
var commandList = new CommandList();
var token = new StringToken("GlobalBuffer");
var gpuBuffer = new GpuBuffer();

// Set the global GPU buffer
commandList.SetGlobal(token, gpuBuffer);