TDME2  1.9.200
BRDFLUTShader.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <tdme/tdme.h>
7 
10 
11 /**
12  * BRDFLUT render shader
13  * @author Andreas Drewke
14  */
16 {
17 
18 private:
19  static constexpr int BRDFLUT_WIDTH { 1024 };
20  static constexpr int BRDFLUT_HEIGHT { 1024 };
21 
22  Renderer* renderer { nullptr };
23  int32_t vertexShaderId { -1 };
24  int32_t fragmentShaderId { -1 };
25  int32_t programId { -1 };
26  int32_t colorBufferTextureId { 0 };
27  int32_t frameBufferId { -1 };
28  bool initialized { false };
29 
30 public:
31  // forbid class copy
33 
34  /**
35  * Public constructor
36  * @param renderer renderer
37  */
39 
40  /**
41  * Public destructor
42  */
44 
45  /**
46  * @return if initialized and ready to use
47  */
48  bool isInitialized();
49 
50  /**
51  * Initialize
52  */
53  void initialize();
54 
55  /**
56  * Generate
57  */
58  void generate();
59 
60  /**
61  * @return color texture id
62  */
63  inline int32_t getColorTextureId() override {
64  return colorBufferTextureId;
65  }
66 };
BRDFLUTShader(Renderer *renderer)
Public constructor.
Color texture interface.
Definition: ColorTexture.h:13
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6