Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_state.cc')
-rw-r--r--source/blender/gpu/intern/gpu_state.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc
index 2c09773e8f5..1be3b06fa34 100644
--- a/source/blender/gpu/intern/gpu_state.cc
+++ b/source/blender/gpu/intern/gpu_state.cc
@@ -74,10 +74,9 @@ void GPU_provoking_vertex(eGPUProvokingVertex vert)
SET_IMMUTABLE_STATE(provoking_vert, vert);
}
-/* TODO explicit depth test. */
-void GPU_depth_test(bool enable)
+void GPU_depth_test(eGPUDepthTest test)
{
- SET_IMMUTABLE_STATE(depth_test, (enable) ? GPU_DEPTH_LESS_EQUAL : GPU_DEPTH_NONE);
+ SET_IMMUTABLE_STATE(depth_test, test);
}
void GPU_line_smooth(bool enable)
@@ -240,10 +239,10 @@ eGPUWriteMask GPU_write_mask_get()
return (eGPUWriteMask)state.write_mask;
}
-bool GPU_depth_test_enabled()
+eGPUDepthTest GPU_depth_test_get()
{
GPUState &state = GPU_context_active_get()->state_manager->state;
- return state.depth_test != GPU_DEPTH_NONE;
+ return (eGPUDepthTest)state.depth_test;
}
void GPU_scissor_get(int coords[4])