Fixed implementation of Visitor in hierarchy of Nodes.

This commit is contained in:
brunoherbelin
2020-04-03 23:10:23 +02:00
parent 91043a0c67
commit f071a49187
12 changed files with 426 additions and 194 deletions

View File

@@ -1,11 +1,35 @@
#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
#include "Scene.h"
class FrameBuffer {
class FrameBuffer
{
public:
FrameBuffer();
FrameBuffer(uint width, uint height, bool useDepthBuffer = false);
~FrameBuffer();
// bind the FrameBuffer as current to draw into
void bind();
// releases the framebuffer object
static void release();
// blit copy to another, returns true on success
bool blit(FrameBuffer *other);
inline uint width() const { return width_; }
inline uint height() const { return height_; }
inline uint texture() const { return textureid_; }
float aspectRatio() const;
private:
void checkFramebufferStatus();
uint width_;
uint height_;
uint textureid_;
uint framebufferid_;
};
#endif // FRAMEBUFFER_H
#endif // FRAMEBUFFER_H