Shader Constructor (String, String)

SFML.Net

Shader Constructor (String, String)
Load the vertex and fragment shaders from files 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 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.

Namespace: SFML.Graphics
Assembly: sfmlnet-graphics-2 (in sfmlnet-graphics-2.dll) Version: 2.2.0.0 (2.2.0)
Syntax
public Shader(
	string vertexShaderFilename,
	string fragmentShaderFilename
)
Public Sub New ( 
	vertexShaderFilename As String,
	fragmentShaderFilename As String
)
public:
Shader(
	String^ vertexShaderFilename, 
	String^ fragmentShaderFilename
)
new : 
        vertexShaderFilename : string * 
        fragmentShaderFilename : string -> Shader

Parameters

vertexShaderFilename
Type: SystemString
Path of the vertex shader file to load, or null to skip this shader
fragmentShaderFilename
Type: SystemString
Path of the fragment shader file to load, or null to skip this shader
Exceptions
ExceptionCondition
LoadingFailedException
See Also