Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOTOpenGLView.h
Go to the documentation of this file.
1// @(#)root/graf2d:$Id$
2// Author: Timur Pocheptsov 26/04/2012
3
4/*************************************************************************
5 * Copyright (C) 1995-2012, 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_ROOTOpenGLView
13#define ROOT_ROOTOpenGLView
14
15#include "QuartzWindow.h"
16
17///////////////////////////////////////////
18// //
19// OpenGL view's class. //
20// //
21///////////////////////////////////////////
22
24@private
25 // Explicit i-vars are required for 32-bit build.
26 NSOpenGLContext *fOpenGLContext;
28 //
29 NSOpenGLPixelFormat *fPixelFormat;
30}
31
32- (id) initWithFrame : (NSRect) frameRect pixelFormat : (NSOpenGLPixelFormat *) format;
33- (void) dealloc;
34
35//GL-view does not own GL-context, different GL contexts can be attached to the same view
36//(though ROOT never does this). View has to know about GL-context only to notify it about
37//geometry changes (calls -update method) and to clear drawable in a -dealloc method.
38
39@property (nonatomic, retain) NSOpenGLContext *fOpenGLContext;
40
41//ROOT's GL uses pixel format (TGLFormat class) when TGLWidget is
42//created, after that, pixel format never changed (though I can do
43//this with ROOTOpenGLView, there is no interface in ROOT's GL code for this).
44//So, pixel format is a property of ROOTOpenGLView. GL-view owns pixel format,
45//it can also be reset externally (again, GL module never does this).
46//Later, when creating GL-context, this pixel format is used (and
47//ROOT creates GL-context per GL-widget, thus using pixel format from a widget.
48
49- (NSOpenGLPixelFormat *) pixelFormat;
50- (void) setPixelFormat : (NSOpenGLPixelFormat *) pixelFormat;
51
52//View's geometry is updated by ROOT's GUI, but view
53//can be hidden at the moment (for example, tab with GL-view is not active
54//at the moment). If so, when view is visible again, context must
55//be notified about changes in a drawable's geometry.
56@property (nonatomic, assign) BOOL fUpdateContext;
57
58- (BOOL) fIsOpenGLWidget;
59
60//X11Window protocol.
61
62@property (nonatomic, retain) QuartzPixmap *fBackBuffer;//nil.
63
64- (void) mapWindow;
65- (void) mapSubwindows;
66- (void) configureNotifyTree;
67- (BOOL) fIsOverlapped;
68- (void) setOverlapped : (BOOL) overlap;
69
70@end
71
72namespace ROOT {
73namespace MacOSX {
74namespace OpenGL {
75
77
78}
79}
80}
81
82#endif
XFontStruct * id
Definition TGX11.cxx:109
typedef void((*Func_t)())
NSOpenGLContext * fOpenGLContext
NSOpenGLPixelFormat * fPixelFormat
bool GLViewIsValidDrawable(ROOTOpenGLView *glView)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...