Click or drag to resize

Shader Constructor (ShaderType, String)

Creates a shader object.

Namespace:  Ooogles
Assembly:  Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public Shader(
	ShaderType type,
	string source
)

Parameters

type
Type: OooglesShaderType
the type of shader to be created.
source
Type: SystemString
GLSL-ES source code for the shader. When specified, the Source will be set.
Remarks
A shader object is used to maintain the source code that define a shader.

type indicates the type of shader to be created. Two types of shaders are supported. A shader of type Vertex is a shader that is intended to run on the programmable vertex processor. A shader of type Fragment is a shader that is intended to run on the programmable fragment processor.

Note: like texture objects, the name space for shader objects may be shared across a set of contexts, as long as the server sides of the contexts share the same address space. If the name space is shared across contexts, any attached objects and the data associated with those attached objects are shared as well.

Note: applications are responsible for providing the synchronization across API calls when objects are accessed from different execution threads.

OpenGL API: glCreateShader

See Also