(index ("glsl-version" 0) ("shader" 409) ("define-shader" 671) ("create-shader" 1068) ("compile-glls" 1438) ("compile-shader" 1709) ("pipeline" 2024) ("define-pipeline" 2648) ("create-pipeline" 4066) ("compile-pipeline" 4613) ("compile-pipelines" 5056) ("pipeline-uniform" 5321) ("pipeline-attribute" 5530) ("pipeline-mesh-attributes" 5747) ("set-renderable-vao!" 6029) ("set-renderable-n-elements!" 6029) ("set-renderable-element-type!" 6029) ("set-renderable-mode!" 6029) ("set-renderable-offset!" 6029) ("renderable-size" 6835) ("unique-textures?" 7016) ("export-pipeline" 7718))
(def (sig (parameter " glsl-version" (id glsl-version))) (p "The default GLSL version used by shaders. Defaults to " (tt "120") " on GL ES platforms, " (tt "330") " otherwise. When compiling a file with a shader, this modifying this parameter will only take effect if you change it before the compilation phase. E.g.:") (highlight scheme "    \n(use-for-syntax glls)\n(begin-for-syntax (glsl-version 300))"))
(def (sig (record " (shader TYPE SOURCE INPUTS OUTPUTS UNIFORMS PROGRAM)" (id shader))) (p "Used to represent shaders. Returned by " (tt "define-shader") " and " (tt "create-shader") ". It should not typically be necessary to access the slots of this record."))
(def (sig (syntax " (define-shader SHADER-NAME GLLS-SHADER)" (id define-shader))) (p "Defines a new " (tt "shader") " named " (tt "NAME") ". The (unquoted) form " (tt "GLLS-SHADER") " should conform to language defined in the section " (int-link "#the-glls-shader-language" "The glls shader language") ". Before shaders are used, they must be compiled by OpenGL with " (tt "compile-shader") "."))
(def (sig (procedure " (create-shader GLLS-SHADER )" (id create-shader))) (p "Creates (at run-time) a new " (tt "shader") ". The form " (tt "GLLS-SHADER") " should conform to language defined in the section " (int-link "#the-glls-shader-language" "The glls shader language") ". Before shaders are used, they must be compiled by OpenGL with " (tt "compile-shader") "."))
(def (sig (procedure " (compile-glls GLLS-SHADER)" (id compile-glls))) (p "Returns the source string for a shader. The form " (tt "GLLS-SHADER") " should conform to language defined in the section " (int-link "#the-glls-shader-language" "The glls shader language") "."))
(def (sig (procedure " (compile-shader SHADER)" (id compile-shader))) (p "Compile (in OpenGL) " (tt "SHADER") ". Nothing is done if the shader has already been compiled. This typically does not need to be called, since " (tt "compile-pipeline") " does so. Must be called while there is an active OpenGL context."))
(def (sig (record " (pipeline SHADERS ATTRIBUTES UNIFORMS PROGRAM)" (id pipeline))) (p "Created with " (tt "define-pipeline") " or " (tt "create-pipeline") ", contains the data needed for a pipeline. " (tt "SHADERS") " is the list of shader records. " (tt "ATTRIBUTES") " and " (tt "UNIFORMS") " are lists of the attributes and uniforms of the shader, specified as " (tt "(name . type)") " pairs before compilation (with " (tt "compile-pipeline") " or " (tt "compile-pipelines") ") and " (tt "(name location type)") " lists after compilation. " (tt "PROGRAM") " is the GL ID of the program (always 0 before compilation)."))
(def (sig (syntax " (define-pipeline PIPELINE-NAME . SHADERS)" (id define-pipeline))) (p "Defines a new " (tt "pipeline") " named " (tt "NAME") ". The " (tt "SHADERS") " should either be forms conforming to language defined in the section " (int-link "#the-glls-shader-language" "The glls shader language") ", " (tt "shader") "s defined by " (tt "define-shader") ", or a mix of the two. Pipelines must have at least one vertex and one fragment shader to be able to compile. Before pipelines are used, they must be compiled by OpenGL with " (tt "compile-pipeline") " or " (tt "compile-pipelines") ".") (p (tt "define-pipeline") " behaves differently when it is being evaluated " (i "and") " when a given pipeline is being redefined. In this case, the new pipeline inherits the GL program ID of the old one. Additionally, the pipeline is compiled by OpenGL right away (and as a consequence, so are any pipelines that are pending compilation). This is done so that pipelines can be edited and reevaluated in a REPL session and one’s scene will be updated as expected. See the " (link "https://github.com/AlexCharlton/glls/blob/master/examples/interactive.scm" "interactive example") " for an example of how this can be accomplished.") (p (tt "define-pipeline") " has additional effects when used with the " (tt "glls-render") " module (see " (int-link "#automatic-render-functions" "Automatic render functions") ")."))
(def (sig (procedure " (create-pipeline . SHADERS)" (id create-pipeline))) (p "Creates (at run-time) a new " (tt "pipeline") ". The " (tt "SHADERS") " should either be forms conforming to language defined in the section " (int-link "#the-glls-shader-language" "The glls shader language") ", " (tt "shader") "s, or a mix of the two. Pipelines must have at least one vertex and one fragment shader to be able to compile. Before pipelines are used, they must be compiled by OpenGL with " (tt "compile-pipeline") " or " (tt "compile-pipelines") "."))
(def (sig (procedure " (compile-pipeline PIPELINE)" (id compile-pipeline))) (p "Compile (in OpenGL) the " (tt "PIPELINE") " and sets its " (tt "PROGRAM") " slot to the OpenGL program ID. If the pipeline’s " (tt "PROGRAM") " slot is already set to a non-zero value, this ID will be reused for the new program. Compiles all of the pipeline’s shaders with " (tt "compile-shader") ". Must be called while there is an active OpenGL context."))
(def (sig (procedure " (compile-pipelines)" (id compile-pipelines))) (p "Compile (as per " (tt "compile-pipeline") ") all the pipelines defined by " (tt "define-pipeline") " and " (tt "create-pipeline") ". Must be called while there is an active OpenGL context."))
(def (sig (procedure " (pipeline-uniform UNIFORM PIPELINE)" (id pipeline-uniform))) (p "Return the location of " (tt "UNIFORM") ". The " (tt "PIPELINE") " must be compiled before this function can be used."))
(def (sig (procedure " (pipeline-attribute ATTRIBUTE PIPELINE)" (id pipeline-attribute))) (p "Return the location of " (tt "ATTRIBUTE") ". The " (tt "PIPELINE") " must be compiled before this function can be used."))
(def (sig (procedure " (pipeline-mesh-attributes PIPELINE)" (id pipeline-mesh-attributes))) (p "Return a list of " (tt "(ATTRIBUTE-NAME . LOCATION)") " pairs, suitable for passing to " (link "http://wiki.call-cc.org/eggref/4/gl-utils" "gl-utils’") " " (tt "mesh-make-vao!") "."))
(def (sig (procedure " (set-renderable-vao! RENDERABLE VAO)" (id set-renderable-vao!)) (procedure " (set-renderable-n-elements! RENDERABLE N-ELEMENTS)" (id set-renderable-n-elements!)) (procedure " (set-renderable-element-type! RENDERABLE TYPE)" (id set-renderable-element-type!)) (procedure " (set-renderable-mode! RENDERABLE MODE)" (id set-renderable-mode!)) (procedure " (set-renderable-offset! RENDERABLE OFFSET)" (id set-renderable-offset!))) (pre "   \n   (set-PIPELINE-NAME-renderable-UNIFORM-NAME! RENDERABLE UNIFORM-VALUE)") (p "These setters accept two arguments: a renderable and a value. The values correspond to those that " (tt "make-PIPELINE-NAME-renderable") " accepts. For each uniform in the pipeline, a function named " (tt "set-PIPELINE-NAME-renderable-UNIFORM-NAME!") " is created."))
(def (sig (procedure " (renderable-size PIPELINE)" (id renderable-size))) (p "Returns the size, in bytes, of the memory needed for a renderable belonging to " (tt "PIPELINE") "."))
(def (sig (parameter " unique-textures?" (id unique-textures?))) (p "This parameter, defaulting to " (tt "#t") ", controls where textures are bound in the fast render functions. When " (tt "unique-textures?") " is " (tt "#t") ", textures are bound in the main render function. When " (tt "unique-textures?") " is " (tt "#f") ", textures are bound in the begin render function. In other words: when " (tt "unique-textures?") " is " (tt "#f") ", it is assumed that that all of the renderables belonging to the same pipeline share a common “sprite sheet” (or other shared texture type). This parameter must be set for syntax (i.e. in a " (tt "begin-for-syntax") " form) in order to have an effect."))
(def (sig (syntax " (export-pipeline . PIPELINES)" (id export-pipeline))) (p "Since glls-render causes " (tt "define-pipeline") " to define multiple functions, this macro exports everything related to each pipeline in " (tt "PIPELINES") ", except for the " (tt "set-PIPELINE-NAME-renderable-UNIFORM!") " setters. These must be exported individually."))
