xref: /aosp_15_r20/external/angle/extensions/ANGLE_polygon_mode.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_polygon_mode
4
5Name Strings
6
7    GL_ANGLE_polygon_mode
8
9Status
10
11    Draft
12
13Version
14
15    Last Modified Date: March 31, 2023
16    Revision: 1
17
18Number
19
20    OpenGL ES Extension XX
21
22Dependencies
23
24    This extension is written against the OpenGL ES 3.1 (November 3, 2016)
25    specification, but can apply to earlier versions.
26
27Overview
28
29    Rendering triangle primitives as lines, i.e., in a wireframe mode,
30    is useful for debugging GPU applications.
31
32    This effect cannot be achieved by drawing the same triangle primitives with
33    the LINES mode due to differences in primitive assembly and rasterization.
34    Moreover, polygon offset state is ignored for line primitives thus making
35    the wireframe overlay even more difficult to be rendered correctly.
36
37    This extension has the same semantics as NV_polygon_mode but the point
38    rasterization mode is omitted to support the extension on layered OpenGL ES
39    implementations, such as ANGLE, when the underlying API does not support
40    point rasterization mode.
41
42New Procedures and Functions
43
44    void PolygonModeANGLE(enum face, enum mode);
45
46New Tokens
47
48    Accepted by the <pname> parameter to GetIntegerv:
49
50        POLYGON_MODE_ANGLE                          0x0B40
51
52    Accepted by the <pname> parameters of Enable, Disable and IsEnabled:
53
54        POLYGON_OFFSET_LINE_ANGLE                   0x2A02
55
56    Returned by GetIntegerv, GetFloatv, and GetInteger64v when <pname> is
57    POLYGON_MODE_ANGLE:
58
59        LINE_ANGLE                                  0x1B01
60        FILL_ANGLE                                  0x1B02
61
62New State
63
64    Modify Table 20.6, Rasterization
65
66    Add:
67
68                                          Initial
69    Get Value                 Type Get Command  Value     Description                    Sec.
70    -----------------------   ---- ----------- ---------- ---------------------------    ------
71    POLYGON_MODE_ANGLE         E   GetIntegerv FILL_ANGLE Polygon rasterization mode     13.5.1pm
72                                                          (front & back)
73    POLYGON_OFFSET_LINE_ANGLE  B   IsEnabled   FALSE      Polygon offset enable for      13.5.2
74                                                          LINE_ANGLE mode rasterization
75
76    Change description for POLYGON_OFFSET_FILL to "Polygon offset enable for
77    FILL_ANGLE mode rasterization"
78
79Errors
80
81    An INVALID_ENUM error is generated by PolygonModeANGLE if <face> is not
82    FRONT_AND_BACK.
83
84    An INVALID_ENUM error is generated by PolygonModeANGLE if <mode> is not
85    one of LINE_ANGLE or FILL_ANGLE.
86
87Revision History
88
89    3/31/2023   First revision
90