<p>If depth testing is disabled, the triangles get drawn in the order they're submitted, i.e. the order they appear in the index buffer or vertex buffer. Later ones will overwrite earlier ones, or blend over them if blending is enabled. This ordering is guaranteed by all GPUs and APIs as far as I know.</p>

CC BY-SA 3.0
2016-09-02T22:01:12.723Z
2016-09-02T22:01:12.723Z
Nathan Reed
<p>In my simulation I draw a bunch of rectangles with GL_TRIANGLE_STRIP inside of one draw call.</p>

<p>What will happen if I turn off GL_DEPTH_SORT? If all of the rectangles were stacked on top of themselves in a 2D screenspace sense would they always be in the same order?</p>

<p>I'm assuming it's just like when you do multiple draw calls (the first one is in back, the last one is in front) how it essentially just draws over what was previously drawn.</p>

<p>I am using OpenglES 2.0.</p>

<p>Also what happens with blend modes? Let's say I am doing additive blending, and then multiply the colors by 0.5 making them transparent. Would additive blending work?</p>

<depth-map>
What happens when GL_Depth is disabled
J.Doe
# What happens when GL_Depth is disabled

(Asked by: username_0 on 2016-09-02)

In my simulation I draw a bunch of rectangles with GL\_TRIANGLE\_STRIP inside of one draw call.

What will happen if I turn off GL\_DEPTH\_SORT? If all of the rectangles were stacked on top of themselves in a 2D screenspace sense would they always be in the same order?

I'm assuming it's just like when you do multiple draw calls (the first one is in back, the last one is in front) how it essentially just draws over what was previously drawn.

I am using OpenglES 2.0.

Also what happens with blend modes? Let's say I am doing additive blending, and then multiply the colors by 0.5 making them transparent. Would additive blending work?

**Tags:** depth-map


---

## 1 answers

### Answer by username_1 on 2016-09-02. Score: 5 | Accepted answer

If depth testing is disabled, the triangles get drawn in the order they're submitted, i.e. the order they appear in the index buffer or vertex buffer. Later ones will overwrite earlier ones, or blend over them if blending is enabled. This ordering is guaranteed by all GPUs and APIs as far as I know.


---

