#include "FWTGLViewer.h"
Description: [one line class summary]
Usage: <usage>
Definition at line 32 of file FWTGLViewer.h.
◆ FWTGLViewer() [1/2]
FWTGLViewer::FWTGLViewer |
( |
const TGWindow * |
parent | ) |
|
◆ ~FWTGLViewer()
FWTGLViewer::~FWTGLViewer |
( |
| ) |
|
|
override |
◆ FWTGLViewer() [2/2]
◆ DrawHiLod()
void FWTGLViewer::DrawHiLod |
( |
Bool_t |
swap_buffers | ) |
|
Definition at line 68 of file FWTGLViewer.cc.
72 if ((!fGLWidget && fGLDevice == -1) || (fGLWidget && !fGLWidget->IsMapped())) {
77 if (!TakeLock(kDrawLock)) {
80 Error(
"FWTGLViewer::DrawHiLodNoSwap",
"viewer locked - skipping this draw.");
81 fRedrawTimer->RequestDraw(100, TGLRnrCtx::kLODHigh);
85 fLOD = TGLRnrCtx::kLODHigh;
◆ GenerateFbo()
TGLFBO * FWTGLViewer::GenerateFbo |
( |
Int_t |
w, |
|
|
Int_t |
h, |
|
|
Float_t |
pixel_object_scale |
|
) |
| |
Definition at line 140 of file FWTGLViewer.cc.
143 static const TString eh(
"FWTGLViewer::SavePictureUsingFBO");
145 if (!GLEW_EXT_framebuffer_object) {
146 ::Warning(eh,
"Missing FBO support.");
149 if (!TakeLock(kDrawLock)) {
150 ::Error(eh,
"viewer locked - try later.");
154 TUnlocker ulck(
this);
158 if (
m_fbo ==
nullptr) {
159 m_fbo =
new TGLFBO();
163 m_fbo->Init(
w,
h, fGLWidget->GetPixelFormat()->GetSamples());
164 }
catch (std::runtime_error& exc) {
175 TGLRect old_vp(fViewport);
176 SetViewport(0, 0,
w,
h);
178 Float_t old_scale = 1;
179 if (pixel_object_scale != 0) {
180 old_scale = fRnrCtx->GetRenderScale();
181 fRnrCtx->SetRenderScale(old_scale * pixel_object_scale);
186 fLOD = TGLRnrCtx::kLODHigh;
187 fRnrCtx->SetGrabImage(kTRUE);
191 fRnrCtx->SetGrabImage(kFALSE);
195 if (pixel_object_scale != 0) {
196 fRnrCtx->SetRenderScale(old_scale);
References h, m_fbo, m_fbo_h, m_fbo_w, and w.
Referenced by MakeFbo(), MakeFboHeight(), MakeFboScale(), and MakeFboWidth().
◆ JustSwap()
void FWTGLViewer::JustSwap |
( |
| ) |
|
◆ MakeFbo()
TGLFBO * FWTGLViewer::MakeFbo |
( |
| ) |
|
◆ MakeFboHeight()
TGLFBO * FWTGLViewer::MakeFboHeight |
( |
Int_t |
height, |
|
|
Bool_t |
pixel_object_scale = kTRUE |
|
) |
| |
◆ MakeFboScale()
TGLFBO * FWTGLViewer::MakeFboScale |
( |
Float_t |
scale, |
|
|
Bool_t |
pixel_object_scale = kTRUE |
|
) |
| |
◆ MakeFboWidth()
TGLFBO * FWTGLViewer::MakeFboWidth |
( |
Int_t |
width, |
|
|
Bool_t |
pixel_object_scale = kTRUE |
|
) |
| |
◆ operator=()
◆ m_fbo
TGLFBO* FWTGLViewer::m_fbo |
|
private |
◆ m_fbo_h
◆ m_fbo_w