D3d set depth

Explanation
When you are drawing multiple primitives in code, you may want to draw something at a particular depth. You can use this function to temporarily set the depth for drawing to the value you assign.

Example
d3d_set_depth(100); // to draw 2 floors very close to each other d3d_draw_floor(x, y, z, x+32, y+32, z, texture, 1, 1) d3d_set_depth(depth-1) d3d_draw_floor(x, y, z+1, x+32, y+32, z+1, texture, 1, 1)

Be aware that at the moment a new instance is drawn the depth is again set to the depth of that instance.