SFML.Net
ShaderFromString Method |
Load both the vertex and fragment shaders from source codes in memory
This function can load both the vertex and the fragment
shaders, or only one of them: pass NULL if you don't want to load
either the vertex shader or the fragment 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.
Namespace: SFML.Graphics
Assembly: sfmlnet-graphics-2 (in sfmlnet-graphics-2.dll) Version: 2.2.0.0 (2.2.0)

public static Shader FromString( string vertexShader, string fragmentShader )
Public Shared Function FromString ( vertexShader As String, fragmentShader As String ) As Shader
public: static Shader^ FromString( String^ vertexShader, String^ fragmentShader )
static member FromString : vertexShader : string * fragmentShader : string -> Shader
Parameters
- vertexShader
- Type: SystemString
String containing the source code of the vertex shader - fragmentShader
- Type: SystemString
String containing the source code of the fragment shader
Return Value
Type: ShaderNew shader instance

Exception | Condition |
---|---|
LoadingFailedException |
