OGLplus (0.52.0) a C++ wrapper for OpenGL

depth_test.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_CONTEXT_DEPTH_TEST_1201040722_HPP
14 #define OGLPLUS_CONTEXT_DEPTH_TEST_1201040722_HPP
15 
16 #include <oglplus/glfunc.hpp>
18 
19 namespace oglplus {
20 namespace context {
21 
23 
26 class DepthTest
27 {
28 public:
30 
34  static void DepthFunc(CompareFunction function)
35  {
36  OGLPLUS_GLFUNC(DepthFunc)(GLenum(function));
37  OGLPLUS_VERIFY_SIMPLE(DepthFunc);
38  }
39 
41 
47  {
48  GLint result;
49  OGLPLUS_GLFUNC(GetIntegerv)(GL_DEPTH_FUNC, &result);
50  OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
51  return CompareFunction(result);
52  }
53 };
54 
55 } // namespace context
56 } // namespace oglplus
57 
58 #endif // include guard
OpenGL test/comparison function enumeration.
Helper macro for optional checking of availability of GL function.
Wrapper for the depth-buffer-related operations.
Definition: depth_test.hpp:26
CompareFunction
Comparison function type enumeration.
Definition: compare_function.hpp:30
static CompareFunction DepthFunc(void)
Returns the depth comparison function.
Definition: depth_test.hpp:46
static void DepthFunc(CompareFunction function)
Sets the depth comparison function.
Definition: depth_test.hpp:34

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).