All Classes Files Functions Variables Typedefs Pages
PrimitiveProcessing.hpp
1 #pragma once
2 
3 #include "Program.fpp"
4 #include <cstdint>
5 
6 namespace lumina {
7 
8 enum class FaceOrder : uint8_t {
9  ClockWise, CounterClockWise
10 };
11 
12 enum class CullFace : uint8_t {
13  Front, Back, FrontAndBack
14 };
15 
16 namespace constants {
17  constexpr FaceOrder DefaultFrontFace = FaceOrder::CounterClockWise;
18  constexpr CullFace DefaultCullFace = CullFace::Back;
19  constexpr bool DefaultCullEnable = false;
20 }
21 
23 public:
25 
26  void enableCulling(bool enable = true);
27  void setFrontFace(FaceOrder order);
28  void setCullFace(CullFace face);
29 
30 private:
31  FaceOrder m_frontFace;
32  CullFace m_cullFace;
33  bool m_cullEnable;
34 
35  void bindStage();
36  void unbindStage();
37 
38  friend Program;
39 };
40 
41 } // namespace lumina
42 
43 #include "PrimitiveProcessing.tpp"
Represents the configuration of an OpenGL pipeline.
Definition: Program.hpp:27
Definition: PrimitiveProcessing.hpp:22