Shader.loadFromStream

Load the vertex, geometry and fragment shaders from custom streams.

This function loads a single shader, either vertex, geometry or fragment, identified by the second argument. The source code must be a valid shader 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.

  1. bool loadFromStream(InputStream stream, Type type)
  2. bool loadFromStream(InputStream vertexShaderStream, InputStream fragmentShaderStream)
  3. bool loadFromStream(InputStream vertexShaderStream, InputStream geometryShaderStream, InputStream fragmentShaderStream)

Parameters

vertexShaderStream InputStream

Source stream to read the vertex shader from

geometryShaderStream InputStream

Source stream to read the geometry shader from

fragmentShaderStream InputStream

Source stream to read the fragment shader from

Return Value

Type: bool

true if loading succeeded, false if it failed.

Meta