File: ALLEGRO_SHADER_TYPE.3

package info (click to toggle)
allegro5 2%3A5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,032 kB
  • sloc: ansic: 120,340; cpp: 15,707; objc: 4,805; python: 2,915; java: 2,195; sh: 887; xml: 86; makefile: 49; perl: 37; pascal: 24
file content (46 lines) | stat: -rw-r--r-- 1,324 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.TH "ALLEGRO_SHADER_TYPE" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
ALLEGRO_SHADER_TYPE \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

typedef\ enum\ ALLEGRO_SHADER_TYPE\ ALLEGRO_SHADER_TYPE;
\f[]
.fi
.SH DESCRIPTION
.PP
Used with al_attach_shader_source(3) and al_attach_shader_source_file(3)
to specify how to interpret the attached source.
.TP
.B ALLEGRO_VERTEX_SHADER
A vertex shader is executed for each vertex it is used with.
The program will output exactly one vertex at a time.
.RS
.PP
When Allegro\[aq]s graphics are being used then in addition to all
vertices of primitives from the primitives addon, each drawn bitmap also
consists of four vertices.
.RE
.TP
.B ALLEGRO_PIXEL_SHADER
A pixel shader is executed for each pixel it is used with.
The program will output exactly one pixel at a time \- either in the
backbuffer or in the current target bitmap.
.RS
.PP
With Allegro\[aq]s builtin graphics this means the shader is for example
called for each destination pixel of the output of an al_draw_bitmap(3)
call.
.PP
A more accurate term for pixel shader would be fragment shader since one
final pixel in the target bitmap is not necessarily composed of only a
single output but of multiple fragments (for example when
multi\-sampling is being used).
.RE
.SH SINCE
.PP
5.1.0