fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Window / FrameBufferObjects / OSGFrameBufferAttachment.h
blob95d9c476d6b5959ce9c93d0cb97a044e38c4de8f
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGFRAMEBUFFERATTACHMENT_H_
40 #define _OSGFRAMEBUFFERATTACHMENT_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGFrameBufferAttachmentBase.h"
47 OSG_BEGIN_NAMESPACE
49 class RenderActionBase;
50 class DrawEnv;
51 class FrameBufferObject;
53 /*! \brief Viewport class for color channel selection. See \ref
54 PageSystemFBOBuffer for a description.
55 \ingroup GrpSystemWindowFBOObj
56 \ingroup GrpLibOSGSystem
57 \includebasedoc
60 class OSG_SYSTEM_DLLMAPPING FrameBufferAttachment :
61 public FrameBufferAttachmentBase
63 private:
65 /*========================== PUBLIC =================================*/
67 public:
69 typedef FrameBufferAttachmentBase Inherited;
71 /*---------------------------------------------------------------------*/
72 /*! \name Sync */
73 /*! \{ */
75 virtual void changed(ConstFieldMaskArg whichField,
76 UInt32 origin,
77 BitVector detail);
79 /*! \} */
80 /*---------------------------------------------------------------------*/
81 /*! \name Output */
82 /*! \{ */
84 virtual void dump( UInt32 uiIndent = 0,
85 const BitVector bvFlags = 0) const;
87 /*! \} */
88 /*---------------------------------------------------------------------*/
89 /*! \name your_category */
90 /*! \{ */
92 virtual void bind (DrawEnv *pEnv, UInt32 index = 0) = 0;
93 virtual void validate(DrawEnv *pEnv ) = 0;
95 /*! \} */
96 /*---------------------------------------------------------------------*/
97 /*! \name your_category */
98 /*! \{ */
100 virtual GLenum getBufferFormat(void) const = 0;
102 /*! \} */
103 /*---------------------------------------------------------------------*/
104 /*! \name your_category */
105 /*! \{ */
107 virtual void processPreDeactivate (DrawEnv *pEnv, UInt32 index) = 0;
108 virtual void processPostDeactivate(DrawEnv *pEnv ) = 0;
110 /*! \} */
111 /*========================= PROTECTED ===============================*/
113 protected:
115 // Variables should all be in FrameBufferAttachmentBase.
117 /*---------------------------------------------------------------------*/
118 /*! \name Constructors */
119 /*! \{ */
121 FrameBufferAttachment(void);
122 FrameBufferAttachment(const FrameBufferAttachment &source);
124 /*! \} */
125 /*---------------------------------------------------------------------*/
126 /*! \name Destructors */
127 /*! \{ */
129 virtual ~FrameBufferAttachment(void);
131 /*! \} */
132 /*---------------------------------------------------------------------*/
133 /*! \name size */
134 /*! \{ */
136 void resize (UInt32 uiWidth, UInt32 uiHeight);
137 virtual void resizeBuffers(UInt32 uiWidth, UInt32 uiHeight) = 0;
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Init */
142 /*! \{ */
144 static void initMethod(InitPhase ePhase);
146 /*! \} */
147 /*========================== PRIVATE ================================*/
149 private:
151 friend class FieldContainer;
152 friend class FrameBufferAttachmentBase;
153 friend class FrameBufferObject;
155 // prohibit default functions (move to 'public' if you need one)
156 void operator =(const FrameBufferAttachment &source);
159 typedef FrameBufferAttachment *FrameBufferAttachmentP;
161 OSG_END_NAMESPACE
163 #include "OSGFrameBufferAttachmentBase.inl"
164 #include "OSGFrameBufferAttachment.inl"
166 #endif /* _OSGFRAMEBUFFERATTACHMENT_H_ */