• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    IBM_multimode_draw_arrays
4
5Name Strings
6
7    GL_IBM_multimode_draw_arrays
8
9Contact
10
11    Ian Romanick, IBM (idr 'at' us.ibm.com)
12
13Version
14
15    IBM Date: 2003/12/16 15:48:00  Revision: 1.2
16
17Number
18
19    200
20
21Dependencies
22
23    OpenGL 1.1 is required. The language is written against the OpenGL 1.2
24    specification.
25
26Overview
27
28    These functions behave identically to the standard OpenGL 1.1 functions
29    glDrawArrays() and glDrawElements() except they handle multiple lists of
30    vertices and multiple primitive modes in one call. Their main purpose is
31    to allow one function call to render more than one primitive regardless
32    of the primitive mode.
33
34    This extension is similar to the EXT_multi_draw_arrays extension
35    except that it accomodates the specification of a  unique mode for
36    each primitive.
37
38
39New Procedures and Functions
40
41    void glMultiModeDrawArraysIBM(const GLenum *mode,
42                                  const GLint *first,
43                                  const GLsizei *count,
44                                  GLsizei primcount,
45                                  GLint modestride)
46    Parameters
47    ----------
48        mode            Points to an array of primitive modes.
49                        Symbolic constants GL_POINTS,
50                        GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
51                        GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN,
52                        GL_TRIANGLES, GL_QUAD_STRIP, GL_QUADS,
53                        and GL_POLYGON are accepted primitive modes.
54
55        first           Points to an array of starting indices in
56                        the enabled arrays.
57
58        count           Points to an array of the number of indices
59                        to be rendered.
60
61        primcount       Specifies the size of first and count arrays.
62                        The number of primitives.
63
64
65        modestride      Specifies the how the mode array is strided.
66                        Typical values are 0 (single primitive mode
67                        for all primitives) and sizeof(GLenum)
68                        (seperate primitive mode for each primitive).
69
70
71    void glMultiModeDrawElementsIBM(const GLenum *mode,
72                                    const GLsizei *count,
73                                    GLenum type,
74                                    const void * const *indices,
75                                    GLsizei primcount,
76                                    GLint modestride)
77
78    Parameters
79    ----------
80        mode            Points to an array of primitive modes.
81                        Symbolic constants GL_POINTS,
82                        GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
83                        GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN,
84                        GL_TRIANGLES, GL_QUAD_STRIP, GL_QUADS,
85                        and GL_POLYGON are accepted primitive modes.
86
87        count           Points to an array of the element counts
88
89        type            Specifies the type of the values in indices.
90                        Must be  one  of GL_UNSIGNED_BYTE,
91                        GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
92
93        indices         Specifies a  pointer to the location where
94                        the indices are stored.
95
96        primcount       Specifies the size of the count array. The
97                        number of primitives.
98
99        modestride      Specifies the how the mode array is strided.
100                        Typical values are 0 (single primitive mode
101                        for all primitives) and sizeof(GLenum)
102                        (seperate primitive mode for each primitive).
103
104New Tokens
105
106    None
107
108Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
109
110    Section 2.8 Vertex Arrays:
111
112    The command
113
114        void glMultiModeDrawArraysIBM(const GLenum *mode,
115                                      const GLint *first,
116                                      const GLsizei *count,
117                                      GLsizei primcount,
118                                      GLint modestride)
119
120    Behaves identically to DrawArrays except that a list of arrays and
121    a list of primitive modes is specified instead. The number of lists
122    is specified in the primcount parameter. It has the same effect as:
123
124        for(i=0; i<primcount; i++) {
125           if (*(count+i)>0)
126               DrawArrays(*((GLenum *)((char *)mode+i*modestride)),
127                          *(first+i),
128                          *(count+i));
129        }
130
131    The command
132
133        void glMultiModeDrawElementsIBM(const GLenum *mode,
134                                        const GLsizei *count,
135                                        GLenum type,
136                                        const void * const *indices,
137                                        GLsizei primcount,
138                                        GLint modestride)
139
140    Behaves identically to DrawElements except that a list of arrays and
141    a list of primitive mode is specified instead. The number of lists is
142    specified in the primcount parameter. It has the same effect as:
143
144        for(i=0; i<primcount; i++) {
145            if (*(count+i)>0)
146                DrawElements(*((GLenum *)((char *)mode+i*modestride)),
147                             *(count+i),
148                             type,
149                             *(indices+i));
150        }
151
152Additions to Chapter 3 of the 1.2 Specification (Rasterization)
153
154    None.
155
156Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations and
157
158    None.
159
160Additions to Chapter 5 of the 1.2 Specification (Special Functions)
161
162    None.
163
164Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
165
166    None.
167
168Additions to the GLX Specification
169
170    None.
171
172GLX Protocol
173
174    None.
175
176Errors
177
178    GL_INVALID_ENUM is generated if <mode> contains an unaccepted value.
179
180    GL_VALUE is generated if <primcount> is negative.
181
182    GL_INVALID_OPERATION is generated if glMultiModeDrawArraysIBM or
183    glMultiModeDrawElementsIBM is executed between the execution of glBegin
184    and the corresponding glEnd.
185
186New State
187
188    None.
189
190Revision History
191
192    2003/12/16  idr      Added missing const-qualifiers.
193    1998/12/10           Initial version.
194