TDME2  1.9.200
ObjectNodeRenderer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
5 #include <tdme/tdme.h>
6 #include <tdme/engine/fwd-tdme.h>
13 
14 using std::vector;
15 
21 
22 /**
23  * Object node VBO renderer
24  * @author Andreas Drewke
25  */
27 {
28  friend class EntityRenderer;
29  friend class tdme::engine::Object;
32 
33 private:
34  ObjectNode* objectNode { nullptr };
39  vector<int32_t>* vboBaseIds { nullptr };
40  vector<int32_t>* vboNormalMappingIds { nullptr };
41  vector<int32_t>* vboOrigins { nullptr };
42  vector<int32_t>* vboLods { nullptr };
43  bool haveVBOs { false };
44 
45 public:
46  // forbid class copy
48 
49  /**
50  * Constructor
51  * @param objectNode object node
52  */
54 
55  /**
56  * @return if preRender call is required
57  */
58  inline bool needsPreRender() {
59  return haveVBOs == false || objectNode->mesh->hasRecreatedBuffers() == true || objectNode->mesh->node->hasUpdate();
60  }
61 
62  /**
63  * Pre render step like uploading VBOs and such
64  * @param contextIdx context index
65  */
66  void preRender(int contextIdx);
67 
68  /**
69  * Disposes the object node
70  */
71  void dispose();
72 
73 };
Object to be used with engine class.
Definition: Object.h:60
Object node mesh specifically for rendering.
void preRender(int contextIdx)
Pre render step like uploading VBOs and such.
Object node specifically for rendering.
Definition: ObjectNode.h:41
Interface to compute shader skinning shader program.
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6