<blockquote>
<p>When using for instance <code>GL_UNSIGNED_SHORT</code> as the type of the indices is there still a restriction that only <code>MAX_UNSIGNED_SHORT</code> vertices can be rendered at a time</p>
</blockquote>
<p>No such restriction has ever existed (and I checked old versions of the specification). The limitations on <code>count</code> have never been related to the size of the index type. The type of the indices only describes the type of the <em>indices</em>; how many indices are being used is specified by <code>count</code> and is unrelated to the type.</p>

CC BY-SA 4.0
2023-08-28T22:14:22.317Z
2023-08-28T22:14:22.317Z
Nicol Bolas
<p>With <code>glMultiDrawElementsBaseVertex</code> it becomes possible to render multiple sets of indices in one draw call. When using for instance <code>GL_UNSIGNED_SHORT</code> as the type of the indices is there still a restriction that only <code>MAX_UNSIGNED_SHORT</code> vertices can be rendered at a time? Or does the combination with multiple base vertices allow to exceed this number and allow for multiple sets of sub-draw calls provided that these do not exceed the <code>MAX_UNSIGNED_SHORT</code> restriction in relation to their base vertex?</p>
<p>So for instance given the following input to the command:</p>
<p><span class="math-container">$\mathit{count} = [65535, 65535]$</span></p>
<p><span class="math-container">$\mathit{indices} = [\mathit{indexOffset0}, \mathit{indexOffset1}]$</span></p>
<p><span class="math-container">$\mathit{baseVertex} = [0, 65536]$</span></p>
<p>will the baseVertex offset (&gt; <code>MAX_UNSIGNED_SHORT</code>) be correctly added to the index found at indexOffset1? I don't believe the specs raise anything about the types of indices used and the number of vertices referenced.</p>

<opengl>
Is MultiDrawElementsBaseVertex bound by index type?
Reynolds
# Is MultiDrawElementsBaseVertex bound by index type?

(Asked by: username_0 on 2023-08-24)

With `glMultiDrawElementsBaseVertex` it becomes possible to render multiple sets of indices in one draw call. When using for instance `GL_UNSIGNED_SHORT` as the type of the indices is there still a restriction that only `MAX_UNSIGNED_SHORT` vertices can be rendered at a time? Or does the combination with multiple base vertices allow to exceed this number and allow for multiple sets of sub-draw calls provided that these do not exceed the `MAX_UNSIGNED_SHORT` restriction in relation to their base vertex?

So for instance given the following input to the command:

$\mathit{count} = [65535, 65535]$

$\mathit{indices} = [\mathit{indexOffset0}, \mathit{indexOffset1}]$

$\mathit{baseVertex} = [0, 65536]$

will the baseVertex offset (> `MAX_UNSIGNED_SHORT`) be correctly added to the index found at indexOffset1? I don't believe the specs raise anything about the types of indices used and the number of vertices referenced.

**Tags:** opengl


---

## 1 answers

### Answer by username_1 on 2023-08-28. Score: 2 | Accepted answer

> When using for instance `GL_UNSIGNED_SHORT` as the type of the indices is there still a restriction that only `MAX_UNSIGNED_SHORT` vertices can be rendered at a time

No such restriction has ever existed (and I checked old versions of the specification). The limitations on `count` have never been related to the size of the index type. The type of the indices only describes the type of the *indices*; how many indices are being used is specified by `count` and is unrelated to the type.


---

