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 _OSGGEOSPLITVERTEXARRAYPUMPGROUP_H_
40 #define _OSGGEOSPLITVERTEXARRAYPUMPGROUP_H_
47 #include "OSGBaseTypes.h"
48 #include "OSGBaseFunctions.h"
49 #include "OSGGeometry.h"
50 #include "OSGGeoPumpGroup.h"
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
:
64 /*========================== PUBLIC =================================*/
67 /*---------------------------------------------------------------------*/
68 /*! \name Con-/Destructors */
71 GeoSplitVertexArrayPumpGroup(void);
73 virtual ~GeoSplitVertexArrayPumpGroup();
76 /*---------------------------------------------------------------------*/
80 virtual SplitGeoPump
getSplitGeoPump(DrawEnv
*pEnv
,
81 PropertyCharacteristics acset
);
84 /*========================= PROTECTED ===============================*/
88 virtual GeoPump
getGeoPump(DrawEnv
*pEnv
,
89 PropertyCharacteristics acset
);
91 /*========================== PRIVATE ================================*/
94 /*---------------------------------------------------------------------*/
95 /*! \name OpenGL Extension handling */
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
;
110 /*---------------------------------------------------------------------*/
111 /*! \name Pump functions */
114 #if !defined(OSG_OGL_COREONLY) || defined(OSG_CHECK_COREONLY)
115 static bool masterClassicGeoSetupPump(
117 const GeoIntegralProperty
*lengths
,
118 const GeoIntegralProperty
*types
,
119 const Geometry::MFPropertiesType
*prop
,
120 const Geometry::MFPropIndicesType
*propIdx
,
123 static void masterClassicGeoDrawPump (
125 const GeoIntegralProperty
*lengths
,
126 const GeoIntegralProperty
*types
,
127 const Geometry::MFPropertiesType
*prop
,
128 const Geometry::MFPropIndicesType
*propIdx
);
130 static bool masterClassicGeoSetupPumpFull(
132 const GeoIntegralProperty
*lengths
,
133 const GeoIntegralProperty
*types
,
134 const Geometry::MFPropertiesType
*prop
,
135 const Geometry::MFPropIndicesType
*propIdx
,
138 static void masterClassicGeoJustDrawPump (
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(
148 const GeoIntegralProperty
*lengths
,
149 const GeoIntegralProperty
*types
,
150 const Geometry::MFPropertiesType
*prop
,
151 const Geometry::MFPropIndicesType
*propIdx
);
154 static bool masterAttribGeoSetupPump(
156 const GeoIntegralProperty
*lengths
,
157 const GeoIntegralProperty
*types
,
158 const Geometry::MFPropertiesType
*prop
,
159 const Geometry::MFPropIndicesType
*propIdx
,
162 static void masterAttribGeoDrawPump (
164 const GeoIntegralProperty
*lengths
,
165 const GeoIntegralProperty
*types
,
166 const Geometry::MFPropertiesType
*prop
,
167 const Geometry::MFPropIndicesType
*propIdx
);
170 static bool masterAttribGeoSetupPumpFull(
172 const GeoIntegralProperty
*lengths
,
173 const GeoIntegralProperty
*types
,
174 const Geometry::MFPropertiesType
*prop
,
175 const Geometry::MFPropIndicesType
*propIdx
,
178 static void masterAttribGeoJustDrawPump (
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(
188 const GeoIntegralProperty
*lengths
,
189 const GeoIntegralProperty
*types
,
190 const Geometry::MFPropertiesType
*prop
,
191 const Geometry::MFPropIndicesType
*propIdx
);
198 #endif /* _OSGGEOSPLITVERTEXARRAYPUMPGROUP_H_ */