Table of Contents

Interface IShaderProgram

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public interface IShaderProgram : IDisposable
Inherited Members

Properties

ClampTexturesToEdge

If true, it well configure the textures to clamp to the edge (CLAMP_TO_EDGE). Requires the textureid to be defined using SetTextureIds

bool ClampTexturesToEdge { get; set; }

Property Value

bool

Disposed

True if this shader has been disposed

bool Disposed { get; }

Property Value

bool

FragmentShader

The fragment shader of this shader program

IShader FragmentShader { get; set; }

Property Value

IShader

GeometryShader

The geometry shader of this shader program

IShader GeometryShader { get; set; }

Property Value

IShader

LoadError

bool LoadError { get; }

Property Value

bool

PassId

A uniqe shader pass number assigned to each shader program

int PassId { get; }

Property Value

int

PassName

The name it was registered with. If you want to load this shader from a file, make sure the use the filename here

string PassName { get; }

Property Value

string

VertexShader

The vertex shader of this shader program

IShader VertexShader { get; set; }

Property Value

IShader

Methods

BindTexture2D(string, int, int)

void BindTexture2D(string samplerName, int textureId, int textureNumber)

Parameters

samplerName string
textureId int
textureNumber int

BindTextureCube(string, int, int)

void BindTextureCube(string samplerName, int textureId, int textureNumber)

Parameters

samplerName string
textureId int
textureNumber int

Compile()

bool Compile()

Returns

bool

HasUniform(string)

bool HasUniform(string uniformName)

Parameters

uniformName string

Returns

bool

Stop()

void Stop()

Uniform(string, int)

void Uniform(string uniformName, int value)

Parameters

uniformName string
value int

Uniform(string, float)

void Uniform(string uniformName, float value)

Parameters

uniformName string
value float

Uniform(string, Vec2f)

void Uniform(string uniformName, Vec2f value)

Parameters

uniformName string
value Vec2f

Uniform(string, Vec3f)

void Uniform(string uniformName, Vec3f value)

Parameters

uniformName string
value Vec3f

Uniform(string, Vec4f)

void Uniform(string uniformName, Vec4f value)

Parameters

uniformName string
value Vec4f

UniformMatrices(string, int, float[])

void UniformMatrices(string uniformName, int count, float[] matrix)

Parameters

uniformName string
count int
matrix float[]

UniformMatrices4x3(string, int, float[])

void UniformMatrices4x3(string uniformName, int count, float[] matrix)

Parameters

uniformName string
count int
matrix float[]

UniformMatrix(string, float[])

void UniformMatrix(string uniformName, float[] matrix)

Parameters

uniformName string
matrix float[]

Uniforms4(string, int, float[])

void Uniforms4(string uniformName, int count, float[] values)

Parameters

uniformName string
count int
values float[]

Use()

void Use()