Logo ROOT  
Reference Guide
TGWin32GL.h
Go to the documentation of this file.
1// @(#)root/win32gdk:$Id$
2// Author: Valeriy Onuchin 05/08/04
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGWin32GL
13#define ROOT_TGWin32GL
14
15
16#include "TVirtualGL.h"
17#include "TVirtualViewer3D.h"
18
19
21private:
22 class TGWin32GLImpl;
23 TGWin32GLImpl *fPimpl;
24
25public:
28
29 //All public functions are TGLManager's final-overriders
30
31 //index returned can be used as a result of gVirtualX->InitWindow
33 //winInd is the index, returned by InitGLWindow
35
36 //[ Off-screen rendering part
37 //create DIB section to read GL buffer into it,
38 //ctxInd is the index, returned by CreateGLContext
41 //analog of gVirtualX->SelectWindow(fPixmapID) => gVirtualGL->SelectOffScreenDevice(fPixmapID)
42 void SelectOffScreenDevice(Int_t devInd);
43 //Index of DIB, valid for gVirtualX
45 //copy DIB into window directly/by pad
46 void MarkForDirectCopy(Int_t devInd, Bool_t);
47 //Off-screen device holds sizes for glViewport
48 void ExtractViewport(Int_t devInd, Int_t *vp);
49 //Read GL buffer into DIB
50 void ReadGLBuffer(Int_t devInd);
51 //]
52
53 //Make the gl context current
54 Bool_t MakeCurrent(Int_t devInd);
55 //Swap buffers or "blits" DIB
56 void Flush(Int_t ctxInd);
57 //Generic function for gl context and off-screen device deletion
58 void DeleteGLContext(Int_t devInd);
59
60 //functions to switch between threads in win32
61 //used by viewer
62 Bool_t SelectManip(TVirtualGLManip *manip, const TGLCamera *camera, const TGLRect *rect, const TGLBoundingBox *sceneBox);
63
65 char *GetPlotInfo(TVirtualGLPainter *plot, Int_t px, Int_t py);
66
70
72
73private:
74 struct TGLContext;
75 Bool_t CreateDIB(TGLContext &ctx)const;
76
79
81};
82
83#endif
Handle_t Window_t
Definition: GuiTypes.h:28
#define h(i)
Definition: RSha256.hxx:106
#define ClassDef(name, id)
Definition: Rtypes.h:322
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition: TGLCamera.h:43
TGLContext(TGLWidget *glWidget, Bool_t shareDefault=kTRUE, const TGLContext *shareList=0)
TGLContext ctor "from" TGLWidget.
Definition: TGLContext.cxx:51
Viewport (pixel base) 2D rectangle class.
Definition: TGLUtil.h:421
Int_t InitGLWindow(Window_t winID)
Definition: TGWin32GL.cxx:244
Int_t CreateGLContext(Int_t winInd)
winInd is TGWin32 index, returned by previous call gGLManager->InitGLWindow returns descripto (index)...
Definition: TGWin32GL.cxx:253
Bool_t ResizeOffScreenDevice(Int_t devInd, Int_t x, Int_t y, UInt_t w, UInt_t h)
Create new DIB if needed.
Definition: TGWin32GL.cxx:352
void Flush(Int_t ctxInd)
Definition: TGWin32GL.cxx:421
Bool_t PlotSelected(TVirtualGLPainter *plot, Int_t px, Int_t py)
Definition: TGWin32GL.cxx:514
void PaintSingleObject(TVirtualGLPainter *)
Definition: TGWin32GL.cxx:486
void PrintViewer(TVirtualViewer3D *vv)
Definition: TGWin32GL.cxx:493
Bool_t CreateDIB(TGLContext &ctx) const
Create DIB section to read GL buffer into.
Definition: TGWin32GL.cxx:303
Int_t GetVirtualXInd(Int_t devInd)
Definition: TGWin32GL.cxx:406
void PanObject(TVirtualGLPainter *o, Int_t x, Int_t y)
Definition: TGWin32GL.cxx:507
void DeleteGLContext(Int_t devInd)
Definition: TGWin32GL.cxx:450
void ExtractViewport(Int_t devInd, Int_t *vp)
Definition: TGWin32GL.cxx:472
void SelectOffScreenDevice(Int_t devInd)
Definition: TGWin32GL.cxx:378
TGWin32GLManager(const TGWin32GLManager &)
TGWin32GLImpl * fPimpl
Definition: TGWin32GL.h:22
void MarkForDirectCopy(Int_t devInd, Bool_t)
Definition: TGWin32GL.cxx:385
Bool_t MakeCurrent(Int_t devInd)
Definition: TGWin32GL.cxx:413
void ReadGLBuffer(Int_t devInd)
Definition: TGWin32GL.cxx:393
Bool_t AttachOffScreenDevice(Int_t ctxInd, Int_t x, Int_t y, UInt_t w, UInt_t h)
Definition: TGWin32GL.cxx:336
Bool_t HighColorFormat(Int_t ctx)
Definition: TGWin32GL.cxx:528
char * GetPlotInfo(TVirtualGLPainter *plot, Int_t px, Int_t py)
Definition: TGWin32GL.cxx:521
Bool_t SelectManip(TVirtualGLManip *manip, const TGLCamera *camera, const TGLRect *rect, const TGLBoundingBox *sceneBox)
Definition: TGWin32GL.cxx:500
TGWin32GLManager & operator=(const TGWin32GLManager &)
Abstract 3D shapes viewer.
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17