C# Class Duality.Resources.ShaderVarInfo

Provides information about a shader variable.
Show file Open project: BraveSirAndrew/duality Class Usage Examples

Public Properties

Property Type Description
arraySize int
glVarLoc int
name string
scope ShaderVarScope
type ShaderVarType

Public Methods

Method Description
InitUniformData ( ) : float[]

Initializes a uniform dataset based on the type of the represented variable.

SetupUniform ( float data ) : void

Assigns the specified data to the OpenGL uniform represented by this ShaderVarInfo.

ToString ( ) : string

Method Details

InitUniformData() public method

Initializes a uniform dataset based on the type of the represented variable.
public InitUniformData ( ) : float[]
return float[]

SetupUniform() public method

Assigns the specified data to the OpenGL uniform represented by this ShaderVarInfo.
public SetupUniform ( float data ) : void
data float Incoming uniform data.
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

arraySize public property

If the variable is an array, this is its length. Arrays are only supported for ShaderVarType.Int and ShaderVarType.Float.
public int arraySize
return int

glVarLoc public property

OpenGL handle of the variables memory location.
public int glVarLoc
return int

name public property

The name of the variable, as declared in the shader.
public string name
return string

scope public property

The scope of the variable
public ShaderVarScope scope
return ShaderVarScope

type public property

The type of the variable
public ShaderVarType type
return ShaderVarType