void SetGlobal( StringToken token, GpuBuffer buffer )
void SetGlobal( StringToken token, int i )
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 global shader variable identified by a StringToken. This is useful for setting up data that needs to be accessed by shaders globally across multiple draw calls.

Usage

To use the SetGlobal method, you need to have a valid StringToken that represents the name of the global variable in the shader, and a GpuBuffer that contains the data you want to bind. Call this method on an instance of CommandList to set the global buffer.

Example

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

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