fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Drawables / Geometry / Base / OSGGeoSplitVertexArrayPumpGroup.h
blobe76bee3a0ea0151848523719cfae7d543485bf38
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 _OSGGEOSPLITVERTEXARRAYPUMPGROUP_H_
40 #define _OSGGEOSPLITVERTEXARRAYPUMPGROUP_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include <utility>
47 #include "OSGBaseTypes.h"
48 #include "OSGBaseFunctions.h"
49 #include "OSGGeometry.h"
50 #include "OSGGeoPumpGroup.h"
52 OSG_BEGIN_NAMESPACE
54 class Window;
56 /*! \brief Pump group using vertex arrays. Only works for non- and
57 single-indexed geometry
58 \ingroup GrpDrawablesGeometryHelpers
61 class OSG_DRAWABLE_DLLMAPPING GeoSplitVertexArrayPumpGroup :
62 public GeoPumpGroup
64 /*========================== PUBLIC =================================*/
65 public:
67 /*---------------------------------------------------------------------*/
68 /*! \name Con-/Destructors */
69 /*! \{ */
71 GeoSplitVertexArrayPumpGroup(void);
73 virtual ~GeoSplitVertexArrayPumpGroup();
75 /*! \} */
76 /*---------------------------------------------------------------------*/
77 /*! \name Get */
78 /*! \{ */
80 virtual SplitGeoPump getSplitGeoPump(DrawEnv *pEnv,
81 PropertyCharacteristics acset);
83 /*! \} */
84 /*========================= PROTECTED ===============================*/
86 protected:
88 virtual GeoPump getGeoPump(DrawEnv *pEnv,
89 PropertyCharacteristics acset);
91 /*========================== PRIVATE ================================*/
93 private:
94 /*---------------------------------------------------------------------*/
95 /*! \name OpenGL Extension handling */
96 /*! \{ */
98 static bool glextInitFunction(void);
99 static InitFuncWrapper _glextInitFuncWrapper;
101 /*! Extensions IDs */
103 static UInt32 _arbVertexProgram;
104 #if !defined(OSG_OGL_COREONLY) || defined(OSG_CHECK_COREONLY)
105 static UInt32 _extSecondaryColor;
106 static UInt32 _extMultitexture;
107 #endif
109 /*! \} */
110 /*---------------------------------------------------------------------*/
111 /*! \name Pump functions */
112 /*! \{ */
114 #if !defined(OSG_OGL_COREONLY) || defined(OSG_CHECK_COREONLY)
115 static bool masterClassicGeoSetupPump(
116 DrawEnv *pEnv,
117 const GeoIntegralProperty *lengths,
118 const GeoIntegralProperty *types,
119 const Geometry::MFPropertiesType *prop,
120 const Geometry::MFPropIndicesType *propIdx,
121 bool withFallback);
123 static void masterClassicGeoDrawPump (
124 DrawEnv *pEnv,
125 const GeoIntegralProperty *lengths,
126 const GeoIntegralProperty *types,
127 const Geometry::MFPropertiesType *prop,
128 const Geometry::MFPropIndicesType *propIdx );
130 static bool masterClassicGeoSetupPumpFull(
131 DrawEnv *pEnv,
132 const GeoIntegralProperty *lengths,
133 const GeoIntegralProperty *types,
134 const Geometry::MFPropertiesType *prop,
135 const Geometry::MFPropIndicesType *propIdx,
136 bool withFallback );
138 static void masterClassicGeoJustDrawPump (
139 DrawEnv *pEnv,
140 const GeoIntegralProperty *lengths,
141 const GeoIntegralProperty *types,
142 const Geometry::MFPropertiesType *prop,
143 const Geometry::MFPropIndicesType *propIdx,
144 UInt32 uiNumInstances);
146 static bool masterClassicGeoShutdownPump(
147 DrawEnv *pEnv,
148 const GeoIntegralProperty *lengths,
149 const GeoIntegralProperty *types,
150 const Geometry::MFPropertiesType *prop,
151 const Geometry::MFPropIndicesType *propIdx );
152 #endif
154 static bool masterAttribGeoSetupPump(
155 DrawEnv *pEnv,
156 const GeoIntegralProperty *lengths,
157 const GeoIntegralProperty *types,
158 const Geometry::MFPropertiesType *prop,
159 const Geometry::MFPropIndicesType *propIdx,
160 bool withFallback);
162 static void masterAttribGeoDrawPump (
163 DrawEnv *pEnv,
164 const GeoIntegralProperty *lengths,
165 const GeoIntegralProperty *types,
166 const Geometry::MFPropertiesType *prop,
167 const Geometry::MFPropIndicesType *propIdx );
170 static bool masterAttribGeoSetupPumpFull(
171 DrawEnv *pEnv,
172 const GeoIntegralProperty *lengths,
173 const GeoIntegralProperty *types,
174 const Geometry::MFPropertiesType *prop,
175 const Geometry::MFPropIndicesType *propIdx,
176 bool withFallback);
178 static void masterAttribGeoJustDrawPump (
179 DrawEnv *pEnv,
180 const GeoIntegralProperty *lengths,
181 const GeoIntegralProperty *types,
182 const Geometry::MFPropertiesType *prop,
183 const Geometry::MFPropIndicesType *propIdx,
184 UInt32 uiNumInstances);
186 static bool masterAttribGeoShutdownPump(
187 DrawEnv *pEnv,
188 const GeoIntegralProperty *lengths,
189 const GeoIntegralProperty *types,
190 const Geometry::MFPropertiesType *prop,
191 const Geometry::MFPropIndicesType *propIdx );
193 /*! \} */
196 OSG_END_NAMESPACE
198 #endif /* _OSGGEOSPLITVERTEXARRAYPUMPGROUP_H_ */