From ce9d6e8ad28b2d84d1a292a871c23b66a4654b54 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 13 Apr 2021 11:30:50 -0400 Subject: Add new guile-sdl2 and chickadee releases. --- manuals/chickadee/Rendering-Engine.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'manuals/chickadee/Rendering-Engine.html') diff --git a/manuals/chickadee/Rendering-Engine.html b/manuals/chickadee/Rendering-Engine.html index 7c02082..bdc2444 100644 --- a/manuals/chickadee/Rendering-Engine.html +++ b/manuals/chickadee/Rendering-Engine.html @@ -85,7 +85,7 @@ ul.no-bullet {list-style: none} Next: , Previous: , Up: Graphics   [Contents][Index]


-

2.3.12 Rendering Engine

+

2.3.13 Rendering Engine

Chickadee defines rendering using a metaphor familiar to Scheme programmers: procedure application. A shader (see Shaders) is @@ -93,31 +93,31 @@ like a procedure for the GPU to apply. Shaders are passed arguments: A vertex array containing the geometry to render (see Buffers) and zero or more keyword arguments that the shader understands. Similar to how Scheme has apply for calling procedures, Chickadee -provides gpu-apply for calling shaders. +provides shader-apply for calling shaders.

Additionally, there is some dynamic state that effects how -gpu-apply will behave. Things like the current viewport, +shader-apply will behave. Things like the current viewport, framebuffer, and blend mode are stored as dynamic state because it would be tedious to have to have to specify them each time -gpu-apply is called. +shader-apply is called.

The following procedures and syntax can be found in the (chickadee graphics) module.

-
Syntax: gpu-apply shader vertex-array [#:uniform-key uniform-value …]
-
Syntax: gpu-apply* shader vertex-array count [#:uniform-key uniform-value …]
+
Syntax: shader-apply shader vertex-array [#:uniform-key uniform-value …]
+
Syntax: shader-apply* shader vertex-array count [#:uniform-key uniform-value …]

Render vertex-array using shader with the uniform values specified in the following keyword arguments.

-

While gpu-apply will draw every vertex in vertex-array, -gpu-apply* will only draw count vertices. +

While shader-apply will draw every vertex in vertex-array, +shader-apply* will only draw count vertices.

-
Syntax: gpu-apply/instanced shader vertex-array n [#:uniform-key uniform-value …]
-
Syntax: gpu-apply/instanced shader vertex-array count n [#:uniform-key uniform-value …]
+
Syntax: shader-apply/instanced shader vertex-array n [#:uniform-key uniform-value …]
+
Syntax: shader-apply/instanced shader vertex-array count n [#:uniform-key uniform-value …]

Render vertex-array n times using shader with the uniform values specified in the following keyword arguments. @@ -126,8 +126,8 @@ uniform values specified in the following keyword arguments. many times with only small differences for each one. For example, the particle effects described in Particles use instanced rendering.

-

While gpu-apply/instanced will draw every vertex in -vertex-array, gpu-apply* will only draw count +

While shader-apply/instanced will draw every vertex in +vertex-array, shader-apply* will only draw count vertices.

-- cgit v1.2.3