MeshLib Documentation
Loading...
Searching...
No Matches
MRSceneTextureGL.h
Go to the documentation of this file.
1
#pragma once
2
#include "
MRRenderGLHelpers.h
"
3
4
namespace
MR
5
{
6
// Class for rendering 3d scene into texture
7
class
SceneTextureGL
8
{
9
public
:
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
20
void
copyTexture
();
21
// renders texture
22
void
draw
();
23
// return true if texture is bound
24
bool
isBound
()
const
{
return
isBound_; }
25
private
:
26
FramebufferData
fd_;
27
QuadTextureVertexObject
qt_;
28
bool
isBound_{
false
};
29
};
30
31
}
MRRenderGLHelpers.h
MR::FramebufferData
Definition
MRRenderGLHelpers.h:199
MR::QuadTextureVertexObject
Definition
MRRenderGLHelpers.h:236
MR::SceneTextureGL
Definition
MRSceneTextureGL.h:8
MR::SceneTextureGL::copyTexture
void copyTexture()
MR::SceneTextureGL::unbind
void unbind()
MR::SceneTextureGL::reset
void reset(const Vector2i &size, int msaaPow)
MR::SceneTextureGL::draw
void draw()
MR::SceneTextureGL::bind
void bind(bool clear)
MR::SceneTextureGL::isBound
bool isBound() const
Definition
MRSceneTextureGL.h:24
MR
Definition
MRCameraOrientationPlugin.h:8
MR::size
ImVec2 size(const ViewportRectangle &rect)
Definition
MRViewport.h:32
MeshLib
source
MRViewer
MRSceneTextureGL.h
Generated by
1.11.0