OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Camera.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSG_CAMERA
15 #define OSG_CAMERA 1
16 
17 #include <osg/Transform>
18 #include <osg/Viewport>
19 #include <osg/ColorMask>
20 #include <osg/CullSettings>
21 #include <osg/Texture>
22 #include <osg/Image>
23 #include <osg/GraphicsContext>
24 #include <osg/Stats>
25 
26 #include <OpenThreads/Mutex>
27 
28 
29 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
30  #define GL_FRONT_LEFT 0x0400
31  #define GL_FRONT_RIGHT 0x0401
32  #define GL_BACK_LEFT 0x0402
33  #define GL_BACK_RIGHT 0x0403
34 #endif
35 
36 namespace osg {
37 
38 // forward declare View to allow Camera to point back to the View that its within
39 class View;
40 class RenderInfo;
41 
44 class OSG_EXPORT Camera : public Transform, public CullSettings
45 {
46  public :
47 
48 
49  Camera();
50 
52  Camera(const Camera&,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
53 
55 
56  virtual Camera* asCamera() { return this; }
57  virtual const Camera* asCamera() const { return this; }
58 
60  void setView(View* view) { _view = view; }
61 
63  View* getView() { return _view; }
64 
66  const View* getView() const { return _view; }
67 
68 
71  void setStats(osg::Stats* stats) { _stats = stats; }
72 
74  osg::Stats* getStats() { return _stats.get(); }
75 
77  const osg::Stats* getStats() const { return _stats.get(); }
78 
79 
82  void setAllowEventFocus(bool focus) { _allowEventFocus = focus; }
83 
86  bool getAllowEventFocus() const { return _allowEventFocus; }
87 
88 
90  void setDisplaySettings(osg::DisplaySettings* ds) { _displaySettings = ds; }
91 
93  osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); }
94 
96  const osg::DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); }
97 
98 
101  inline void setClearMask(GLbitfield mask) { _clearMask = mask; applyMaskAction(CLEAR_MASK); }
102 
104  inline GLbitfield getClearMask() const { return _clearMask; }
105 
108  void setClearColor(const osg::Vec4& color) { _clearColor=color; applyMaskAction(CLEAR_COLOR); }
109 
111  const osg::Vec4& getClearColor() const { return _clearColor; }
112 
115  void setClearAccum(const osg::Vec4& color) { _clearAccum=color; }
116 
118  const osg::Vec4& getClearAccum() const { return _clearAccum; }
119 
122  void setClearDepth(double depth) { _clearDepth=depth; }
123 
125  double getClearDepth() const { return _clearDepth; }
126 
129  void setClearStencil(int stencil) { _clearStencil=stencil; }
130 
132  int getClearStencil() const { return _clearStencil; }
133 
134 
136  void setColorMask(osg::ColorMask* colorMask);
137 
138 
140  void setColorMask(bool red, bool green, bool blue, bool alpha);
141 
143  const ColorMask* getColorMask() const { return _colorMask.get(); }
144 
146  ColorMask* getColorMask() { return _colorMask.get(); }
147 
148 
150  void setViewport(osg::Viewport* viewport);
151 
153  void setViewport(int x,int y,int width,int height);
154 
156  const Viewport* getViewport() const { return _viewport.get(); }
157 
159  Viewport* getViewport() { return _viewport.get(); }
160 
161 
162 
164  {
166  POST_MULTIPLY
167  };
168 
170  void setTransformOrder(TransformOrder order) { _transformOrder = order; }
171 
173  TransformOrder getTransformOrder() const { return _transformOrder; }
174 
176  {
179  VERTICAL
181  };
182 
184  inline void setProjectionResizePolicy(ProjectionResizePolicy policy) { _projectionResizePolicy = policy; }
185 
187  inline ProjectionResizePolicy getProjectionResizePolicy() const { return _projectionResizePolicy; }
188 
189 
191  inline void setProjectionMatrix(const osg::Matrixf& matrix) { _projectionMatrix.set(matrix); }
192 
194  inline void setProjectionMatrix(const osg::Matrixd& matrix) { _projectionMatrix.set(matrix); }
195 
197  void setProjectionMatrixAsOrtho(double left, double right,
198  double bottom, double top,
199  double zNear, double zFar);
200 
202  void setProjectionMatrixAsOrtho2D(double left, double right,
203  double bottom, double top);
204 
206  void setProjectionMatrixAsFrustum(double left, double right,
207  double bottom, double top,
208  double zNear, double zFar);
209 
212  void setProjectionMatrixAsPerspective(double fovy,double aspectRatio,
213  double zNear, double zFar);
214 
216  osg::Matrixd& getProjectionMatrix() { return _projectionMatrix; }
217 
219  const osg::Matrixd& getProjectionMatrix() const { return _projectionMatrix; }
220 
223  bool getProjectionMatrixAsOrtho(double& left, double& right,
224  double& bottom, double& top,
225  double& zNear, double& zFar) const;
226 
229  bool getProjectionMatrixAsFrustum(double& left, double& right,
230  double& bottom, double& top,
231  double& zNear, double& zFar) const;
232 
238  bool getProjectionMatrixAsPerspective(double& fovy,double& aspectRatio,
239  double& zNear, double& zFar) const;
240 
241 
242 
244  inline void setViewMatrix(const osg::Matrixf& matrix) { _viewMatrix.set(matrix); dirtyBound();}
245 
247  inline void setViewMatrix(const osg::Matrixd& matrix) { _viewMatrix.set(matrix); dirtyBound();}
248 
250  osg::Matrixd& getViewMatrix() { return _viewMatrix; }
251 
253  const osg::Matrixd& getViewMatrix() const { return _viewMatrix; }
254 
256  void setViewMatrixAsLookAt(const osg::Vec3d& eye,const osg::Vec3d& center,const osg::Vec3d& up);
257 
259  void getViewMatrixAsLookAt(osg::Vec3d& eye,osg::Vec3d& center,osg::Vec3d& up,double lookDistance=1.0) const;
260 
262  void getViewMatrixAsLookAt(osg::Vec3f& eye,osg::Vec3f& center,osg::Vec3f& up,float lookDistance=1.0f) const;
263 
265  Matrixd getInverseViewMatrix() const;
266 
267 
269  {
272  POST_RENDER
273  };
274 
278  void setRenderOrder(RenderOrder order, int orderNum = 0) { _renderOrder = order; _renderOrderNum = orderNum; }
279 
281  RenderOrder getRenderOrder() const { return _renderOrder; }
282 
284  int getRenderOrderNum() const { return _renderOrderNum; }
285 
287  bool isRenderToTextureCamera() const;
288 
290  {
295  SEPARATE_WINDOW
296  };
297 
299  void setRenderTargetImplementation(RenderTargetImplementation impl);
300 
302  void setRenderTargetImplementation(RenderTargetImplementation impl, RenderTargetImplementation fallback);
303 
305  RenderTargetImplementation getRenderTargetImplementation() const { return _renderTargetImplementation; }
306 
308  RenderTargetImplementation getRenderTargetFallback() const { return _renderTargetFallback; }
309 
310 
313  void setDrawBuffer(GLenum buffer) { _drawBuffer = buffer; applyMaskAction( DRAW_BUFFER ); }
314 
316  GLenum getDrawBuffer() const { return _drawBuffer; }
317 
320  void setReadBuffer(GLenum buffer) { _readBuffer = buffer; applyMaskAction( READ_BUFFER ); }
321 
323  GLenum getReadBuffer() const { return _readBuffer; }
324 
326  {
332  COLOR_BUFFER1 = COLOR_BUFFER0+1,
333  COLOR_BUFFER2 = COLOR_BUFFER0+2,
334  COLOR_BUFFER3 = COLOR_BUFFER0+3,
335  COLOR_BUFFER4 = COLOR_BUFFER0+4,
336  COLOR_BUFFER5 = COLOR_BUFFER0+5,
337  COLOR_BUFFER6 = COLOR_BUFFER0+6,
338  COLOR_BUFFER7 = COLOR_BUFFER0+7,
339  COLOR_BUFFER8 = COLOR_BUFFER0+8,
340  COLOR_BUFFER9 = COLOR_BUFFER0+9,
341  COLOR_BUFFER10 = COLOR_BUFFER0+10,
342  COLOR_BUFFER11 = COLOR_BUFFER0+11,
343  COLOR_BUFFER12 = COLOR_BUFFER0+12,
344  COLOR_BUFFER13 = COLOR_BUFFER0+13,
345  COLOR_BUFFER14 = COLOR_BUFFER0+14,
346  COLOR_BUFFER15 = COLOR_BUFFER0+15
347  };
348 
349  static const unsigned int FACE_CONTROLLED_BY_GEOMETRY_SHADER;
350 
352  void attach(BufferComponent buffer, GLenum internalFormat);
353 
358  void attach(BufferComponent buffer, osg::Texture* texture, unsigned int level = 0, unsigned int face=0, bool mipMapGeneration=false,
359  unsigned int multisampleSamples = 0,
360  unsigned int multisampleColorSamples = 0);
361 
363  void attach(BufferComponent buffer, osg::Image* image,
364  unsigned int multisampleSamples = 0,
365  unsigned int multisampleColorSamples = 0);
366 
368  void detach(BufferComponent buffer);
369 
370  struct Attachment
371  {
373  _internalFormat(GL_NONE),
374  _level(0),
375  _face(0),
376  _mipMapGeneration(false),
377  _multisampleSamples(0),
378  _multisampleColorSamples(0) {}
379 
380  int width() const
381  {
382  if (_texture.valid()) return _texture->getTextureWidth();
383  if (_image.valid()) return _image->s();
384  return 0;
385  };
386 
387  int height() const
388  {
389  if (_texture.valid()) return _texture->getTextureHeight();
390  if (_image.valid()) return _image->t();
391  return 0;
392  };
393 
394  int depth() const
395  {
396  if (_texture.valid()) return _texture->getTextureDepth();
397  if (_image.valid()) return _image->r();
398  return 0;
399  };
400 
401  GLenum _internalFormat;
404  unsigned int _level;
405  unsigned int _face;
407  unsigned int _multisampleSamples;
409  };
410 
411  typedef std::map< BufferComponent, Attachment> BufferAttachmentMap;
412 
414  BufferAttachmentMap& getBufferAttachmentMap() { return _bufferAttachmentMap; }
415 
417  const BufferAttachmentMap& getBufferAttachmentMap() const { return _bufferAttachmentMap; }
418 
419 
421  void dirtyAttachmentMap() { ++_attachmentMapModifiedCount; }
422 
424  void setAttachmentMapModifiedCount(unsigned int v) { _attachmentMapModifiedCount = v; }
425 
427  unsigned int getAttachmentMapModifiedCount() const { return _attachmentMapModifiedCount; }
428 
430  void resizeAttachments(int width, int height);
431 
432 
434  {
435  RESIZE_VIEWPORT=1,
436  RESIZE_ATTACHMENTS=2,
437  RESIZE_PROJECTIONMATRIX=4,
438  RESIZE_DEFAULT=RESIZE_VIEWPORT|RESIZE_ATTACHMENTS
439  };
440 
443  void resize(int width, int height, int resizeMask=RESIZE_DEFAULT);
444 
445 
473  {
474  IMPLICIT_DEPTH_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_DEPTH_BUFFER_ATTACHMENT,
475  IMPLICIT_STENCIL_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_STENCIL_BUFFER_ATTACHMENT,
476  IMPLICIT_COLOR_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_COLOR_BUFFER_ATTACHMENT,
477  USE_DISPLAY_SETTINGS_MASK = (~0)
478  };
479 
481 
482  void setImplicitBufferAttachmentMask(ImplicitBufferAttachmentMask renderMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT, ImplicitBufferAttachmentMask resolveMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT)
483  {
484  _implicitBufferAttachmentRenderMask = renderMask;
485  _implicitBufferAttachmentResolveMask = resolveMask;
486  }
487 
488  void setImplicitBufferAttachmentRenderMask(ImplicitBufferAttachmentMask implicitBufferAttachmentRenderMask)
489  {
490  _implicitBufferAttachmentRenderMask = implicitBufferAttachmentRenderMask;
491  }
492 
493  void setImplicitBufferAttachmentResolveMask(ImplicitBufferAttachmentMask implicitBufferAttachmentResolveMask)
494  {
495  _implicitBufferAttachmentResolveMask = implicitBufferAttachmentResolveMask;
496  }
497 
503  ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask(bool effectiveMask = false) const
504  {
505  if( effectiveMask && _implicitBufferAttachmentRenderMask == USE_DISPLAY_SETTINGS_MASK )
506  {
507  const DisplaySettings * ds = _displaySettings.valid() ? _displaySettings.get() : DisplaySettings::instance().get();
509  }
510  else
511  {
512  return _implicitBufferAttachmentRenderMask;
513  }
514  }
515 
521  ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask(bool effectiveMask = false) const
522  {
523  if( effectiveMask && _implicitBufferAttachmentResolveMask == USE_DISPLAY_SETTINGS_MASK )
524  {
525  const DisplaySettings * ds = _displaySettings.valid() ? _displaySettings.get() : DisplaySettings::instance().get();
527  }
528  else
529  {
530  return _implicitBufferAttachmentResolveMask;
531  }
532  }
533 
535  void createCameraThread();
536 
538  void setCameraThread(OperationThread* gt);
539 
541  OperationThread* getCameraThread() { return _cameraThread.get(); }
542 
544  const OperationThread* getCameraThread() const { return _cameraThread.get(); }
545 
546 
547 
549  void setGraphicsContext(GraphicsContext* context);
550 
552  GraphicsContext* getGraphicsContext() { return _graphicsContext.get(); }
553 
555  const GraphicsContext* getGraphicsContext() const { return _graphicsContext.get(); }
556 
557 
559  void setRenderer(osg::GraphicsOperation* rc) { _renderer = rc; }
560 
562  osg::GraphicsOperation* getRenderer() { return _renderer.get(); }
563 
565  const osg::GraphicsOperation* getRenderer() const { return _renderer.get(); }
566 
567 
569  void setRenderingCache(osg::Object* rc) { _renderingCache = rc; }
570 
572  osg::Object* getRenderingCache() { return _renderingCache.get(); }
573 
575  const osg::Object* getRenderingCache() const { return _renderingCache.get(); }
576 
577 
579  struct OSG_EXPORT DrawCallback : virtual public Object
580  {
582 
583  DrawCallback(const DrawCallback&,const CopyOp&) {}
584 
586 
588  virtual void operator () (osg::RenderInfo& renderInfo) const;
589 
591  virtual void operator () (const osg::Camera& /*camera*/) const {}
592  };
593 
595  void setInitialDrawCallback(DrawCallback* cb) { _initialDrawCallback = cb; }
596 
598  DrawCallback* getInitialDrawCallback() { return _initialDrawCallback.get(); }
599 
601  const DrawCallback* getInitialDrawCallback() const { return _initialDrawCallback.get(); }
602 
603 
605  void setPreDrawCallback(DrawCallback* cb) { _preDrawCallback = cb; }
606 
608  DrawCallback* getPreDrawCallback() { return _preDrawCallback.get(); }
609 
611  const DrawCallback* getPreDrawCallback() const { return _preDrawCallback.get(); }
612 
613 
615  void setPostDrawCallback(DrawCallback* cb) { _postDrawCallback = cb; }
616 
618  DrawCallback* getPostDrawCallback() { return _postDrawCallback.get(); }
619 
621  const DrawCallback* getPostDrawCallback() const { return _postDrawCallback.get(); }
622 
623 
625  void setFinalDrawCallback(DrawCallback* cb) { _finalDrawCallback = cb; }
626 
628  DrawCallback* getFinalDrawCallback() { return _finalDrawCallback.get(); }
629 
631  const DrawCallback* getFinalDrawCallback() const { return _finalDrawCallback.get(); }
632 
633 
634  OpenThreads::Mutex* getDataChangeMutex() const { return &_dataChangeMutex; }
635 
637  virtual void resizeGLObjectBuffers(unsigned int maxSize);
638 
642  virtual void releaseGLObjects(osg::State* = 0) const;
643 
644  public:
645 
647  virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const;
648 
650  virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const;
651 
653  virtual void inheritCullSettings(const CullSettings& settings, unsigned int inheritanceMask);
654 
655  protected :
656 
657  virtual ~Camera();
658 
660 
661 
663 
665 
667 
669 
670  GLbitfield _clearMask;
673  double _clearDepth;
675 
678 
681 
684 
687 
688  GLenum _drawBuffer;
689  GLenum _readBuffer;
690 
693  BufferAttachmentMap _bufferAttachmentMap;
694  ImplicitBufferAttachmentMask _implicitBufferAttachmentRenderMask;
695  ImplicitBufferAttachmentMask _implicitBufferAttachmentResolveMask;
696 
698 
700 
702 
705 
710 };
711 
712 
715 {
716  inline bool operator() (const Camera* lhs,const Camera* rhs) const
717  {
718  if (lhs->getRenderOrder()<rhs->getRenderOrder()) return true;
719  if (rhs->getRenderOrder()<lhs->getRenderOrder()) return false;
720  return lhs->getRenderOrderNum()<rhs->getRenderOrderNum();
721  }
722 };
723 
724 
725 }
726 
727 #endif
DrawCallback(const DrawCallback &, const CopyOp &)
Definition: Camera.h:583
#define OSG_EXPORT
Definition: Export.h:43
const osg::Stats * getStats() const
Definition: Camera.h:77
void setPreDrawCallback(DrawCallback *cb)
Definition: Camera.h:605
OpenThreads::Mutex _dataChangeMutex
Definition: Camera.h:659
static ref_ptr< DisplaySettings > & instance()
DrawCallback * getPreDrawCallback()
Definition: Camera.h:608
int depth() const
Definition: Camera.h:394
void setRenderer(osg::GraphicsOperation *rc)
Definition: Camera.h:559
osg::Stats * getStats()
Definition: Camera.h:74
const DrawCallback * getInitialDrawCallback() const
Definition: Camera.h:601
This class provides an object-oriented thread mutex interface.
Definition: Mutex.h:31
virtual Camera * asCamera()
Definition: Camera.h:56
const DrawCallback * getPreDrawCallback() const
Definition: Camera.h:611
GLenum getDrawBuffer() const
Definition: Camera.h:316
const GraphicsContext * getGraphicsContext() const
Definition: Camera.h:555
osg::Matrixd & getProjectionMatrix()
Definition: Camera.h:216
GLenum getReadBuffer() const
Definition: Camera.h:323
ref_ptr< Texture > _texture
Definition: Camera.h:403
GLint GLenum internalFormat
Definition: GLU.h:71
const osg::Vec4 & getClearColor() const
Definition: Camera.h:111
ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask(bool effectiveMask=false) const
Definition: Camera.h:503
int height() const
Definition: Camera.h:387
ref_ptr< DrawCallback > _preDrawCallback
Definition: Camera.h:707
double getClearDepth() const
Definition: Camera.h:125
BufferAttachmentMap & getBufferAttachmentMap()
Definition: Camera.h:414
GLint GLenum GLsizei GLsizei GLsizei depth
Definition: GLU.h:71
std::map< BufferComponent, Attachment > BufferAttachmentMap
Definition: Camera.h:411
View * getView()
Definition: Camera.h:63
int width() const
Definition: Camera.h:380
OpenThreads::Mutex * getDataChangeMutex() const
Definition: Camera.h:634
void setFinalDrawCallback(DrawCallback *cb)
Definition: Camera.h:625
void setImplicitBufferAttachmentResolveMask(ImplicitBufferAttachmentMask implicitBufferAttachmentResolveMask)
Definition: Camera.h:493
unsigned int getAttachmentMapModifiedCount() const
Definition: Camera.h:427
unsigned int _multisampleColorSamples
Definition: Camera.h:408
unsigned int _attachmentMapModifiedCount
Definition: Camera.h:697
void setInitialDrawCallback(DrawCallback *cb)
Definition: Camera.h:595
bool _allowEventFocus
Definition: Camera.h:666
ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask(bool effectiveMask=false) const
Definition: Camera.h:521
const OperationThread * getCameraThread() const
Definition: Camera.h:544
View * _view
Definition: Camera.h:662
const ColorMask * getColorMask() const
Definition: Camera.h:143
ProjectionResizePolicy getProjectionResizePolicy() const
Definition: Camera.h:187
#define META_Node(library, name)
Definition: Node.h:59
RenderOrder getRenderOrder() const
Definition: Camera.h:281
ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask() const
RenderTargetImplementation _renderTargetImplementation
Definition: Camera.h:691
osg::GraphicsOperation * getRenderer()
Definition: Camera.h:562
ref_ptr< Viewport > _viewport
Definition: Camera.h:677
void setRenderingCache(osg::Object *rc)
Definition: Camera.h:569
unsigned int _face
Definition: Camera.h:405
BufferComponent
Definition: Camera.h:325
GLbitfield getClearMask() const
Definition: Camera.h:104
DrawCallback * getPostDrawCallback()
Definition: Camera.h:618
const BufferAttachmentMap & getBufferAttachmentMap() const
Definition: Camera.h:417
void setViewMatrix(const osg::Matrixd &matrix)
Definition: Camera.h:247
void setViewMatrix(const osg::Matrixf &matrix)
Definition: Camera.h:244
TransformOrder getTransformOrder() const
Definition: Camera.h:173
const osg::GraphicsOperation * getRenderer() const
Definition: Camera.h:565
double _clearDepth
Definition: Camera.h:673
ColorMask * getColorMask()
Definition: Camera.h:146
void setView(View *view)
Definition: Camera.h:60
ref_ptr< DrawCallback > _initialDrawCallback
Definition: Camera.h:706
ImplicitBufferAttachment
Definition: Camera.h:472
RenderOrder _renderOrder
Definition: Camera.h:685
ProjectionResizePolicy
Definition: Camera.h:175
Viewport * getViewport()
Definition: Camera.h:159
const osg::Vec4 & getClearAccum() const
Definition: Camera.h:118
OperationThread * getCameraThread()
Definition: Camera.h:541
ImplicitBufferAttachmentMask _implicitBufferAttachmentRenderMask
Definition: Camera.h:694
int getClearStencil() const
Definition: Camera.h:132
void dirtyAttachmentMap()
Definition: Camera.h:421
ref_ptr< DrawCallback > _finalDrawCallback
Definition: Camera.h:709
void setDrawBuffer(GLenum buffer)
Definition: Camera.h:313
#define META_Object(library, name)
Definition: Object.h:42
void setProjectionResizePolicy(ProjectionResizePolicy policy)
Definition: Camera.h:184
static const unsigned int FACE_CONTROLLED_BY_GEOMETRY_SHADER
Definition: Camera.h:349
GLenum _readBuffer
Definition: Camera.h:689
GLint GLenum GLsizei width
Definition: GLU.h:71
DrawCallback * getInitialDrawCallback()
Definition: Camera.h:598
const Viewport * getViewport() const
Definition: Camera.h:156
GLbitfield _clearMask
Definition: Camera.h:670
const DrawCallback * getPostDrawCallback() const
Definition: Camera.h:621
const osg::Matrixd & getProjectionMatrix() const
Definition: Camera.h:219
void setDisplaySettings(osg::DisplaySettings *ds)
Definition: Camera.h:90
ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask() const
ref_ptr< GraphicsOperation > _renderer
Definition: Camera.h:703
void setReadBuffer(GLenum buffer)
Definition: Camera.h:320
ref_ptr< ColorMask > _colorMask
Definition: Camera.h:676
ref_ptr< DrawCallback > _postDrawCallback
Definition: Camera.h:708
#define GL_NONE
Definition: GL.h:172
RenderTargetImplementation
Definition: Camera.h:289
GraphicsContext * getGraphicsContext()
Definition: Camera.h:552
void setClearStencil(int stencil)
Definition: Camera.h:129
ref_ptr< GraphicsContext > _graphicsContext
Definition: Camera.h:701
TransformOrder _transformOrder
Definition: Camera.h:679
RenderTargetImplementation getRenderTargetFallback() const
Definition: Camera.h:308
void setProjectionMatrix(const osg::Matrixd &matrix)
Definition: Camera.h:194
ref_ptr< Image > _image
Definition: Camera.h:402
void setPostDrawCallback(DrawCallback *cb)
Definition: Camera.h:615
void setProjectionMatrix(const osg::Matrixf &matrix)
Definition: Camera.h:191
GLint level
Definition: GLU.h:71
ProjectionResizePolicy _projectionResizePolicy
Definition: Camera.h:680
GLint GLenum GLsizei GLsizei height
Definition: GLU.h:71
const osg::DisplaySettings * getDisplaySettings() const
Definition: Camera.h:96
int _renderOrderNum
Definition: Camera.h:686
virtual const Camera * asCamera() const
Definition: Camera.h:57
void setClearColor(const osg::Vec4 &color)
Definition: Camera.h:108
void setTransformOrder(TransformOrder order)
Definition: Camera.h:170
DrawCallback * getFinalDrawCallback()
Definition: Camera.h:628
void setAttachmentMapModifiedCount(unsigned int v)
Definition: Camera.h:424
const osg::Matrixd & getViewMatrix() const
Definition: Camera.h:253
osg::Vec4 _clearColor
Definition: Camera.h:671
GLenum _drawBuffer
Definition: Camera.h:688
void setStats(osg::Stats *stats)
Definition: Camera.h:71
Definition: AlphaFunc.h:19
RenderTargetImplementation getRenderTargetImplementation() const
Definition: Camera.h:305
osg::Vec4 _clearAccum
Definition: Camera.h:672
TransformOrder
Definition: Camera.h:163
osg::Matrixd & getViewMatrix()
Definition: Camera.h:250
ImplicitBufferAttachmentMask _implicitBufferAttachmentResolveMask
Definition: Camera.h:695
osg::ref_ptr< osg::DisplaySettings > _displaySettings
Definition: Camera.h:668
Matrixd _projectionMatrix
Definition: Camera.h:682
const View * getView() const
Definition: Camera.h:66
void setClearDepth(double depth)
Definition: Camera.h:122
const DrawCallback * getFinalDrawCallback() const
Definition: Camera.h:631
osg::Object * getRenderingCache()
Definition: Camera.h:572
void setRenderOrder(RenderOrder order, int orderNum=0)
Definition: Camera.h:278
int ImplicitBufferAttachmentMask
Definition: Camera.h:480
void setAllowEventFocus(bool focus)
Definition: Camera.h:82
void setClearAccum(const osg::Vec4 &color)
Definition: Camera.h:115
void setImplicitBufferAttachmentRenderMask(ImplicitBufferAttachmentMask implicitBufferAttachmentRenderMask)
Definition: Camera.h:488
const osg::Object * getRenderingCache() const
Definition: Camera.h:575
void setImplicitBufferAttachmentMask(ImplicitBufferAttachmentMask renderMask=DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT, ImplicitBufferAttachmentMask resolveMask=DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT)
Definition: Camera.h:482
int getRenderOrderNum() const
Definition: Camera.h:284
RenderTargetImplementation _renderTargetFallback
Definition: Camera.h:692
osg::ref_ptr< osg::Stats > _stats
Definition: Camera.h:664
ref_ptr< OperationThread > _cameraThread
Definition: Camera.h:699
bool getAllowEventFocus() const
Definition: Camera.h:86
unsigned int _multisampleSamples
Definition: Camera.h:407
Definition: View.h:29
unsigned int _level
Definition: Camera.h:404
BufferAttachmentMap _bufferAttachmentMap
Definition: Camera.h:693
osg::DisplaySettings * getDisplaySettings()
Definition: Camera.h:93
void setClearMask(GLbitfield mask)
Definition: Camera.h:101
ref_ptr< Object > _renderingCache
Definition: Camera.h:704
Matrixd _viewMatrix
Definition: Camera.h:683
int _clearStencil
Definition: Camera.h:674