프로퍼티 | 타입 | 설명 | |
---|---|---|---|
CurrentTexture | CurrentTextureType |
메소드 | 설명 | |
---|---|---|
Bind ( |
Bind a shader for rendering
|
|
FromString ( string vertexShader, string geometryShader, string fragmentShader ) : |
Load the vertex, geometry and fragment shaders from source code in memory This function loads the vertex, geometry and fragment shaders. Pass NULL if you don't want to load a specific shader. The sources must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders. |
|
SetUniform ( string name, CurrentTextureType current ) : void |
Specify current texture as \p sampler2D uniform This overload maps a shader texture variable to the texture of the object being drawn, which cannot be known in advance. The second argument must be CurrentTexture. The corresponding parameter in the shader must be a 2D texture ( Example: |
|
SetUniform ( string name, Glsl vector ) : void |
Specify value for
|
|
SetUniform ( string name, |
Specify a texture as name is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 2D texture ( Example: To use the texture of the object being drawn, which cannot be known in advance, you can pass the special value Shader.CurrentTexture: |
|
SetUniform ( string name, bool x ) : void |
Specify value for
|
|
SetUniform ( string name, float x ) : void |
Specify value for
|
|
SetUniform ( string name, int x ) : void |
Specify value for
|
|
SetUniformArray ( string name, Glsl array ) : void |
Specify values for
|
|
SetUniformArray ( string name, float array ) : void |
Specify values for
|
|
Shader ( |
Construct the shader from a pointer
|
|
Shader ( Stream vertexShaderStream, Stream geometryShaderStream, Stream fragmentShaderStream ) : System |
Load the vertex, geometry and fragment shaders from custom streams This function loads the vertex, geometry and fragment shaders. Pass NULL if you don't want to load a specific shader. The sources must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders. |
|
Shader ( string vertexShaderFilename, string geometryShaderFilename, string fragmentShaderFilename ) : System |
Load the vertex, geometry and fragment shaders from files This function loads the vertex, geometry and fragment shaders. Pass NULL if you don't want to load a specific shader. The sources must be text files containing valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders. |
|
ToString ( ) : string |
Provide a string describing the object
|
메소드 | 설명 | |
---|---|---|
Destroy ( bool disposing ) : void |
Handle the destruction of the object
|
메소드 | 설명 | |
---|---|---|
SetParameter ( string name, System.Color color ) : void | ||
SetParameter ( string name, CurrentTextureType current ) : void | ||
SetParameter ( string name, |
||
SetParameter ( string name, |
||
SetParameter ( string name, Vector2f vector ) : void | ||
SetParameter ( string name, float x ) : void | ||
SetParameter ( string name, float x, float y ) : void | ||
SetParameter ( string name, float x, float y, float z ) : void | ||
SetParameter ( string name, float x, float y, float z, float w ) : void | ||
sfShader_bind ( |
||
sfShader_createFromFile ( string vertexShaderFilename, string geometryShaderFilename, string fragmentShaderFilename ) : |
||
sfShader_createFromMemory ( string vertexShader, string geometryShader, string fragmentShader ) : |
||
sfShader_createFromStream ( |
||
sfShader_destroy ( |
||
sfShader_getNativeHandle ( |
||
sfShader_isAvailable ( ) : bool | ||
sfShader_isGeometryAvailable ( ) : bool | ||
sfShader_setBoolUniform ( |
||
sfShader_setBvec2Uniform ( |
||
sfShader_setBvec3Uniform ( |
||
sfShader_setBvec4Uniform ( |
||
sfShader_setColorParameter ( |
||
sfShader_setCurrentTextureParameter ( |
||
sfShader_setCurrentTextureUniform ( |
||
sfShader_setFloat2Parameter ( |
||
sfShader_setFloat3Parameter ( |
||
sfShader_setFloat4Parameter ( |
||
sfShader_setFloatParameter ( |
||
sfShader_setFloatUniform ( |
||
sfShader_setFloatUniformArray ( |
||
sfShader_setIntUniform ( |
||
sfShader_setIvec2Uniform ( |
||
sfShader_setIvec3Uniform ( |
||
sfShader_setIvec4Uniform ( |
||
sfShader_setMat3Uniform ( |
||
sfShader_setMat3UniformArray ( |
||
sfShader_setMat4Uniform ( |
||
sfShader_setMat4UniformArray ( |
||
sfShader_setTextureParameter ( |
||
sfShader_setTextureUniform ( |
||
sfShader_setTransformParameter ( |
||
sfShader_setVec2Uniform ( |
||
sfShader_setVec2UniformArray ( |
||
sfShader_setVec3Uniform ( |
||
sfShader_setVec3UniformArray ( |
||
sfShader_setVec4Uniform ( |
||
sfShader_setVec4UniformArray ( |
public static Bind ( |
||
shader | Shader to bind (can be null to use no shader) | |
리턴 | void |
protected Destroy ( bool disposing ) : void | ||
disposing | bool | Is the GC disposing the object, or is it an explicit call ? |
리턴 | void |
public static FromString ( string vertexShader, string geometryShader, string fragmentShader ) : |
||
vertexShader | string | String containing the source code of the vertex shader |
geometryShader | string | String containing the source code of the geometry shader |
fragmentShader | string | String containing the source code of the fragment shader |
리턴 |
public SetUniform ( string name, CurrentTextureType current ) : void | ||
name | string | Name of the texture in the shader |
current | CurrentTextureType | |
리턴 | void |
public SetUniform ( string name, Glsl vector ) : void | ||
name | string | Name of the uniform variable in GLSL |
vector | Glsl | Value of the vec2 vector |
리턴 | void |
public SetUniform ( string name, |
||
name | string | Name of the texture in the shader |
texture | Texture to assign | |
리턴 | void |
public SetUniform ( string name, bool x ) : void | ||
name | string | Name of the uniform variable in GLSL |
x | bool | Value of the bool scalar |
리턴 | void |
public SetUniform ( string name, float x ) : void | ||
name | string | Name of the uniform variable in GLSL |
x | float | Value of the float scalar |
리턴 | void |
public SetUniform ( string name, int x ) : void | ||
name | string | Name of the uniform variable in GLSL |
x | int | Value of the int scalar |
리턴 | void |
public SetUniformArray ( string name, Glsl array ) : void | ||
name | string | Name of the uniform variable in GLSL |
array | Glsl | array of |
리턴 | void |
public SetUniformArray ( string name, float array ) : void | ||
name | string | Name of the uniform variable in GLSL |
array | float | array of |
리턴 | void |
public Shader ( |
||
ptr | Pointer to the shader instance | |
리턴 | System |
public Shader ( Stream vertexShaderStream, Stream geometryShaderStream, Stream fragmentShaderStream ) : System | ||
vertexShaderStream | Stream | Source stream to read the vertex shader from, or null to skip this shader |
geometryShaderStream | Stream | Source stream to read the geometry shader from, or null to skip this shader |
fragmentShaderStream | Stream | Source stream to read the fragment shader from, or null to skip this shader |
리턴 | System |
public Shader ( string vertexShaderFilename, string geometryShaderFilename, string fragmentShaderFilename ) : System | ||
vertexShaderFilename | string | Path of the vertex shader file to load, or null to skip this shader |
geometryShaderFilename | string | Path of the geometry shader file to load, or null to skip this shader |
fragmentShaderFilename | string | Path of the fragment shader file to load, or null to skip this shader |
리턴 | System |