1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGFRAMEBUFFERATTACHMENT_H_
40 #define _OSGFRAMEBUFFERATTACHMENT_H_
45 #include "OSGFrameBufferAttachmentBase.h"
49 class RenderActionBase
;
51 class FrameBufferObject
;
53 /*! \brief Viewport class for color channel selection. See \ref
54 PageSystemFBOBuffer for a description.
55 \ingroup GrpSystemWindowFBOObj
56 \ingroup GrpLibOSGSystem
60 class OSG_SYSTEM_DLLMAPPING FrameBufferAttachment
:
61 public FrameBufferAttachmentBase
65 /*========================== PUBLIC =================================*/
69 typedef FrameBufferAttachmentBase Inherited
;
71 /*---------------------------------------------------------------------*/
75 virtual void changed(ConstFieldMaskArg whichField
,
80 /*---------------------------------------------------------------------*/
84 virtual void dump( UInt32 uiIndent
= 0,
85 const BitVector bvFlags
= 0) const;
88 /*---------------------------------------------------------------------*/
89 /*! \name your_category */
92 virtual void bind (DrawEnv
*pEnv
, UInt32 index
= 0) = 0;
93 virtual void validate(DrawEnv
*pEnv
) = 0;
96 /*---------------------------------------------------------------------*/
97 /*! \name your_category */
100 virtual GLenum
getBufferFormat(void) const = 0;
103 /*---------------------------------------------------------------------*/
104 /*! \name your_category */
107 virtual void processPreDeactivate (DrawEnv
*pEnv
, UInt32 index
) = 0;
108 virtual void processPostDeactivate(DrawEnv
*pEnv
) = 0;
111 /*========================= PROTECTED ===============================*/
115 // Variables should all be in FrameBufferAttachmentBase.
117 /*---------------------------------------------------------------------*/
118 /*! \name Constructors */
121 FrameBufferAttachment(void);
122 FrameBufferAttachment(const FrameBufferAttachment
&source
);
125 /*---------------------------------------------------------------------*/
126 /*! \name Destructors */
129 virtual ~FrameBufferAttachment(void);
132 /*---------------------------------------------------------------------*/
136 void resize (UInt32 uiWidth
, UInt32 uiHeight
);
137 virtual void resizeBuffers(UInt32 uiWidth
, UInt32 uiHeight
) = 0;
140 /*---------------------------------------------------------------------*/
144 static void initMethod(InitPhase ePhase
);
147 /*========================== 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
;
163 #include "OSGFrameBufferAttachmentBase.inl"
164 #include "OSGFrameBufferAttachment.inl"
166 #endif /* _OSGFRAMEBUFFERATTACHMENT_H_ */