Advertisement

Direct3D 11 Depth Testing

Started by March 16, 2020 10:39 PM
1 comment, last by peter1745 4 years, 10 months ago

So, I'm wondering how you enable depth testing in Direct3D 11?

Basically “glEnable(GL_DEPTH_TEST)” for Direct3D 11. I've been messing about with depth buffers for an hour now and I can't figure it out. What I'm trying to achieve is preventing say, the back vertices of a cube rendering on top of the front vertices.

Nevermind! I figured it out. Turns out I didn't need to mess with the depth buffer, I just needed to create and set a Rasterizer state and set the cull mode to fix the issue.

This topic is closed to new replies.

Advertisement