ROOT logo
// @(#)root/gl:$Id: TGLRnrCtx.cxx 31671 2009-12-08 15:22:31Z matevz $
// Author:  Matevz Tadel, Feb 2007

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TVirtualX.h"
#include "TString.h"
#include "TROOT.h"

#include "TGLRnrCtx.h"
#include "TGLSceneInfo.h"
#include "TGLSelectBuffer.h"
#include "TGLIncludes.h"
#include "TGLUtil.h"
#include "TGLFontManager.h"
#include "TGLContext.h"

#include "TError.h"
#include "TMathBase.h"
#include "TMath.h"

#include <list>
#include <algorithm>
#include <cassert>

//______________________________________________________________________
//
// The TGLRnrCtx class aggregates data for a given redering context as
// needed by various parts of the ROOT's OpenGL infractructure. It
// serves as a connecting point between the steering part of the
// infrastructure (viewer, scene) and concrete rendering classes
// (logical, physical shape). It is just a data-holder, there is no
// functionality in it.
//
// Development notes:
//
// One RnrCtx is created by each viewer and it is just an extension of
// the viewer context that changes along the render
// descend. Separating this also has some abstract benefit of hiding
// viewer implementation from those that do not need to know it.
//
// Current scene / scene-info part is always initialized by viewer,
// scenes can assume they're ok.


ClassImp(TGLRnrCtx);

//______________________________________________________________________
TGLRnrCtx::TGLRnrCtx(TGLViewerBase* viewer) :
   fViewer    (viewer),
   fCamera    (0),
   fSceneInfo (0),

   fViewerLOD    (kLODUndef),
   fSceneLOD     (kLODUndef),
   fCombiLOD     (kLODUndef),
   fShapeLOD     (kLODUndef),

   fViewerStyle  (kStyleUndef),
   fSceneStyle   (kStyleUndef),

   fViewerWFLineW (0),
   fSceneWFLineW  (0),
   fViewerOLLineW (0),
   fSceneOLLineW  (0),

   fViewerClip   (0),
   fSceneClip    (0),
   fClip         (0),
   fDrawPass     (kPassUndef),

   fStopwatch    (),
   fRenderTimeOut(0.0),
   fIsRunning    (kFALSE),
   fHasTimedOut  (kFALSE),

   fHighlight    (kFALSE),  fHighlightOutline (kFALSE),
   fSelection    (kFALSE),  fSecSelection     (kFALSE),
   fPickRadius   (0),
   fPickRectangle(0),
   fSelectBuffer (0),

   fColorSetStack(0),
   fRenderScale  (1),

   fEventKeySym  (0),

   fDLCaptureOpen (kFALSE),
   fGLCtxIdentity (0),
   fQuadric       (0),

   fGrabImage     (kFALSE),
   fGrabBuffer    (-1),
   fGrabbedImage  (0)
{
   // Constructor.

   
   fColorSetStack = new lpTGLColorSet_t;
   fColorSetStack->push_back(0);

   fSelectBuffer = new TGLSelectBuffer;
   fQuadric = gluNewQuadric();
   gluQuadricOrientation(fQuadric, (GLenum)GLU_OUTSIDE);
   gluQuadricNormals    (fQuadric, (GLenum)GLU_SMOOTH);

   if (fViewer == 0)
   {
      // Assume external usage, initialize for highest quality.
      fViewerLOD = fSceneLOD = fCombiLOD = fShapeLOD = kLODHigh;
      fViewerStyle = fSceneStyle = kFill;
      fDrawPass = kPassFill;
   }
}

//______________________________________________________________________
TGLRnrCtx::~TGLRnrCtx()
{
   // Destructor.

   gluDeleteQuadric(fQuadric);
   delete fPickRectangle;
   delete fSelectBuffer;
   delete fColorSetStack;
}

//______________________________________________________________________
TGLSceneBase * TGLRnrCtx::GetScene()
{
   // Return current scene (based on scene-info data).

   return  fSceneInfo->GetScene();
}

//______________________________________________________________________
TGLSceneBase & TGLRnrCtx::RefScene()
{
   // Return current scene (based on scene-info data).

   return *fSceneInfo->GetScene();
}

/**************************************************************************/

//______________________________________________________________________
Bool_t TGLRnrCtx::IsDrawPassFilled() const
{
   // Returns true if current render-pass uses filled polygon style.

   return fDrawPass == kPassFill || fDrawPass == kPassOutlineFill;
}


/******************************************************************************/
// Stopwatch
/******************************************************************************/

//______________________________________________________________________________
void TGLRnrCtx:: StartStopwatch()
{
   // Start the stopwatch.

   if (fIsRunning)
      return;

   fStopwatch.Start();
   fIsRunning   = kTRUE;
   fHasTimedOut = kFALSE;
}

//______________________________________________________________________________
void TGLRnrCtx:: StopStopwatch()
{
   // Stop the stopwatch.

   fHasTimedOut = fStopwatch.End() > fRenderTimeOut;
   fIsRunning = kFALSE;
}

//______________________________________________________________________________
Bool_t TGLRnrCtx::HasStopwatchTimedOut()
{
   // Check if the stopwatch went beyond the render time limit.

   if (fHasTimedOut) return kTRUE;
   if (fIsRunning && fStopwatch.Lap() > fRenderTimeOut)
      fHasTimedOut = kTRUE;
   return fHasTimedOut;
}


/******************************************************************************/
// Selection & picking
/******************************************************************************/

//______________________________________________________________________________
void TGLRnrCtx::BeginSelection(Int_t x, Int_t y, Int_t r)
{
   // Setup context for running selection.
   // x and y are in window coordinates.

   fSelection    = kTRUE;
   fSecSelection = kFALSE;
   fPickRadius   = r;
   if (!fPickRectangle) fPickRectangle = new TGLRect;
   fPickRectangle->Set(x, y, r, r);

   glSelectBuffer(fSelectBuffer->GetBufSize(), fSelectBuffer->GetBuf());
}

//______________________________________________________________________________
void TGLRnrCtx::EndSelection(Int_t glResult)
{
   // End selection.

   fSelection    = kFALSE;
   fSecSelection = kFALSE;
   fPickRadius   = 0;
   delete fPickRectangle; fPickRectangle = 0;

   if (glResult < 0)
   {
      if (fSelectBuffer->CanGrow() && fSelectBuffer->GetBufSize() > 0x10000)
      {
         Warning("TGLRnrCtx::EndSelection",
                 "Select buffer size (%d) insufficient, doubling it.",
                 fSelectBuffer->GetBufSize());
         fSelectBuffer->Grow();
      }
      else
      {
         Warning("TGLRnrCtx::EndSelection",
                 "Select buffer size (%d) insufficient. This is maximum.",
                 fSelectBuffer->GetBufSize());
      }
   }
   fSelectBuffer->ProcessResult(glResult);
}

//______________________________________________________________________________
TGLRect * TGLRnrCtx::GetPickRectangle()
{
   // Return current pick rectangle. This is *zero* when
   // selection is not set.

   return fPickRectangle;
}

//______________________________________________________________________________
Int_t TGLRnrCtx::GetPickRadius()
{
   // Return pick radius. If selection is not active it returns 0.

   return fPickRadius;
}


/**************************************************************************/
// ColorSet access & management
/******************************************************************************/

//______________________________________________________________________________
void TGLRnrCtx::PushColorSet()
{
   // Create copy of current color-set on the top of the stack.

   fColorSetStack->push_back(new TGLColorSet(*fColorSetStack->back()));
}

//______________________________________________________________________________
TGLColorSet& TGLRnrCtx::ColorSet()
{
   // Return reference to current color-set (top of hte stack).

   return * fColorSetStack->back();
}

//______________________________________________________________________________
void TGLRnrCtx::PopColorSet()
{
   // Pops the top-most color-set.
   // If only one entry is available, error is printed and the entry remains.

   if (fColorSetStack->size() >= 2)
   {
      delete fColorSetStack->back();
      fColorSetStack->pop_back();
   }
   else
   {
      Error("PopColorSet()", "Attempting to remove the last entry.");
   }
}

//______________________________________________________________________________
TGLColorSet* TGLRnrCtx::ChangeBaseColorSet(TGLColorSet* set)
{
   // Change the default/bottom color-set.
   // Returns the previous color-set.

   TGLColorSet* old = fColorSetStack->front();
   fColorSetStack->front() = set;
   return old;
}

//______________________________________________________________________________
TGLColorSet* TGLRnrCtx::GetBaseColorSet()
{
   // Returns the current base color-set.

   return fColorSetStack->front();
}

//______________________________________________________________________________
void TGLRnrCtx::ColorOrForeground(Color_t col)
{
   // Set col if it is different from background, otherwise use
   // current foreground color.

   if (fColorSetStack->back()->Background().GetColorIndex() == col)
      TGLUtil::Color(fColorSetStack->back()->Foreground());
   else
      TGLUtil::Color(col);
}

/**************************************************************************/
// Display-list state
/******************************************************************************/

//______________________________________________________________________
void TGLRnrCtx::OpenDLCapture()
{
   // Start display-list capture.

   assert(fDLCaptureOpen == kFALSE);
   fDLCaptureOpen = kTRUE;
}

//______________________________________________________________________
void TGLRnrCtx::CloseDLCapture()
{
   // End display list capture.

   assert(fDLCaptureOpen == kTRUE);
   fDLCaptureOpen = kFALSE;
}


/******************************************************************************/
// TGLFont interface
/******************************************************************************/
//______________________________________________________________________
void TGLRnrCtx::ReleaseFont(TGLFont& font)
{
   // Release font in the GL rendering context.

   fGLCtxIdentity->GetFontManager()->ReleaseFont(font);
}

//______________________________________________________________________
void TGLRnrCtx::RegisterFontNoScale(Int_t size, Int_t file, Int_t mode, TGLFont& out)
{
   // Get font in the GL rendering context.

   fGLCtxIdentity->GetFontManager()->RegisterFont( size, file, (TGLFont::EMode)mode, out);
}

//______________________________________________________________________
void TGLRnrCtx::RegisterFontNoScale(Int_t size, const char* name, Int_t mode, TGLFont& out)
{
   // Get font in the GL rendering context.

   fGLCtxIdentity->GetFontManager()->RegisterFont(size, name, (TGLFont::EMode)mode, out);
}

//______________________________________________________________________
void TGLRnrCtx::RegisterFont(Int_t size, Int_t file, Int_t mode, TGLFont& out)
{
   // Get font in the GL rendering context.
   // The font is scaled relative to current render scale.

  RegisterFontNoScale(TMath::Nint(size*fRenderScale), file, mode, out);
}

//______________________________________________________________________
void TGLRnrCtx::RegisterFont(Int_t size, const char* name, Int_t mode, TGLFont& out)
{
   // Get font in the GL rendering context.
   // The font is scaled relative to current render scale.

  RegisterFontNoScale(TMath::Nint(size*fRenderScale), name, mode, out);
}

/**************************************************************************/
// Static helpers
/**************************************************************************/

//______________________________________________________________________________
const char* TGLRnrCtx::StyleName(Short_t style)
{
   // Return string describing the style.

   switch (style)
   {
      case TGLRnrCtx::kFill:       return "Filled Polys";
      case TGLRnrCtx::kWireFrame:  return "Wireframe";
      case TGLRnrCtx::kOutline:    return "Outline";
      default:                     return "Oogaa-dooga style";
   }
}
 TGLRnrCtx.cxx:1
 TGLRnrCtx.cxx:2
 TGLRnrCtx.cxx:3
 TGLRnrCtx.cxx:4
 TGLRnrCtx.cxx:5
 TGLRnrCtx.cxx:6
 TGLRnrCtx.cxx:7
 TGLRnrCtx.cxx:8
 TGLRnrCtx.cxx:9
 TGLRnrCtx.cxx:10
 TGLRnrCtx.cxx:11
 TGLRnrCtx.cxx:12
 TGLRnrCtx.cxx:13
 TGLRnrCtx.cxx:14
 TGLRnrCtx.cxx:15
 TGLRnrCtx.cxx:16
 TGLRnrCtx.cxx:17
 TGLRnrCtx.cxx:18
 TGLRnrCtx.cxx:19
 TGLRnrCtx.cxx:20
 TGLRnrCtx.cxx:21
 TG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cxx:142
 TGLRnrCtx.cxx:143
 TGLRnrCtx.cxx:144
 TGLRnrCtx.cxx:145
 TGLRnrCtx.cxx:146
 TGLRnrCtx.cxx:147
 TGLRnrCtx.cxx:148
 TGLRnrCtx.cxx:149
 TGLRnrCtx.cxx:150
 TGLRnrCtx.cxx:151
 TGLRnrCtx.cxx:152
 TGLRnrCtx.cxx:153
 TGLRnrCtx.cxx:154
 TGLRnrCtx.cxx:155
 TGLRnrCtx.cxx:156
 TGLRnrCtx.cxx:157
 TGLRnrCtx.cxx:158
 TGLRnrCtx.cxx:159
 TGLRnrCtx.cxx:160
 TGLRnrCtx.cxx:161
 TGLRnrCtx.cxx:162
 TGLRnrCtx.cxx:163
 TGLRnrCtx.cxx:164
 TGLRnrCtx.cxx:165
 TGLRnrCtx.cxx:166
 TGLRnrCtx.cxx:167
 TGLRnrCtx.cxx:168
 TGLRnrCtx.cxx:169
 TGLRnrCtx.cxx:170
 TGLRnrCtx.cxx:171
 TGLRnrCtx.cxx:172
 TGLRnrCtx.cxx:173
 TGLRnrCtx.cxx:174
 TGLRnrCtx.cxx:175
 TGLRnrCtx.cxx:176
 TGLRnrCtx.cxx:177
 TGLRnrCtx.cxx:178
 TGLRnrCtx.cxx:179
 TGLRnrCtx.cxx:180
 TGLRnrCtx.cxx:181
 TGLRnrCtx.cxx:182
 TGLRnrCtx.cxx:183
 TGLRnrCtx.cxx:184
 TGLRnrCtx.cxx:185
 TGLRnrCtx.cxx:186
 TGLRnrCtx.cxx:187
 TGLRnrCtx.cxx:188
 TGLRnrCtx.cxx:189
 TGLRnrCtx.cxx:190
 TGLRnrCtx.cxx:191
 TGLRnrCtx.cxx:192
 TGLRnrCtx.cxx:193
 TGLRnrCtx.cxx:194
 TGLRnrCtx.cxx:195
 TGLRnrCtx.cxx:196
 TGLRnrCtx.cxx:197
 TGLRnrCtx.cxx:198
 TGLRnrCtx.cxx:199
 TGLRnrCtx.cxx:200
 TGLRnrCtx.cxx:201
 TGLRnrCtx.cxx:202
 TGLRnrCtx.cxx:203
 TGLRnrCtx.cxx:204
 TGLRnrCtx.cxx:205
 TGLRnrCtx.cxx:206
 TGLRnrCtx.cxx:207
 TGLRnrCtx.cxx:208
 TGLRnrCtx.cxx:209
 TGLRnrCtx.cxx:210
 TGLRnrCtx.cxx:211
 TGLRnrCtx.cxx:212
 TGLRnrCtx.cxx:213
 TGLRnrCtx.cxx:214
 TGLRnrCtx.cxx:215
 TGLRnrCtx.cxx:216
 TGLRnrCtx.cxx:217
 TGLRnrCtx.cxx:218
 TGLRnrCtx.cxx:219
 TGLRnrCtx.cxx:220
 TGLRnrCtx.cxx:221
 TGLRnrCtx.cxx:222
 TGLRnrCtx.cxx:223
 TGLRnrCtx.cxx:224
 TGLRnrCtx.cxx:225
 TGLRnrCtx.cxx:226
 TGLRnrCtx.cxx:227
 TGLRnrCtx.cxx:228
 TGLRnrCtx.cxx:229
 TGLRnrCtx.cxx:230
 TGLRnrCtx.cxx:231
 TGLRnrCtx.cxx:232
 TGLRnrCtx.cxx:233
 TGLRnrCtx.cxx:234
 TGLRnrCtx.cxx:235
 TGLRnrCtx.cxx:236
 TGLRnrCtx.cxx:237
 TGLRnrCtx.cxx:238
 TGLRnrCtx.cxx:239
 TGLRnrCtx.cxx:240
 TGLRnrCtx.cxx:241
 TGLRnrCtx.cxx:242
 TGLRnrCtx.cxx:243
 TGLRnrCtx.cxx:244
 TGLRnrCtx.cxx:245
 TGLRnrCtx.cxx:246
 TGLRnrCtx.cxx:247
 TGLRnrCtx.cxx:248
 TGLRnrCtx.cxx:249
 TGLRnrCtx.cxx:250
 TGLRnrCtx.cxx:251
 TGLRnrCtx.cxx:252
 TGLRnrCtx.cxx:253
 TGLRnrCtx.cxx:254
 TGLRnrCtx.cxx:255
 TGLRnrCtx.cxx:256
 TGLRnrCtx.cxx:257
 TGLRnrCtx.cxx:258
 TGLRnrCtx.cxx:259
 TGLRnrCtx.cxx:260
 TGLRnrCtx.cxx:261
 TGLRnrCtx.cxx:262
 TGLRnrCtx.cxx:263
 TGLRnrCtx.cxx:264
 TGLRnrCtx.cxx:265
 TGLRnrCtx.cxx:266
 TGLRnrCtx.cxx:267
 TGLRnrCtx.cxx:268
 TGLRnrCtx.cxx:269
 TGLRnrCtx.cxx:270
 TGLRnrCtx.cxx:271
 TGLRnrCtx.cxx:272
 TGLRnrCtx.cxx:273
 TGLRnrCtx.cxx:274
 TGLRnrCtx.cxx:275
 TGLRnrCtx.cxx:276
 TGLRnrCtx.cxx:277
 TGLRnrCtx.cxx:278
 TGLRnrCtx.cxx:279
 TGLRnrCtx.cxx:280
 TGLRnrCtx.cxx:281
 TGLRnrCtx.cxx:282
 TGLRnrCtx.cxx:283
 TGLRnrCtx.cxx:284
 TGLRnrCtx.cxx:285
 TGLRnrCtx.cxx:286
 TGLRnrCtx.cxx:287
 TGLRnrCtx.cxx:288
 TGLRnrCtx.cxx:289
 TGLRnrCtx.cxx:290
 TGLRnrCtx.cxx:291
 TGLRnrCtx.cxx:292
 TGLRnrCtx.cxx:293
 TGLRnrCtx.cxx:294
 TGLRnrCtx.cxx:295
 TGLRnrCtx.cxx:296
 TGLRnrCtx.cxx:297
 TGLRnrCtx.cxx:298
 TGLRnrCtx.cxx:299
 TGLRnrCtx.cxx:300
 TGLRnrCtx.cxx:301
 TGLRnrCtx.cxx:302
 TGLRnrCtx.cxx:303
 TGLRnrCtx.cxx:304
 TGLRnrCtx.cxx:305
 TGLRnrCtx.cxx:306
 TGLRnrCtx.cxx:307
 TGLRnrCtx.cxx:308
 TGLRnrCtx.cxx:309
 TGLRnrCtx.cxx:310
 TGLRnrCtx.cxx:311
 TGLRnrCtx.cxx:312
 TGLRnrCtx.cxx:313
 TGLRnrCtx.cxx:314
 TGLRnrCtx.cxx:315
 TGLRnrCtx.cxx:316
 TGLRnrCtx.cxx:317
 TGLRnrCtx.cxx:318
 TGLRnrCtx.cxx:319
 TGLRnrCtx.cxx:320
 TGLRnrCtx.cxx:321
 TGLRnrCtx.cxx:322
 TGLRnrCtx.cxx:323
 TGLRnrCtx.cxx:324
 TGLRnrCtx.cxx:325
 TGLRnrCtx.cxx:326
 TGLRnrCtx.cxx:327
 TGLRnrCtx.cxx:328
 TGLRnrCtx.cxx:329
 TGLRnrCtx.cxx:330
 TGLRnrCtx.cxx:331
 TGLRnrCtx.cxx:332
 TGLRnrCtx.cxx:333
 TGLRnrCtx.cxx:334
 TGLRnrCtx.cxx:335
 TGLRnrCtx.cxx:336
 TGLRnrCtx.cxx:337
 TGLRnrCtx.cxx:338
 TGLRnrCtx.cxx:339
 TGLRnrCtx.cxx:340
 TGLRnrCtx.cxx:341
 TGLRnrCtx.cxx:342
 TGLRnrCtx.cxx:343
 TGLRnrCtx.cxx:344
 TGLRnrCtx.cxx:345
 TGLRnrCtx.cxx:346
 TGLRnrCtx.cxx:347
 TGLRnrCtx.cxx:348
 TGLRnrCtx.cxx:349
 TGLRnrCtx.cxx:350
 TGLRnrCtx.cxx:351
 TGLRnrCtx.cxx:352
 TGLRnrCtx.cxx:353
 TGLRnrCtx.cxx:354
 TGLRnrCtx.cxx:355
 TGLRnrCtx.cxx:356
 TGLRnrCtx.cxx:357
 TGLRnrCtx.cxx:358
 TGLRnrCtx.cxx:359
 TGLRnrCtx.cxx:360
 TGLRnrCtx.cxx:361
 TGLRnrCtx.cxx:362
 TGLRnrCtx.cxx:363
 TGLRnrCtx.cxx:364
 TGLRnrCtx.cxx:365
 TGLRnrCtx.cxx:366
 TGLRnrCtx.cxx:367
 TGLRnrCtx.cxx:368
 TGLRnrCtx.cxx:369
 TGLRnrCtx.cxx:370
 TGLRnrCtx.cxx:371
 TGLRnrCtx.cxx:372
 TGLRnrCtx.cxx:373
 TGLRnrCtx.cxx:374
 TGLRnrCtx.cxx:375
 TGLRnrCtx.cxx:376
 TGLRnrCtx.cxx:377
 TGLRnrCtx.cxx:378
 TGLRnrCtx.cxx:379
 TGLRnrCtx.cxx:380
 TGLRnrCtx.cxx:381
 TGLRnrCtx.cxx:382
 TGLRnrCtx.cxx:383
 TGLRnrCtx.cxx:384
 TGLRnrCtx.cxx:385
 TGLRnrCtx.cxx:386
 TGLRnrCtx.cxx:387
 TGLRnrCtx.cxx:388
 TGLRnrCtx.cxx:389
 TGLRnrCtx.cxx:390
 TGLRnrCtx.cxx:391
 TGLRnrCtx.cxx:392
 TGLRnrCtx.cxx:393
 TGLRnrCtx.cxx:394
 TGLRnrCtx.cxx:395
 TGLRnrCtx.cxx:396
 TGLRnrCtx.cxx:397
 TGLRnrCtx.cxx:398
 TGLRnrCtx.cxx:399
 TGLRnrCtx.cxx:400
 TGLRnrCtx.cxx:401
 TGLRnrCtx.cxx:402
 TGLRnrCtx.cxx:403
 TGLRnrCtx.cxx:404
 TGLRnrCtx.cxx:405
 TGLRnrCtx.cxx:406
 TGLRnrCtx.cxx:407
 TGLRnrCtx.cxx:408
 TGLRnrCtx.cxx:409
 TGLRnrCtx.cxx:410
 TGLRnrCtx.cxx:411
 TGLRnrCtx.cxx:412
 TGLRnrCtx.cxx:413
 TGLRnrCtx.cxx:414
 TGLRnrCtx.cxx:415
 TGLRnrCtx.cxx:416