MeshLib
 
Loading...
Searching...
No Matches
MRSceneTextureGL.h
Go to the documentation of this file.
1#pragma once
2#include "MRRenderGLHelpers.h"
3
4namespace MR
5{
6// Class for rendering 3d scene into texture
8{
9public:
10 // binds this framebuffer as main rendering target
11 // clears it if `clear` flag is set
12 void bind( bool clear );
13 // binds default framebuffer (and read/draw framebuffers)
14 void unbind();
15 // if present-> del();gen();
16 // otherwise just gen()
17 // msaaPow - 2^msaaPow samples, msaaPow < 0 - use same default amount of samples
18 void reset( const Vector2i& size, int msaaPow );
19 // copy texture so draw() can render it
21 // renders texture
22 void draw();
23 // return true if texture is bound
24 bool isBound() const { return isBound_; }
25private:
28 bool isBound_{ false };
29};
30
31}
Definition MRRenderGLHelpers.h:199
Definition MRRenderGLHelpers.h:236
Definition MRSceneTextureGL.h:8
void reset(const Vector2i &size, int msaaPow)
void bind(bool clear)
bool isBound() const
Definition MRSceneTextureGL.h:24
Definition MRCameraOrientationPlugin.h:7
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:32