diff --git a/include/Inventor/VRMLnodes/SoVRMLAppearance.h b/include/Inventor/VRMLnodes/SoVRMLAppearance.h index 77926524527..5f48f607b57 100644 --- a/include/Inventor/VRMLnodes/SoVRMLAppearance.h +++ b/include/Inventor/VRMLnodes/SoVRMLAppearance.h @@ -55,7 +55,9 @@ class COIN_DLL_API SoVRMLAppearance : public SoNode void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void search(SoSearchAction * action) override; SoChildList * getChildren(void) const override; diff --git a/include/Inventor/VRMLnodes/SoVRMLBackground.h b/include/Inventor/VRMLnodes/SoVRMLBackground.h index eaaafb7a09d..976794c4ea6 100644 --- a/include/Inventor/VRMLnodes/SoVRMLBackground.h +++ b/include/Inventor/VRMLnodes/SoVRMLBackground.h @@ -62,7 +62,9 @@ class COIN_DLL_API SoVRMLBackground : public SoNode SoMFString rightUrl; SoMFString topUrl; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: SbBool readInstance(SoInput * in, unsigned short flags) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLBillboard.h b/include/Inventor/VRMLnodes/SoVRMLBillboard.h index ec40dc16989..8d9c6bd5cd1 100644 --- a/include/Inventor/VRMLnodes/SoVRMLBillboard.h +++ b/include/Inventor/VRMLnodes/SoVRMLBillboard.h @@ -58,15 +58,19 @@ class COIN_DLL_API SoVRMLBillboard : public SoVRMLParent void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; void search(SoSearchAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; void GLRenderOffPath(SoGLRenderAction * action) override; +#endif void notify(SoNotList * list) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLBox.h b/include/Inventor/VRMLnodes/SoVRMLBox.h index 7d00b51ac99..68091cbf493 100644 --- a/include/Inventor/VRMLnodes/SoVRMLBox.h +++ b/include/Inventor/VRMLnodes/SoVRMLBox.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoVRMLBox : public SoVRMLGeometry SoSFVec3f size; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount( SoGetPrimitiveCountAction * action ) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLCollision.h b/include/Inventor/VRMLnodes/SoVRMLCollision.h index 3f4c4888a93..fc8b4ee9496 100644 --- a/include/Inventor/VRMLnodes/SoVRMLCollision.h +++ b/include/Inventor/VRMLnodes/SoVRMLCollision.h @@ -55,7 +55,9 @@ class COIN_DLL_API SoVRMLCollision : public SoVRMLGroup SoSFNode proxy; SoSFTime collideTime; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void notify(SoNotList * list) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLColor.h b/include/Inventor/VRMLnodes/SoVRMLColor.h index be510b32199..af9c1419d13 100644 --- a/include/Inventor/VRMLnodes/SoVRMLColor.h +++ b/include/Inventor/VRMLnodes/SoVRMLColor.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLColor : public SoNode SoMFColor color; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/VRMLnodes/SoVRMLCone.h b/include/Inventor/VRMLnodes/SoVRMLCone.h index 6dd5cca554a..3fc5c25561c 100644 --- a/include/Inventor/VRMLnodes/SoVRMLCone.h +++ b/include/Inventor/VRMLnodes/SoVRMLCone.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoVRMLCone : public SoVRMLGeometry SoSFBool side; SoSFBool bottom; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLCoordinate.h b/include/Inventor/VRMLnodes/SoVRMLCoordinate.h index bb936a7150e..f944a845be0 100644 --- a/include/Inventor/VRMLnodes/SoVRMLCoordinate.h +++ b/include/Inventor/VRMLnodes/SoVRMLCoordinate.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLCoordinate : public SoNode SoMFVec3f point; void doAction( SoAction * action ) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif void getBoundingBox( SoGetBoundingBoxAction * action ) override; void callback( SoCallbackAction * action ) override; void pick( SoPickAction * action ) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLCylinder.h b/include/Inventor/VRMLnodes/SoVRMLCylinder.h index eb020f1ea13..dfbe0547f27 100644 --- a/include/Inventor/VRMLnodes/SoVRMLCylinder.h +++ b/include/Inventor/VRMLnodes/SoVRMLCylinder.h @@ -53,7 +53,9 @@ class COIN_DLL_API SoVRMLCylinder : public SoVRMLGeometry SoSFBool top; SoSFBool bottom; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLDirectionalLight.h b/include/Inventor/VRMLnodes/SoVRMLDirectionalLight.h index 9e3a624ed16..33433673f3c 100644 --- a/include/Inventor/VRMLnodes/SoVRMLDirectionalLight.h +++ b/include/Inventor/VRMLnodes/SoVRMLDirectionalLight.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoVRMLDirectionalLight : public SoVRMLLight SoSFVec3f direction; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: virtual ~SoVRMLDirectionalLight(); diff --git a/include/Inventor/VRMLnodes/SoVRMLElevationGrid.h b/include/Inventor/VRMLnodes/SoVRMLElevationGrid.h index 558125856c4..00e8ba82fec 100644 --- a/include/Inventor/VRMLnodes/SoVRMLElevationGrid.h +++ b/include/Inventor/VRMLnodes/SoVRMLElevationGrid.h @@ -70,7 +70,9 @@ class COIN_DLL_API SoVRMLElevationGrid : public SoVRMLGeometry SoSFBool colorPerVertex; SoSFBool normalPerVertex; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLExtrusion.h b/include/Inventor/VRMLnodes/SoVRMLExtrusion.h index a1f83ba2c3e..a25fc983c63 100644 --- a/include/Inventor/VRMLnodes/SoVRMLExtrusion.h +++ b/include/Inventor/VRMLnodes/SoVRMLExtrusion.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoVRMLExtrusion : public SoVRMLGeometry SoSFBool solid; SoMFVec3f spine; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; virtual void computeBBox(SoAction * action, SbBox3f & bbox, SbVec3f & center) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLFog.h b/include/Inventor/VRMLnodes/SoVRMLFog.h index d53eaf2bb25..d85eb0675b6 100644 --- a/include/Inventor/VRMLnodes/SoVRMLFog.h +++ b/include/Inventor/VRMLnodes/SoVRMLFog.h @@ -55,7 +55,9 @@ class COIN_DLL_API SoVRMLFog : public SoNode SoSFFloat visibilityRange; SoSFColor color; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: SoSFBool set_bind; diff --git a/include/Inventor/VRMLnodes/SoVRMLFontStyle.h b/include/Inventor/VRMLnodes/SoVRMLFontStyle.h index 8d86784b266..299fb90ac6f 100644 --- a/include/Inventor/VRMLnodes/SoVRMLFontStyle.h +++ b/include/Inventor/VRMLnodes/SoVRMLFontStyle.h @@ -83,7 +83,9 @@ class COIN_DLL_API SoVRMLFontStyle : public SoNode void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLGeometry.h b/include/Inventor/VRMLnodes/SoVRMLGeometry.h index b7f98bb4232..156c925e29d 100644 --- a/include/Inventor/VRMLnodes/SoVRMLGeometry.h +++ b/include/Inventor/VRMLnodes/SoVRMLGeometry.h @@ -54,7 +54,9 @@ class COIN_DLL_API SoVRMLGeometry : public SoShape virtual ~SoVRMLGeometry(); void setupShapeHints(SoState * state, const SbBool ccw, const SbBool solid); +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool shouldGLRender(SoGLRenderAction * action) override; +#endif SoChildList * getChildren(void) const override; void notify(SoNotList * list) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLGroup.h b/include/Inventor/VRMLnodes/SoVRMLGroup.h index b20e0b87070..213e3d7aa5e 100644 --- a/include/Inventor/VRMLnodes/SoVRMLGroup.h +++ b/include/Inventor/VRMLnodes/SoVRMLGroup.h @@ -69,7 +69,9 @@ class COIN_DLL_API SoVRMLGroup : public SoVRMLParent void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void rayPick(SoRayPickAction * action) override; @@ -78,9 +80,11 @@ class COIN_DLL_API SoVRMLGroup : public SoVRMLParent void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void audioRender(SoAudioRenderAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; void GLRenderOffPath(SoGLRenderAction * action) override; +#endif void notify(SoNotList * list) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLImageTexture.h b/include/Inventor/VRMLnodes/SoVRMLImageTexture.h index 47c7609b6e6..d63b577fdf7 100644 --- a/include/Inventor/VRMLnodes/SoVRMLImageTexture.h +++ b/include/Inventor/VRMLnodes/SoVRMLImageTexture.h @@ -62,7 +62,9 @@ class COIN_DLL_API SoVRMLImageTexture : public SoVRMLTexture void allowPrequalifyFile(SbBool enable); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void rayPick(SoRayPickAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h b/include/Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h index 4332011a56d..6b79d7437e9 100644 --- a/include/Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h +++ b/include/Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h @@ -58,7 +58,9 @@ class COIN_DLL_API SoVRMLIndexedFaceSet : public SoVRMLIndexedShape SoSFBool convex; SoSFFloat creaseAngle; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif void getPrimitiveCount( SoGetPrimitiveCountAction * action ) override; SbBool generateDefaultNormals(SoState * s, SoNormalBundle * nb ) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLIndexedLineSet.h b/include/Inventor/VRMLnodes/SoVRMLIndexedLineSet.h index 1d7680bcf22..dc829cb424f 100644 --- a/include/Inventor/VRMLnodes/SoVRMLIndexedLineSet.h +++ b/include/Inventor/VRMLnodes/SoVRMLIndexedLineSet.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLIndexedLineSet : public SoVRMLIndexedLine static void initClass(void); SoVRMLIndexedLineSet(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLInline.h b/include/Inventor/VRMLnodes/SoVRMLInline.h index b3c2700b721..95bb609ac8d 100644 --- a/include/Inventor/VRMLnodes/SoVRMLInline.h +++ b/include/Inventor/VRMLnodes/SoVRMLInline.h @@ -91,7 +91,9 @@ class COIN_DLL_API SoVRMLInline : public SoNode void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLLOD.h b/include/Inventor/VRMLnodes/SoVRMLLOD.h index e48c85256db..2f6bfc8b318 100644 --- a/include/Inventor/VRMLnodes/SoVRMLLOD.h +++ b/include/Inventor/VRMLnodes/SoVRMLLOD.h @@ -70,7 +70,9 @@ class COIN_DLL_API SoVRMLLOD : public SoGroup void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void search(SoSearchAction * action) override; @@ -78,9 +80,11 @@ class COIN_DLL_API SoVRMLLOD : public SoGroup void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void audioRender(SoAudioRenderAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; void GLRenderOffPath(SoGLRenderAction * action) override; +#endif void addChild(SoNode * child) override; void insertChild(SoNode * child, int idx) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLLight.h b/include/Inventor/VRMLnodes/SoVRMLLight.h index 63398753611..0d5909fb07c 100644 --- a/include/Inventor/VRMLnodes/SoVRMLLight.h +++ b/include/Inventor/VRMLnodes/SoVRMLLight.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoVRMLLight : public SoNode SoSFColor color; SoSFFloat ambientIntensity; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: SoVRMLLight(void); diff --git a/include/Inventor/VRMLnodes/SoVRMLMaterial.h b/include/Inventor/VRMLnodes/SoVRMLMaterial.h index ad83b6b19e0..6c817305dbd 100644 --- a/include/Inventor/VRMLnodes/SoVRMLMaterial.h +++ b/include/Inventor/VRMLnodes/SoVRMLMaterial.h @@ -57,7 +57,9 @@ class COIN_DLL_API SoVRMLMaterial : public SoNode SoSFFloat transparency; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/VRMLnodes/SoVRMLMovieTexture.h b/include/Inventor/VRMLnodes/SoVRMLMovieTexture.h index fdcdb5f1b15..6c38e9e6cfd 100644 --- a/include/Inventor/VRMLnodes/SoVRMLMovieTexture.h +++ b/include/Inventor/VRMLnodes/SoVRMLMovieTexture.h @@ -67,7 +67,9 @@ class COIN_DLL_API SoVRMLMovieTexture : public SoVRMLTexture SoSFColor blendColor; SoSFBool scaleTexCoord; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: virtual ~SoVRMLMovieTexture(); diff --git a/include/Inventor/VRMLnodes/SoVRMLNavigationInfo.h b/include/Inventor/VRMLnodes/SoVRMLNavigationInfo.h index a0fbc8cd719..fedec25e62f 100644 --- a/include/Inventor/VRMLnodes/SoVRMLNavigationInfo.h +++ b/include/Inventor/VRMLnodes/SoVRMLNavigationInfo.h @@ -57,7 +57,9 @@ class COIN_DLL_API SoVRMLNavigationInfo : public SoNode SoSFFloat visibilityLimit; SoSFBool headlight; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: virtual ~SoVRMLNavigationInfo(); diff --git a/include/Inventor/VRMLnodes/SoVRMLNormal.h b/include/Inventor/VRMLnodes/SoVRMLNormal.h index 22431776472..83436a3695d 100644 --- a/include/Inventor/VRMLnodes/SoVRMLNormal.h +++ b/include/Inventor/VRMLnodes/SoVRMLNormal.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLNormal : public SoNode SoMFVec3f vector; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLPixelTexture.h b/include/Inventor/VRMLnodes/SoVRMLPixelTexture.h index 2ae4d26df69..bdaa74a2e25 100644 --- a/include/Inventor/VRMLnodes/SoVRMLPixelTexture.h +++ b/include/Inventor/VRMLnodes/SoVRMLPixelTexture.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLPixelTexture : public SoVRMLTexture SoSFImage image; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void rayPick(SoRayPickAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLPointLight.h b/include/Inventor/VRMLnodes/SoVRMLPointLight.h index 8bf6b483a1f..870aaab8672 100644 --- a/include/Inventor/VRMLnodes/SoVRMLPointLight.h +++ b/include/Inventor/VRMLnodes/SoVRMLPointLight.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLPointLight : public SoVRMLLight SoSFFloat radius; SoSFVec3f attenuation; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: virtual ~SoVRMLPointLight(); diff --git a/include/Inventor/VRMLnodes/SoVRMLPointSet.h b/include/Inventor/VRMLnodes/SoVRMLPointSet.h index 923f35a86c2..adc1747d262 100644 --- a/include/Inventor/VRMLnodes/SoVRMLPointSet.h +++ b/include/Inventor/VRMLnodes/SoVRMLPointSet.h @@ -46,7 +46,9 @@ class COIN_DLL_API SoVRMLPointSet : public SoVRMLVertexPoint static void initClass(void); SoVRMLPointSet(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; protected: diff --git a/include/Inventor/VRMLnodes/SoVRMLProximitySensor.h b/include/Inventor/VRMLnodes/SoVRMLProximitySensor.h index 5734b3b117b..b7e4464afc8 100644 --- a/include/Inventor/VRMLnodes/SoVRMLProximitySensor.h +++ b/include/Inventor/VRMLnodes/SoVRMLProximitySensor.h @@ -62,7 +62,9 @@ class COIN_DLL_API SoVRMLProximitySensor : public SoNode SbBool affectsState(void) const override; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void rayPick(SoRayPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLScript.h b/include/Inventor/VRMLnodes/SoVRMLScript.h index 450bd786826..ae21c5d02ab 100644 --- a/include/Inventor/VRMLnodes/SoVRMLScript.h +++ b/include/Inventor/VRMLnodes/SoVRMLScript.h @@ -60,7 +60,9 @@ class COIN_DLL_API SoVRMLScript : public SoNode void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLShape.h b/include/Inventor/VRMLnodes/SoVRMLShape.h index b3d9fbcdaf1..fa47eeacf74 100644 --- a/include/Inventor/VRMLnodes/SoVRMLShape.h +++ b/include/Inventor/VRMLnodes/SoVRMLShape.h @@ -66,7 +66,9 @@ class COIN_DLL_API SoVRMLShape : public SoNode void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void rayPick(SoRayPickAction * action) override; void search(SoSearchAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLSphere.h b/include/Inventor/VRMLnodes/SoVRMLSphere.h index 02dbcee86fa..4b036462eb1 100644 --- a/include/Inventor/VRMLnodes/SoVRMLSphere.h +++ b/include/Inventor/VRMLnodes/SoVRMLSphere.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoVRMLSphere : public SoVRMLGeometry SoSFFloat radius; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLSpotLight.h b/include/Inventor/VRMLnodes/SoVRMLSpotLight.h index 294820ff5dd..a67fee81325 100644 --- a/include/Inventor/VRMLnodes/SoVRMLSpotLight.h +++ b/include/Inventor/VRMLnodes/SoVRMLSpotLight.h @@ -54,7 +54,9 @@ class COIN_DLL_API SoVRMLSpotLight : public SoVRMLLight SoSFFloat radius; SoSFVec3f attenuation; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: virtual ~SoVRMLSpotLight(); diff --git a/include/Inventor/VRMLnodes/SoVRMLSwitch.h b/include/Inventor/VRMLnodes/SoVRMLSwitch.h index 0c24152b78e..c67fb00eac5 100644 --- a/include/Inventor/VRMLnodes/SoVRMLSwitch.h +++ b/include/Inventor/VRMLnodes/SoVRMLSwitch.h @@ -77,7 +77,9 @@ class COIN_DLL_API SoVRMLSwitch : public SoGroup void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLText.h b/include/Inventor/VRMLnodes/SoVRMLText.h index 0a2a5bb3883..4d9f4873876 100644 --- a/include/Inventor/VRMLnodes/SoVRMLText.h +++ b/include/Inventor/VRMLnodes/SoVRMLText.h @@ -62,7 +62,9 @@ class COIN_DLL_API SoVRMLText : public SoVRMLGeometry MIDDLE = 0x03 }; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void notify(SoNotList * list) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLTexture.h b/include/Inventor/VRMLnodes/SoVRMLTexture.h index 5a97cad677f..633ae427394 100644 --- a/include/Inventor/VRMLnodes/SoVRMLTexture.h +++ b/include/Inventor/VRMLnodes/SoVRMLTexture.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoVRMLTexture : public SoNode SoSFBool repeatS; SoSFBool repeatT; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: SoVRMLTexture(void); diff --git a/include/Inventor/VRMLnodes/SoVRMLTextureCoordinate.h b/include/Inventor/VRMLnodes/SoVRMLTextureCoordinate.h index 226bb80236d..57eabac467f 100644 --- a/include/Inventor/VRMLnodes/SoVRMLTextureCoordinate.h +++ b/include/Inventor/VRMLnodes/SoVRMLTextureCoordinate.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoVRMLTextureCoordinate : public SoNode void doAction( SoAction * action ) override; void callback( SoCallbackAction * action ) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif void pick( SoPickAction * action ) override; void getPrimitiveCount( SoGetPrimitiveCountAction * action ) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLTextureTransform.h b/include/Inventor/VRMLnodes/SoVRMLTextureTransform.h index ad0ed27abac..fd79d4f7243 100644 --- a/include/Inventor/VRMLnodes/SoVRMLTextureTransform.h +++ b/include/Inventor/VRMLnodes/SoVRMLTextureTransform.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoVRMLTextureTransform : public SoNode void doAction( SoAction * action ) override; void callback( SoCallbackAction * action ) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif void getMatrix( SoGetMatrixAction * action ) override; void pick( SoPickAction * action ) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLTransform.h b/include/Inventor/VRMLnodes/SoVRMLTransform.h index 883ccb999bf..1cd404a837e 100644 --- a/include/Inventor/VRMLnodes/SoVRMLTransform.h +++ b/include/Inventor/VRMLnodes/SoVRMLTransform.h @@ -77,8 +77,10 @@ class COIN_DLL_API SoVRMLTransform : public SoVRMLGroup void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void audioRender(SoAudioRenderAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; +#endif void notify(SoNotList * list) override; diff --git a/include/Inventor/VRMLnodes/SoVRMLVertexLine.h b/include/Inventor/VRMLnodes/SoVRMLVertexLine.h index 7edbf0572bb..2ec1ad5a511 100644 --- a/include/Inventor/VRMLnodes/SoVRMLVertexLine.h +++ b/include/Inventor/VRMLnodes/SoVRMLVertexLine.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLVertexLine : public SoVRMLGeometry { SoSFBool colorPerVertex; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; @@ -62,7 +64,9 @@ class COIN_DLL_API SoVRMLVertexLine : public SoVRMLGeometry { SoVRMLVertexLine(void); virtual ~SoVRMLVertexLine(); +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool shouldGLRender(SoGLRenderAction * action) override; +#endif }; // class SoVRMLVertexLine diff --git a/include/Inventor/VRMLnodes/SoVRMLVertexPoint.h b/include/Inventor/VRMLnodes/SoVRMLVertexPoint.h index 70b127f2797..3138c5e1675 100644 --- a/include/Inventor/VRMLnodes/SoVRMLVertexPoint.h +++ b/include/Inventor/VRMLnodes/SoVRMLVertexPoint.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoVRMLVertexPoint : public SoVRMLGeometry SoSFNode color; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; @@ -63,7 +65,9 @@ class COIN_DLL_API SoVRMLVertexPoint : public SoVRMLGeometry SoVRMLVertexPoint(void); virtual ~SoVRMLVertexPoint(); +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool shouldGLRender(SoGLRenderAction * action) override; +#endif virtual void computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center) override; }; // class SoVRMLVertexPoint diff --git a/include/Inventor/VRMLnodes/SoVRMLVertexShape.h b/include/Inventor/VRMLnodes/SoVRMLVertexShape.h index e57ae4c0263..2c1bd6cc392 100644 --- a/include/Inventor/VRMLnodes/SoVRMLVertexShape.h +++ b/include/Inventor/VRMLnodes/SoVRMLVertexShape.h @@ -74,7 +74,9 @@ class COIN_DLL_API SoVRMLVertexShape : public SoVRMLGeometry virtual SbBool generateDefaultNormals(SoState * s, SoNormalCache * nc); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; @@ -85,7 +87,9 @@ class COIN_DLL_API SoVRMLVertexShape : public SoVRMLGeometry SoVRMLVertexShape(void); virtual ~SoVRMLVertexShape(); +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool shouldGLRender(SoGLRenderAction * action) override; +#endif void setNormalCache(SoState * s, int numNormals, SbVec3f * normals); SoNormalCache * getNormalCache(void) const; diff --git a/include/Inventor/VRMLnodes/SoVRMLViewpoint.h b/include/Inventor/VRMLnodes/SoVRMLViewpoint.h index 15239d97e3a..45c754898ea 100644 --- a/include/Inventor/VRMLnodes/SoVRMLViewpoint.h +++ b/include/Inventor/VRMLnodes/SoVRMLViewpoint.h @@ -59,7 +59,9 @@ class COIN_DLL_API SoVRMLViewpoint : public SoNode SoSFString description; SoSFBool jump; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoVRMLViewpoint(); diff --git a/include/Inventor/VRMLnodes/SoVRMLVisibilitySensor.h b/include/Inventor/VRMLnodes/SoVRMLVisibilitySensor.h index 6248153a901..7e9fa49748d 100644 --- a/include/Inventor/VRMLnodes/SoVRMLVisibilitySensor.h +++ b/include/Inventor/VRMLnodes/SoVRMLVisibilitySensor.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoVRMLVisibilitySensor : public SoNode SoSFTime exitTime; SoSFBool isActive; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender( SoGLRenderAction * action ) override; +#endif protected: virtual ~SoVRMLVisibilitySensor(); diff --git a/include/Inventor/annex/Profiler/nodes/SoProfilerStats.h b/include/Inventor/annex/Profiler/nodes/SoProfilerStats.h index 5edc4f1efd5..0e850e3066e 100644 --- a/include/Inventor/annex/Profiler/nodes/SoProfilerStats.h +++ b/include/Inventor/annex/Profiler/nodes/SoProfilerStats.h @@ -77,7 +77,9 @@ class COIN_DLL_API SoProfilerStats : public SoNode { // SoMFNode handlingNode; // SoMFTime handlingTimePerNode; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void handleEvent(SoHandleEventAction * action) override; void rayPick(SoRayPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; diff --git a/include/Inventor/bundles/SoMaterialBundle.h b/include/Inventor/bundles/SoMaterialBundle.h index 07e3eae46e6..3f44efb0a92 100644 --- a/include/Inventor/bundles/SoMaterialBundle.h +++ b/include/Inventor/bundles/SoMaterialBundle.h @@ -36,7 +36,9 @@ #include #include +#if COIN_HAVE_LEGACY_GL_RENDERER class SoGLLazyElement; +#endif class COIN_DLL_API SoMaterialBundle : public SoBundle { typedef SoBundle inherited; @@ -59,7 +61,9 @@ class COIN_DLL_API SoMaterialBundle : public SoBundle { SbBool firsttime; SbBool coloronly; int currindex; +#if COIN_HAVE_LEGACY_GL_RENDERER const SoGLLazyElement * lazyelem; +#endif }; #endif // !COIN_SOMATERIALBUNDLE_H diff --git a/include/Inventor/draggers/SoDragger.h b/include/Inventor/draggers/SoDragger.h index 372075393a2..fe268c719db 100644 --- a/include/Inventor/draggers/SoDragger.h +++ b/include/Inventor/draggers/SoDragger.h @@ -72,7 +72,9 @@ class COIN_DLL_API SoDragger : public SoInteractionKit { // override these in case we decide to do some extra work later void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getMatrix(SoGetMatrixAction * action) override; void rayPick(SoRayPickAction * action) override; void search(SoSearchAction * action) override; diff --git a/include/Inventor/draggers/SoTabPlaneDragger.h b/include/Inventor/draggers/SoTabPlaneDragger.h index e471bd7683c..da50c42c442 100644 --- a/include/Inventor/draggers/SoTabPlaneDragger.h +++ b/include/Inventor/draggers/SoTabPlaneDragger.h @@ -78,7 +78,9 @@ class COIN_DLL_API SoTabPlaneDragger : public SoDragger { protected: virtual ~SoTabPlaneDragger(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE) override; void setDefaultOnNonWritingFields(void) override; diff --git a/include/Inventor/manips/SoClipPlaneManip.h b/include/Inventor/manips/SoClipPlaneManip.h index c96eef48db1..d2eaba004a1 100644 --- a/include/Inventor/manips/SoClipPlaneManip.h +++ b/include/Inventor/manips/SoClipPlaneManip.h @@ -63,7 +63,9 @@ class COIN_DLL_API SoClipPlaneManip : public SoClipPlane { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/manips/SoDirectionalLightManip.h b/include/Inventor/manips/SoDirectionalLightManip.h index a77db4fc274..d46bdc9a972 100644 --- a/include/Inventor/manips/SoDirectionalLightManip.h +++ b/include/Inventor/manips/SoDirectionalLightManip.h @@ -63,7 +63,9 @@ class COIN_DLL_API SoDirectionalLightManip : public SoDirectionalLight { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/manips/SoPointLightManip.h b/include/Inventor/manips/SoPointLightManip.h index d29638b9b26..16c062cbb50 100644 --- a/include/Inventor/manips/SoPointLightManip.h +++ b/include/Inventor/manips/SoPointLightManip.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoPointLightManip : public SoPointLight { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/manips/SoSpotLightManip.h b/include/Inventor/manips/SoSpotLightManip.h index 4b688a6cb23..4f925656b89 100644 --- a/include/Inventor/manips/SoSpotLightManip.h +++ b/include/Inventor/manips/SoSpotLightManip.h @@ -62,7 +62,9 @@ class COIN_DLL_API SoSpotLightManip : public SoSpotLight { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/manips/SoTransformManip.h b/include/Inventor/manips/SoTransformManip.h index 315f944a6a7..3996b88cf25 100644 --- a/include/Inventor/manips/SoTransformManip.h +++ b/include/Inventor/manips/SoTransformManip.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoTransformManip : public SoTransform { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodekits/SoBaseKit.h b/include/Inventor/nodekits/SoBaseKit.h index c9bfc74f348..2fa12a6fed5 100644 --- a/include/Inventor/nodekits/SoBaseKit.h +++ b/include/Inventor/nodekits/SoBaseKit.h @@ -88,7 +88,9 @@ class COIN_DLL_API SoBaseKit : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodekits/SoNodeKitListPart.h b/include/Inventor/nodekits/SoNodeKitListPart.h index 65a8b312408..62a86935e1a 100644 --- a/include/Inventor/nodekits/SoNodeKitListPart.h +++ b/include/Inventor/nodekits/SoNodeKitListPart.h @@ -72,7 +72,9 @@ class COIN_DLL_API SoNodeKitListPart : public SoNode { SbBool affectsState(void) const override; void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodes/SoAlphaTest.h b/include/Inventor/nodes/SoAlphaTest.h index 20e7babec3f..f43de64ff09 100644 --- a/include/Inventor/nodes/SoAlphaTest.h +++ b/include/Inventor/nodes/SoAlphaTest.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoAlphaTest : public SoNode { SoSFEnum function; SoSFFloat value; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoAlphaTest(); diff --git a/include/Inventor/nodes/SoAnnotation.h b/include/Inventor/nodes/SoAnnotation.h index 7293a38cc36..f7ba4b3daac 100644 --- a/include/Inventor/nodes/SoAnnotation.h +++ b/include/Inventor/nodes/SoAnnotation.h @@ -45,10 +45,12 @@ class COIN_DLL_API SoAnnotation : public SoSeparator { static void initClass(void); SoAnnotation(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; void GLRenderOffPath(SoGLRenderAction * action) override; +#endif protected: virtual ~SoAnnotation(); diff --git a/include/Inventor/nodes/SoAntiSquish.h b/include/Inventor/nodes/SoAntiSquish.h index cd8b0ec9fe7..b56844eb1f7 100644 --- a/include/Inventor/nodes/SoAntiSquish.h +++ b/include/Inventor/nodes/SoAntiSquish.h @@ -63,7 +63,9 @@ class COIN_DLL_API SoAntiSquish : public SoTransformation { virtual ~SoAntiSquish(); void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoArray.h b/include/Inventor/nodes/SoArray.h index af7ed412343..3cda5400553 100644 --- a/include/Inventor/nodes/SoArray.h +++ b/include/Inventor/nodes/SoArray.h @@ -64,7 +64,9 @@ class COIN_DLL_API SoArray : public SoGroup { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodes/SoAsciiText.h b/include/Inventor/nodes/SoAsciiText.h index 89c0d51c087..a53ba9d27a1 100644 --- a/include/Inventor/nodes/SoAsciiText.h +++ b/include/Inventor/nodes/SoAsciiText.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoAsciiText : public SoShape { SoSFEnum justification; SoMFFloat width; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; protected: diff --git a/include/Inventor/nodes/SoBaseColor.h b/include/Inventor/nodes/SoBaseColor.h index 851e39c9c90..59f7691088f 100644 --- a/include/Inventor/nodes/SoBaseColor.h +++ b/include/Inventor/nodes/SoBaseColor.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoBaseColor : public SoNode { SoMFColor rgb; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/nodes/SoBumpMap.h b/include/Inventor/nodes/SoBumpMap.h index 79edd8625d4..bb9221c2637 100644 --- a/include/Inventor/nodes/SoBumpMap.h +++ b/include/Inventor/nodes/SoBumpMap.h @@ -63,7 +63,9 @@ class COIN_DLL_API SoBumpMap : public SoNode { SoSFEnum wrapT; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void rayPick(SoRayPickAction * action) override; diff --git a/include/Inventor/nodes/SoBumpMapCoordinate.h b/include/Inventor/nodes/SoBumpMapCoordinate.h index aea1fa922ff..0122add7853 100644 --- a/include/Inventor/nodes/SoBumpMapCoordinate.h +++ b/include/Inventor/nodes/SoBumpMapCoordinate.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoBumpMapCoordinate : public SoNode { SoMFVec2f point; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoBumpMapTransform.h b/include/Inventor/nodes/SoBumpMapTransform.h index 9f6e72b8c46..28b5d4b3112 100644 --- a/include/Inventor/nodes/SoBumpMapTransform.h +++ b/include/Inventor/nodes/SoBumpMapTransform.h @@ -55,7 +55,9 @@ class COIN_DLL_API SoBumpMapTransform : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoCacheHint.h b/include/Inventor/nodes/SoCacheHint.h index 6a9ec5bb9ce..2dbe1802435 100644 --- a/include/Inventor/nodes/SoCacheHint.h +++ b/include/Inventor/nodes/SoCacheHint.h @@ -55,7 +55,9 @@ class COIN_DLL_API SoCacheHint : public SoNode { SoSFFloat gfxValue; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoCallback.h b/include/Inventor/nodes/SoCallback.h index 17856f5b1f1..158bfccb481 100644 --- a/include/Inventor/nodes/SoCallback.h +++ b/include/Inventor/nodes/SoCallback.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoCallback : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodes/SoCamera.h b/include/Inventor/nodes/SoCamera.h index 61a6fe3fcb1..495c1b4c59c 100644 --- a/include/Inventor/nodes/SoCamera.h +++ b/include/Inventor/nodes/SoCamera.h @@ -115,7 +115,9 @@ class COIN_DLL_API SoCamera : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void audioRender(SoAudioRenderAction *action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; @@ -137,10 +139,12 @@ class COIN_DLL_API SoCamera : public SoNode { SbViewportRegion & resultvp, const SbBool considermodelmatrix = TRUE); +#if COIN_HAVE_LEGACY_GL_RENDERER void drawCroppedFrame(SoGLRenderAction * action, const int viewportmapping, const SbViewportRegion & oldvp, const SbViewportRegion & newvp); +#endif void lookAt(const SbVec3f & dir, const SbVec3f & up); diff --git a/include/Inventor/nodes/SoClipPlane.h b/include/Inventor/nodes/SoClipPlane.h index 5f55d129115..1ba4eb96998 100644 --- a/include/Inventor/nodes/SoClipPlane.h +++ b/include/Inventor/nodes/SoClipPlane.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoClipPlane : public SoNode { SoSFBool on; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoColorIndex.h b/include/Inventor/nodes/SoColorIndex.h index cae70a870ad..bee07150c57 100644 --- a/include/Inventor/nodes/SoColorIndex.h +++ b/include/Inventor/nodes/SoColorIndex.h @@ -47,7 +47,9 @@ class COIN_DLL_API SoColorIndex : public SoNode { SoMFInt32 index; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoColorIndex(); diff --git a/include/Inventor/nodes/SoComplexity.h b/include/Inventor/nodes/SoComplexity.h index 424b4dfb06b..31f82202b8c 100644 --- a/include/Inventor/nodes/SoComplexity.h +++ b/include/Inventor/nodes/SoComplexity.h @@ -60,7 +60,9 @@ class COIN_DLL_API SoComplexity : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoCone.h b/include/Inventor/nodes/SoCone.h index b11425448c7..f95cedaf939 100644 --- a/include/Inventor/nodes/SoCone.h +++ b/include/Inventor/nodes/SoCone.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoCone : public SoShape { void removePart(SoCone::Part part); SbBool hasPart(SoCone::Part part) const; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoCoordinate3.h b/include/Inventor/nodes/SoCoordinate3.h index b980ac37469..df980c0c7b5 100644 --- a/include/Inventor/nodes/SoCoordinate3.h +++ b/include/Inventor/nodes/SoCoordinate3.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoCoordinate3 : public SoNode { SoMFVec3f point; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoCoordinate4.h b/include/Inventor/nodes/SoCoordinate4.h index 56437e27054..1dc8df3409d 100644 --- a/include/Inventor/nodes/SoCoordinate4.h +++ b/include/Inventor/nodes/SoCoordinate4.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoCoordinate4 : public SoNode { SoMFVec4f point; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoCube.h b/include/Inventor/nodes/SoCube.h index fca123dd4a4..faaa69df7cf 100644 --- a/include/Inventor/nodes/SoCube.h +++ b/include/Inventor/nodes/SoCube.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoCube : public SoShape { SoSFFloat height; SoSFFloat depth; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoCylinder.h b/include/Inventor/nodes/SoCylinder.h index 54387034b50..e665054fee2 100644 --- a/include/Inventor/nodes/SoCylinder.h +++ b/include/Inventor/nodes/SoCylinder.h @@ -64,7 +64,9 @@ class COIN_DLL_API SoCylinder : public SoShape { void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoCylinder(); diff --git a/include/Inventor/nodes/SoDepthBuffer.h b/include/Inventor/nodes/SoDepthBuffer.h index a5728cb4432..8ac4efa3967 100644 --- a/include/Inventor/nodes/SoDepthBuffer.h +++ b/include/Inventor/nodes/SoDepthBuffer.h @@ -64,7 +64,9 @@ class COIN_DLL_API SoDepthBuffer : public SoNode { SoSFEnum function; SoSFVec2f range; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoDepthBuffer(); diff --git a/include/Inventor/nodes/SoDirectionalLight.h b/include/Inventor/nodes/SoDirectionalLight.h index 3aed15761e9..ea03a12a6e9 100644 --- a/include/Inventor/nodes/SoDirectionalLight.h +++ b/include/Inventor/nodes/SoDirectionalLight.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoDirectionalLight : public SoLight { SoSFVec3f direction; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoDirectionalLight(); diff --git a/include/Inventor/nodes/SoDrawStyle.h b/include/Inventor/nodes/SoDrawStyle.h index 883f1266412..906cb3d9e3d 100644 --- a/include/Inventor/nodes/SoDrawStyle.h +++ b/include/Inventor/nodes/SoDrawStyle.h @@ -63,7 +63,9 @@ class COIN_DLL_API SoDrawStyle : public SoNode { SoSFInt32 linePatternScaleFactor; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/nodes/SoEnvironment.h b/include/Inventor/nodes/SoEnvironment.h index c936a744f52..bd916c35f0c 100644 --- a/include/Inventor/nodes/SoEnvironment.h +++ b/include/Inventor/nodes/SoEnvironment.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoEnvironment : public SoNode { SMOKE = SoEnvironmentElement::SMOKE }; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; SoSFFloat ambientIntensity; diff --git a/include/Inventor/nodes/SoFaceSet.h b/include/Inventor/nodes/SoFaceSet.h index 5b41d91b68e..8dae06e8959 100644 --- a/include/Inventor/nodes/SoFaceSet.h +++ b/include/Inventor/nodes/SoFaceSet.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoFaceSet : public SoNonIndexedShape { SoMFInt32 numVertices; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif SbBool generateDefaultNormals(SoState * state, SoNormalBundle * nb) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; @@ -70,7 +72,9 @@ class COIN_DLL_API SoFaceSet : public SoNonIndexedShape { Binding findMaterialBinding(SoState * const state) const; Binding findNormalBinding(SoState * const state) const; +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool useConvexCache(SoAction * action); +#endif void notify(SoNotList * list) override; SoFaceSetP * pimpl; diff --git a/include/Inventor/nodes/SoFile.h b/include/Inventor/nodes/SoFile.h index 71c3a09d0db..1c7e27e9c88 100644 --- a/include/Inventor/nodes/SoFile.h +++ b/include/Inventor/nodes/SoFile.h @@ -53,7 +53,9 @@ class COIN_DLL_API SoFile : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodes/SoFont.h b/include/Inventor/nodes/SoFont.h index f3fed744fad..f6e5cf313d5 100644 --- a/include/Inventor/nodes/SoFont.h +++ b/include/Inventor/nodes/SoFont.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoFont : public SoNode { void doAction(SoAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoFontStyle.h b/include/Inventor/nodes/SoFontStyle.h index 7f549731ab4..37a258c86ef 100644 --- a/include/Inventor/nodes/SoFontStyle.h +++ b/include/Inventor/nodes/SoFontStyle.h @@ -66,7 +66,9 @@ class COIN_DLL_API SoFontStyle : public SoFont { void doAction(SoAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoGeoCoordinate.h b/include/Inventor/nodes/SoGeoCoordinate.h index aaa64ee0fcd..423b6b2114e 100644 --- a/include/Inventor/nodes/SoGeoCoordinate.h +++ b/include/Inventor/nodes/SoGeoCoordinate.h @@ -57,7 +57,9 @@ class COIN_DLL_API SoGeoCoordinate : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoGeoLocation.h b/include/Inventor/nodes/SoGeoLocation.h index 5511df17de8..9d5a30df417 100644 --- a/include/Inventor/nodes/SoGeoLocation.h +++ b/include/Inventor/nodes/SoGeoLocation.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoGeoLocation : public SoTransformation { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoGeoOrigin.h b/include/Inventor/nodes/SoGeoOrigin.h index ec8ccf1c4fe..ff3a1416da4 100644 --- a/include/Inventor/nodes/SoGeoOrigin.h +++ b/include/Inventor/nodes/SoGeoOrigin.h @@ -54,7 +54,9 @@ class COIN_DLL_API SoGeoOrigin : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoGeoSeparator.h b/include/Inventor/nodes/SoGeoSeparator.h index b5bd3d1a151..99ba1e425d9 100644 --- a/include/Inventor/nodes/SoGeoSeparator.h +++ b/include/Inventor/nodes/SoGeoSeparator.h @@ -56,8 +56,10 @@ class COIN_DLL_API SoGeoSeparator : public SoSeparator { SoMFString geoSystem; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void rayPick(SoRayPickAction * action) override; diff --git a/include/Inventor/nodes/SoGroup.h b/include/Inventor/nodes/SoGroup.h index 8eef20acd8a..76f9851d299 100644 --- a/include/Inventor/nodes/SoGroup.h +++ b/include/Inventor/nodes/SoGroup.h @@ -60,7 +60,9 @@ class COIN_DLL_API SoGroup : public SoNode { virtual void replaceChild(SoNode * oldchild, SoNode * newchild); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; diff --git a/include/Inventor/nodes/SoImage.h b/include/Inventor/nodes/SoImage.h index 57bb4fdb59b..f540bf68c99 100644 --- a/include/Inventor/nodes/SoImage.h +++ b/include/Inventor/nodes/SoImage.h @@ -72,7 +72,9 @@ class COIN_DLL_API SoImage : public SoShape { SoSFImage image; SoSFString filename; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoIndexedFaceSet.h b/include/Inventor/nodes/SoIndexedFaceSet.h index e01704224cb..3e3a23b2c55 100644 --- a/include/Inventor/nodes/SoIndexedFaceSet.h +++ b/include/Inventor/nodes/SoIndexedFaceSet.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoIndexedFaceSet : public SoIndexedShape { static void initClass(void); SoIndexedFaceSet(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; virtual SbBool generateDefaultNormals(SoState * state, @@ -74,10 +76,12 @@ class COIN_DLL_API SoIndexedFaceSet : public SoIndexedShape { NONE = OVERALL }; +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool useConvexCache(SoAction * action, const SbVec3f * normals, const int32_t * nindices, const SbBool normalsfromcache); +#endif Binding findMaterialBinding(SoState * const state) const; Binding findNormalBinding(SoState * const state) const; void notify(SoNotList * list) override; diff --git a/include/Inventor/nodes/SoIndexedLineSet.h b/include/Inventor/nodes/SoIndexedLineSet.h index fd35cc55ce3..0235887af6c 100644 --- a/include/Inventor/nodes/SoIndexedLineSet.h +++ b/include/Inventor/nodes/SoIndexedLineSet.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoIndexedLineSet : public SoIndexedShape { static void initClass(void); SoIndexedLineSet(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoIndexedMarkerSet.h b/include/Inventor/nodes/SoIndexedMarkerSet.h index 770d641e8d8..a6ce52ee3f1 100644 --- a/include/Inventor/nodes/SoIndexedMarkerSet.h +++ b/include/Inventor/nodes/SoIndexedMarkerSet.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoIndexedMarkerSet : public SoIndexedPointSet { SoMFInt32 markerIndex; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoIndexedMarkerSet(); diff --git a/include/Inventor/nodes/SoIndexedNurbsCurve.h b/include/Inventor/nodes/SoIndexedNurbsCurve.h index e6ebc188a0a..aeeb8421084 100644 --- a/include/Inventor/nodes/SoIndexedNurbsCurve.h +++ b/include/Inventor/nodes/SoIndexedNurbsCurve.h @@ -54,7 +54,9 @@ class COIN_DLL_API SoIndexedNurbsCurve : public SoShape { SoMFInt32 coordIndex; SoMFFloat knotVector; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; diff --git a/include/Inventor/nodes/SoIndexedNurbsSurface.h b/include/Inventor/nodes/SoIndexedNurbsSurface.h index df641715e80..68ca3932144 100644 --- a/include/Inventor/nodes/SoIndexedNurbsSurface.h +++ b/include/Inventor/nodes/SoIndexedNurbsSurface.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoIndexedNurbsSurface : public SoShape { SoMFFloat sKnotVector; SoMFFloat tKnotVector; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void sendPrimitive(SoAction *, SoPrimitiveVertex *); diff --git a/include/Inventor/nodes/SoIndexedPointSet.h b/include/Inventor/nodes/SoIndexedPointSet.h index 7889cb334b6..b0da999ed9d 100644 --- a/include/Inventor/nodes/SoIndexedPointSet.h +++ b/include/Inventor/nodes/SoIndexedPointSet.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoIndexedPointSet : public SoIndexedShape { static void initClass(void); SoIndexedPointSet(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void notify(SoNotList * list) override; diff --git a/include/Inventor/nodes/SoIndexedTriangleStripSet.h b/include/Inventor/nodes/SoIndexedTriangleStripSet.h index f8beced1ea0..3fc42204ddf 100644 --- a/include/Inventor/nodes/SoIndexedTriangleStripSet.h +++ b/include/Inventor/nodes/SoIndexedTriangleStripSet.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoIndexedTriangleStripSet : public SoIndexedShape { static void initClass(void); SoIndexedTriangleStripSet(void); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; SbBool generateDefaultNormals(SoState * state, SoNormalBundle * nb) override; diff --git a/include/Inventor/nodes/SoLOD.h b/include/Inventor/nodes/SoLOD.h index 3198b16a185..e8253583c5e 100644 --- a/include/Inventor/nodes/SoLOD.h +++ b/include/Inventor/nodes/SoLOD.h @@ -56,10 +56,12 @@ class COIN_DLL_API SoLOD : public SoGroup { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; void GLRenderOffPath(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoLevelOfDetail.h b/include/Inventor/nodes/SoLevelOfDetail.h index 627a1d9c872..e0d16ae106b 100644 --- a/include/Inventor/nodes/SoLevelOfDetail.h +++ b/include/Inventor/nodes/SoLevelOfDetail.h @@ -54,7 +54,9 @@ class COIN_DLL_API SoLevelOfDetail : public SoGroup { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void audioRender(SoAudioRenderAction * action) override; diff --git a/include/Inventor/nodes/SoLightModel.h b/include/Inventor/nodes/SoLightModel.h index cfaf9760221..c75ab4cfbcc 100644 --- a/include/Inventor/nodes/SoLightModel.h +++ b/include/Inventor/nodes/SoLightModel.h @@ -54,7 +54,9 @@ class COIN_DLL_API SoLightModel : public SoNode { SoSFEnum model; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/nodes/SoLineSet.h b/include/Inventor/nodes/SoLineSet.h index ae63ad5e4fc..46daaf65f98 100644 --- a/include/Inventor/nodes/SoLineSet.h +++ b/include/Inventor/nodes/SoLineSet.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoLineSet : public SoNonIndexedShape { public: SoMFInt32 numVertices; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoLocateHighlight.h b/include/Inventor/nodes/SoLocateHighlight.h index 6af3babe224..787617c4513 100644 --- a/include/Inventor/nodes/SoLocateHighlight.h +++ b/include/Inventor/nodes/SoLocateHighlight.h @@ -63,8 +63,10 @@ class COIN_DLL_API SoLocateHighlight : public SoSeparator { SoSFEnum mode; void handleEvent(SoHandleEventAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; +#endif static void turnOffCurrentHighlight(SoGLRenderAction * action); protected: diff --git a/include/Inventor/nodes/SoMarkerSet.h b/include/Inventor/nodes/SoMarkerSet.h index 0a1df4f74db..0a20fbd75ba 100644 --- a/include/Inventor/nodes/SoMarkerSet.h +++ b/include/Inventor/nodes/SoMarkerSet.h @@ -88,7 +88,9 @@ class COIN_DLL_API SoMarkerSet : public SoPointSet { SoMFInt32 markerIndex; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; static int getNumDefinedMarkers(void); diff --git a/include/Inventor/nodes/SoMaterial.h b/include/Inventor/nodes/SoMaterial.h index eaf96f5aeb5..70aa91a689b 100644 --- a/include/Inventor/nodes/SoMaterial.h +++ b/include/Inventor/nodes/SoMaterial.h @@ -58,7 +58,9 @@ class COIN_DLL_API SoMaterial : public SoNode { SoMFFloat transparency; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/nodes/SoMaterialBinding.h b/include/Inventor/nodes/SoMaterialBinding.h index ce3fe44b59c..46ec5256cdf 100644 --- a/include/Inventor/nodes/SoMaterialBinding.h +++ b/include/Inventor/nodes/SoMaterialBinding.h @@ -64,7 +64,9 @@ class COIN_DLL_API SoMaterialBinding : public SoNode { SoSFEnum value; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoMatrixTransform.h b/include/Inventor/nodes/SoMatrixTransform.h index 2ab6e6b11fc..d4462a30ee2 100644 --- a/include/Inventor/nodes/SoMatrixTransform.h +++ b/include/Inventor/nodes/SoMatrixTransform.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoMatrixTransform : public SoTransformation { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoMultipleCopy.h b/include/Inventor/nodes/SoMultipleCopy.h index fc1453b2a0e..ddbba1347d3 100644 --- a/include/Inventor/nodes/SoMultipleCopy.h +++ b/include/Inventor/nodes/SoMultipleCopy.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoMultipleCopy : public SoGroup { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodes/SoNormal.h b/include/Inventor/nodes/SoNormal.h index fda858f673f..53c19860e31 100644 --- a/include/Inventor/nodes/SoNormal.h +++ b/include/Inventor/nodes/SoNormal.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoNormal : public SoNode { SoMFVec3f vector; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoNormalBinding.h b/include/Inventor/nodes/SoNormalBinding.h index 723e47aa228..700197105fd 100644 --- a/include/Inventor/nodes/SoNormalBinding.h +++ b/include/Inventor/nodes/SoNormalBinding.h @@ -64,7 +64,9 @@ class COIN_DLL_API SoNormalBinding : public SoNode { SoSFEnum value; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoNurbsCurve.h b/include/Inventor/nodes/SoNurbsCurve.h index 5e76b976ed9..a6404266f70 100644 --- a/include/Inventor/nodes/SoNurbsCurve.h +++ b/include/Inventor/nodes/SoNurbsCurve.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoNurbsCurve : public SoShape { SoSFInt32 numControlPoints; SoMFFloat knotVector; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; diff --git a/include/Inventor/nodes/SoNurbsSurface.h b/include/Inventor/nodes/SoNurbsSurface.h index e19799faaca..2286b5e2793 100644 --- a/include/Inventor/nodes/SoNurbsSurface.h +++ b/include/Inventor/nodes/SoNurbsSurface.h @@ -58,7 +58,9 @@ class COIN_DLL_API SoNurbsSurface : public SoShape { SoMFFloat sKnotVector; SoMFFloat tKnotVector; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void sendPrimitive(SoAction *, SoPrimitiveVertex *); diff --git a/include/Inventor/nodes/SoPackedColor.h b/include/Inventor/nodes/SoPackedColor.h index c317a09ddc9..c190ceb52f5 100644 --- a/include/Inventor/nodes/SoPackedColor.h +++ b/include/Inventor/nodes/SoPackedColor.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoPackedColor : public SoNode { SoMFUInt32 orderedRGBA; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; SbBool isTransparent(void); diff --git a/include/Inventor/nodes/SoPathSwitch.h b/include/Inventor/nodes/SoPathSwitch.h index 00b55f13257..74668aa440b 100644 --- a/include/Inventor/nodes/SoPathSwitch.h +++ b/include/Inventor/nodes/SoPathSwitch.h @@ -51,7 +51,9 @@ class COIN_DLL_API SoPathSwitch : public SoGroup { SoSFPath path; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodes/SoPointLight.h b/include/Inventor/nodes/SoPointLight.h index 1f979db62b7..8a1030616bd 100644 --- a/include/Inventor/nodes/SoPointLight.h +++ b/include/Inventor/nodes/SoPointLight.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoPointLight : public SoLight { SoSFVec3f location; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoPointLight(); diff --git a/include/Inventor/nodes/SoPointSet.h b/include/Inventor/nodes/SoPointSet.h index b05d9294c10..1f3a3cfade6 100644 --- a/include/Inventor/nodes/SoPointSet.h +++ b/include/Inventor/nodes/SoPointSet.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoPointSet : public SoNonIndexedShape { SoSFInt32 numPoints; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoPolygonOffset.h b/include/Inventor/nodes/SoPolygonOffset.h index 8dfd41b8da5..670ffb65783 100644 --- a/include/Inventor/nodes/SoPolygonOffset.h +++ b/include/Inventor/nodes/SoPolygonOffset.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoPolygonOffset : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoPolygonOffset(); diff --git a/include/Inventor/nodes/SoProfile.h b/include/Inventor/nodes/SoProfile.h index 36c5eb9fd02..5dc7613046b 100644 --- a/include/Inventor/nodes/SoProfile.h +++ b/include/Inventor/nodes/SoProfile.h @@ -60,7 +60,9 @@ class COIN_DLL_API SoProfile : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoProfileCoordinate2.h b/include/Inventor/nodes/SoProfileCoordinate2.h index a18b022e253..904e7fecc8a 100644 --- a/include/Inventor/nodes/SoProfileCoordinate2.h +++ b/include/Inventor/nodes/SoProfileCoordinate2.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoProfileCoordinate2 : public SoNode { SoMFVec2f point; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; diff --git a/include/Inventor/nodes/SoProfileCoordinate3.h b/include/Inventor/nodes/SoProfileCoordinate3.h index d059593f9c2..427408faf25 100644 --- a/include/Inventor/nodes/SoProfileCoordinate3.h +++ b/include/Inventor/nodes/SoProfileCoordinate3.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoProfileCoordinate3 : public SoNode { SoMFVec3f point; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; diff --git a/include/Inventor/nodes/SoQuadMesh.h b/include/Inventor/nodes/SoQuadMesh.h index 5585a6e7d7e..69c59d7d016 100644 --- a/include/Inventor/nodes/SoQuadMesh.h +++ b/include/Inventor/nodes/SoQuadMesh.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoQuadMesh : public SoNonIndexedShape { SoSFInt32 verticesPerColumn; SoSFInt32 verticesPerRow; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; SbBool generateDefaultNormals(SoState * state, SoNormalBundle * nb) override; diff --git a/include/Inventor/nodes/SoResetTransform.h b/include/Inventor/nodes/SoResetTransform.h index 6f74564eea4..015d13b161b 100644 --- a/include/Inventor/nodes/SoResetTransform.h +++ b/include/Inventor/nodes/SoResetTransform.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoResetTransform : public SoTransformation { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoRotation.h b/include/Inventor/nodes/SoRotation.h index dfe414cb4b5..f8cf3575dee 100644 --- a/include/Inventor/nodes/SoRotation.h +++ b/include/Inventor/nodes/SoRotation.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoRotation : public SoTransformation { SoSFRotation rotation; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; diff --git a/include/Inventor/nodes/SoRotationXYZ.h b/include/Inventor/nodes/SoRotationXYZ.h index 7cd1de90f97..6118540c238 100644 --- a/include/Inventor/nodes/SoRotationXYZ.h +++ b/include/Inventor/nodes/SoRotationXYZ.h @@ -60,7 +60,9 @@ class COIN_DLL_API SoRotationXYZ : public SoTransformation { SbRotation getRotation(void) const; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; diff --git a/include/Inventor/nodes/SoScale.h b/include/Inventor/nodes/SoScale.h index 273f5a24714..4481e277099 100644 --- a/include/Inventor/nodes/SoScale.h +++ b/include/Inventor/nodes/SoScale.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoScale : public SoTransformation { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoSceneTexture2.h b/include/Inventor/nodes/SoSceneTexture2.h index 44be4f768df..06d0eddb360 100644 --- a/include/Inventor/nodes/SoSceneTexture2.h +++ b/include/Inventor/nodes/SoSceneTexture2.h @@ -115,7 +115,9 @@ class COIN_DLL_API SoSceneTexture2 : public SoNode { void write(SoWriteAction * action) override; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void rayPick(SoRayPickAction * action) override; diff --git a/include/Inventor/nodes/SoSeparator.h b/include/Inventor/nodes/SoSeparator.h index c9902f09137..ef9f1dbb7d6 100644 --- a/include/Inventor/nodes/SoSeparator.h +++ b/include/Inventor/nodes/SoSeparator.h @@ -61,10 +61,12 @@ class COIN_DLL_API SoSeparator : public SoGroup { SoSFEnum pickCulling; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; void GLRenderBelowPath(SoGLRenderAction * action) override; void GLRenderInPath(SoGLRenderAction * action) override; void GLRenderOffPath(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; @@ -84,7 +86,9 @@ class COIN_DLL_API SoSeparator : public SoGroup { virtual ~SoSeparator(); virtual SbBool cullTest(SoState * state); +#if COIN_HAVE_LEGACY_GL_RENDERER virtual SbBool cullTest(SoGLRenderAction * action, int & cullresults); +#endif SbBool readInstance(SoInput * in, unsigned short flags) override; private: diff --git a/include/Inventor/nodes/SoShape.h b/include/Inventor/nodes/SoShape.h index 9955b5e6734..3e0aec1ece8 100644 --- a/include/Inventor/nodes/SoShape.h +++ b/include/Inventor/nodes/SoShape.h @@ -67,7 +67,9 @@ class COIN_DLL_API SoShape : public SoNode { void notify(SoNotList * nl) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void callback(SoCallbackAction * action) override; virtual void computeBBox(SoAction * action, SbBox3f & box, @@ -85,10 +87,12 @@ class COIN_DLL_API SoShape : public SoNode { float getComplexityValue(SoAction * action); virtual void generatePrimitives(SoAction * action) = 0; +#if COIN_HAVE_LEGACY_GL_RENDERER virtual SbBool shouldGLRender(SoGLRenderAction * action); void beginSolidShape(SoGLRenderAction * action); void endSolidShape(SoGLRenderAction * action); void GLRenderBoundingBox(SoGLRenderAction * action); +#endif SbBool shouldPrimitiveCount(SoGetPrimitiveCountAction * action); SbBool shouldRayPick(SoRayPickAction * const action); @@ -138,6 +142,7 @@ class COIN_DLL_API SoShape : public SoNode { const float r, const SbVec3f & normal); +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool startVertexArray(SoGLRenderAction * action, const SoCoordinateElement * coords, const SbVec3f * pervertexnormals, @@ -149,9 +154,12 @@ class COIN_DLL_API SoShape : public SoNode { const SbBool normpervertex, const SbBool texpervertex, const SbBool colorpervertex); +#endif private: class SoShapeP * pimpl; +#if COIN_HAVE_LEGACY_GL_RENDERER void validatePVCache(SoGLRenderAction * action); +#endif void getBBox(SoAction * action, SbBox3f & box, SbVec3f & center); void rayPickBoundingBox(SoRayPickAction * action); friend class soshape_primdata; // internal class diff --git a/include/Inventor/nodes/SoShapeHints.h b/include/Inventor/nodes/SoShapeHints.h index 8457cf1b918..c71ca0aab77 100644 --- a/include/Inventor/nodes/SoShapeHints.h +++ b/include/Inventor/nodes/SoShapeHints.h @@ -76,7 +76,9 @@ class COIN_DLL_API SoShapeHints : public SoNode { SoSFFloat creaseAngle; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoSphere.h b/include/Inventor/nodes/SoSphere.h index 24561a3fc30..d4601336dfb 100644 --- a/include/Inventor/nodes/SoSphere.h +++ b/include/Inventor/nodes/SoSphere.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoSphere : public SoShape { SoSFFloat radius; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoSpotLight.h b/include/Inventor/nodes/SoSpotLight.h index 0a6adf87be9..2fe6f280506 100644 --- a/include/Inventor/nodes/SoSpotLight.h +++ b/include/Inventor/nodes/SoSpotLight.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoSpotLight : public SoLight { SoSFFloat dropOffRate; SoSFFloat cutOffAngle; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoSpotLight(); diff --git a/include/Inventor/nodes/SoSurroundScale.h b/include/Inventor/nodes/SoSurroundScale.h index 1ff634fa9b9..60c379362ca 100644 --- a/include/Inventor/nodes/SoSurroundScale.h +++ b/include/Inventor/nodes/SoSurroundScale.h @@ -61,7 +61,9 @@ class COIN_DLL_API SoSurroundScale : public SoTransformation { virtual ~SoSurroundScale(); void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoSwitch.h b/include/Inventor/nodes/SoSwitch.h index ac475e53b2d..710fe3f725a 100644 --- a/include/Inventor/nodes/SoSwitch.h +++ b/include/Inventor/nodes/SoSwitch.h @@ -59,7 +59,9 @@ class COIN_DLL_API SoSwitch : public SoGroup { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/include/Inventor/nodes/SoText2.h b/include/Inventor/nodes/SoText2.h index d5f64c1eb09..e63f628e745 100644 --- a/include/Inventor/nodes/SoText2.h +++ b/include/Inventor/nodes/SoText2.h @@ -58,7 +58,9 @@ class COIN_DLL_API SoText2 : public SoShape { SoSFFloat spacing; SoSFEnum justification; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void rayPick(SoRayPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoText3.h b/include/Inventor/nodes/SoText3.h index 11b09eb1e13..550fc8b01ed 100644 --- a/include/Inventor/nodes/SoText3.h +++ b/include/Inventor/nodes/SoText3.h @@ -73,7 +73,9 @@ class COIN_DLL_API SoText3 : public SoShape { SbBox3f getCharacterBounds(SoState * state, int stringindex, int charindex); +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; protected: diff --git a/include/Inventor/nodes/SoTexture.h b/include/Inventor/nodes/SoTexture.h index e4ad25bd922..9429b1a93d4 100644 --- a/include/Inventor/nodes/SoTexture.h +++ b/include/Inventor/nodes/SoTexture.h @@ -45,7 +45,9 @@ class COIN_DLL_API SoTexture : public SoNode { static void cleanupClass(void); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/nodes/SoTexture2.h b/include/Inventor/nodes/SoTexture2.h index 4fcdce074d9..93ba39da11b 100644 --- a/include/Inventor/nodes/SoTexture2.h +++ b/include/Inventor/nodes/SoTexture2.h @@ -76,7 +76,9 @@ class COIN_DLL_API SoTexture2 : public SoTexture { SoSFBool enableCompressedTexture; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void rayPick(SoRayPickAction * action) override; diff --git a/include/Inventor/nodes/SoTexture2Transform.h b/include/Inventor/nodes/SoTexture2Transform.h index cdfce248334..7c1d6db1a16 100644 --- a/include/Inventor/nodes/SoTexture2Transform.h +++ b/include/Inventor/nodes/SoTexture2Transform.h @@ -55,7 +55,9 @@ class COIN_DLL_API SoTexture2Transform : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTexture3.h b/include/Inventor/nodes/SoTexture3.h index 7871961a51d..c3d7167ce99 100644 --- a/include/Inventor/nodes/SoTexture3.h +++ b/include/Inventor/nodes/SoTexture3.h @@ -75,7 +75,9 @@ class COIN_DLL_API SoTexture3 : public SoTexture { SoSFBool enableCompressedTexture; void doAction(SoAction *action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction *action) override; +#endif void callback(SoCallbackAction *action) override; protected: diff --git a/include/Inventor/nodes/SoTexture3Transform.h b/include/Inventor/nodes/SoTexture3Transform.h index ec620da395c..554834416c3 100644 --- a/include/Inventor/nodes/SoTexture3Transform.h +++ b/include/Inventor/nodes/SoTexture3Transform.h @@ -58,7 +58,9 @@ class COIN_DLL_API SoTexture3Transform : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCombine.h b/include/Inventor/nodes/SoTextureCombine.h index e75b27accc4..9f4019d12d7 100644 --- a/include/Inventor/nodes/SoTextureCombine.h +++ b/include/Inventor/nodes/SoTextureCombine.h @@ -88,7 +88,9 @@ class COIN_DLL_API SoTextureCombine : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; protected: diff --git a/include/Inventor/nodes/SoTextureCoordinate2.h b/include/Inventor/nodes/SoTextureCoordinate2.h index 7cd0fbeaec0..fc39c81bfe1 100644 --- a/include/Inventor/nodes/SoTextureCoordinate2.h +++ b/include/Inventor/nodes/SoTextureCoordinate2.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoTextureCoordinate2 : public SoNode { SoMFVec2f point; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCoordinate3.h b/include/Inventor/nodes/SoTextureCoordinate3.h index 5e977c7d2ba..02c2a7c1439 100644 --- a/include/Inventor/nodes/SoTextureCoordinate3.h +++ b/include/Inventor/nodes/SoTextureCoordinate3.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoTextureCoordinate3 : public SoNode { SoMFVec3f point; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCoordinateBinding.h b/include/Inventor/nodes/SoTextureCoordinateBinding.h index d29d8c2c764..27977d8f715 100644 --- a/include/Inventor/nodes/SoTextureCoordinateBinding.h +++ b/include/Inventor/nodes/SoTextureCoordinateBinding.h @@ -60,7 +60,9 @@ class COIN_DLL_API SoTextureCoordinateBinding : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; protected: diff --git a/include/Inventor/nodes/SoTextureCoordinateCube.h b/include/Inventor/nodes/SoTextureCoordinateCube.h index 2b80cd7d574..1c8852edee9 100644 --- a/include/Inventor/nodes/SoTextureCoordinateCube.h +++ b/include/Inventor/nodes/SoTextureCoordinateCube.h @@ -45,7 +45,9 @@ class COIN_DLL_API SoTextureCoordinateCube : public SoNode { SoTextureCoordinateCube(void); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCoordinateCylinder.h b/include/Inventor/nodes/SoTextureCoordinateCylinder.h index 5e9b6ccf56b..fce9d964ae8 100644 --- a/include/Inventor/nodes/SoTextureCoordinateCylinder.h +++ b/include/Inventor/nodes/SoTextureCoordinateCylinder.h @@ -45,7 +45,9 @@ class COIN_DLL_API SoTextureCoordinateCylinder : public SoNode { SoTextureCoordinateCylinder(void); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCoordinateDefault.h b/include/Inventor/nodes/SoTextureCoordinateDefault.h index 62ff193cb77..3679ab1201b 100644 --- a/include/Inventor/nodes/SoTextureCoordinateDefault.h +++ b/include/Inventor/nodes/SoTextureCoordinateDefault.h @@ -47,7 +47,9 @@ class COIN_DLL_API SoTextureCoordinateDefault : public SoTextureCoordinateFuncti void doAction(SoAction *action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCoordinateEnvironment.h b/include/Inventor/nodes/SoTextureCoordinateEnvironment.h index b388b468851..0d1e5059f7f 100644 --- a/include/Inventor/nodes/SoTextureCoordinateEnvironment.h +++ b/include/Inventor/nodes/SoTextureCoordinateEnvironment.h @@ -47,7 +47,9 @@ class COIN_DLL_API SoTextureCoordinateEnvironment : public SoTextureCoordinateFu SoTextureCoordinateEnvironment(void); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void callback(SoCallbackAction * action) override; @@ -58,7 +60,9 @@ class COIN_DLL_API SoTextureCoordinateEnvironment : public SoTextureCoordinateFu static const SbVec4f &generate(void * userdata, const SbVec3f & p, const SbVec3f & n); +#if COIN_HAVE_LEGACY_GL_RENDERER static void handleTexgen(void *data); +#endif }; #endif // !COIN_SOTEXTURECOORDINATEENVIRONMENT_H diff --git a/include/Inventor/nodes/SoTextureCoordinateNormalMap.h b/include/Inventor/nodes/SoTextureCoordinateNormalMap.h index ee2600c2ce5..88c66c147fe 100644 --- a/include/Inventor/nodes/SoTextureCoordinateNormalMap.h +++ b/include/Inventor/nodes/SoTextureCoordinateNormalMap.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoTextureCoordinateNormalMap : public SoTextureCoordinateFunc SoTextureCoordinateNormalMap(void); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void callback(SoCallbackAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCoordinateObject.h b/include/Inventor/nodes/SoTextureCoordinateObject.h index 673023a297f..459f7fdb532 100644 --- a/include/Inventor/nodes/SoTextureCoordinateObject.h +++ b/include/Inventor/nodes/SoTextureCoordinateObject.h @@ -52,7 +52,9 @@ class COIN_DLL_API SoTextureCoordinateObject : public SoTextureCoordinateFunctio SoSFVec4f factorQ; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void callback(SoCallbackAction * action) override; @@ -63,7 +65,9 @@ class COIN_DLL_API SoTextureCoordinateObject : public SoTextureCoordinateFunctio static const SbVec4f &generate(void *userdata, const SbVec3f & p, const SbVec3f & n); +#if COIN_HAVE_LEGACY_GL_RENDERER static void handleTexgen(void *data); +#endif SbVec4f dummy_object; }; diff --git a/include/Inventor/nodes/SoTextureCoordinatePlane.h b/include/Inventor/nodes/SoTextureCoordinatePlane.h index 46083377d4d..caeaa4194df 100644 --- a/include/Inventor/nodes/SoTextureCoordinatePlane.h +++ b/include/Inventor/nodes/SoTextureCoordinatePlane.h @@ -55,7 +55,9 @@ class COIN_DLL_API SoTextureCoordinatePlane : public SoTextureCoordinateFunction SoSFVec3f directionR; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void callback(SoCallbackAction * action) override; @@ -66,7 +68,9 @@ class COIN_DLL_API SoTextureCoordinatePlane : public SoTextureCoordinateFunction static const SbVec4f &generate(void *userdata, const SbVec3f &p, const SbVec3f &n); +#if COIN_HAVE_LEGACY_GL_RENDERER static void handleTexgen(void *data); +#endif SoTextureCoordinatePlaneP * pimpl; void setupGencache(void); diff --git a/include/Inventor/nodes/SoTextureCoordinateReflectionMap.h b/include/Inventor/nodes/SoTextureCoordinateReflectionMap.h index 7b07c74c82f..13f7bbf6bba 100644 --- a/include/Inventor/nodes/SoTextureCoordinateReflectionMap.h +++ b/include/Inventor/nodes/SoTextureCoordinateReflectionMap.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoTextureCoordinateReflectionMap : public SoTextureCoordinate SoTextureCoordinateReflectionMap(void); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void callback(SoCallbackAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCoordinateSphere.h b/include/Inventor/nodes/SoTextureCoordinateSphere.h index b97606dcfda..2c2c54543db 100644 --- a/include/Inventor/nodes/SoTextureCoordinateSphere.h +++ b/include/Inventor/nodes/SoTextureCoordinateSphere.h @@ -45,7 +45,9 @@ class COIN_DLL_API SoTextureCoordinateSphere : public SoNode { SoTextureCoordinateSphere(void); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureCubeMap.h b/include/Inventor/nodes/SoTextureCubeMap.h index a5a00a35225..f22112ecfab 100644 --- a/include/Inventor/nodes/SoTextureCubeMap.h +++ b/include/Inventor/nodes/SoTextureCubeMap.h @@ -81,7 +81,9 @@ class COIN_DLL_API SoTextureCubeMap : public SoTexture { SoSFColor blendColor; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void rayPick(SoRayPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureMatrixTransform.h b/include/Inventor/nodes/SoTextureMatrixTransform.h index f2045bbbf54..d7a1626135e 100644 --- a/include/Inventor/nodes/SoTextureMatrixTransform.h +++ b/include/Inventor/nodes/SoTextureMatrixTransform.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoTextureMatrixTransform : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTextureScalePolicy.h b/include/Inventor/nodes/SoTextureScalePolicy.h index 914c3b4eb24..a8018fe1638 100644 --- a/include/Inventor/nodes/SoTextureScalePolicy.h +++ b/include/Inventor/nodes/SoTextureScalePolicy.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoTextureScalePolicy : public SoNode { SoSFEnum policy; SoSFFloat quality; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif protected: virtual ~SoTextureScalePolicy(); diff --git a/include/Inventor/nodes/SoTextureUnit.h b/include/Inventor/nodes/SoTextureUnit.h index 772583619cc..24b00c86154 100644 --- a/include/Inventor/nodes/SoTextureUnit.h +++ b/include/Inventor/nodes/SoTextureUnit.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoTextureUnit : public SoNode { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; diff --git a/include/Inventor/nodes/SoTransform.h b/include/Inventor/nodes/SoTransform.h index 03d1e67fa6d..7d914def291 100644 --- a/include/Inventor/nodes/SoTransform.h +++ b/include/Inventor/nodes/SoTransform.h @@ -67,7 +67,9 @@ class COIN_DLL_API SoTransform : public SoTransformation { void recenter(const SbVec3f & newcenter); void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; diff --git a/include/Inventor/nodes/SoTransformSeparator.h b/include/Inventor/nodes/SoTransformSeparator.h index 773ba2a57f0..94ce7d54280 100644 --- a/include/Inventor/nodes/SoTransformSeparator.h +++ b/include/Inventor/nodes/SoTransformSeparator.h @@ -49,7 +49,9 @@ class COIN_DLL_API SoTransformSeparator : public SoGroup { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; diff --git a/include/Inventor/nodes/SoTranslation.h b/include/Inventor/nodes/SoTranslation.h index c485d3a3101..ca93e404dd6 100644 --- a/include/Inventor/nodes/SoTranslation.h +++ b/include/Inventor/nodes/SoTranslation.h @@ -50,7 +50,9 @@ class COIN_DLL_API SoTranslation : public SoTransformation { void doAction(SoAction * action) override; void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoTransparencyType.h b/include/Inventor/nodes/SoTransparencyType.h index 66eff035e08..d644c46df55 100644 --- a/include/Inventor/nodes/SoTransparencyType.h +++ b/include/Inventor/nodes/SoTransparencyType.h @@ -64,7 +64,9 @@ class COIN_DLL_API SoTransparencyType : public SoNode { SoSFEnum value; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; protected: diff --git a/include/Inventor/nodes/SoTriangleStripSet.h b/include/Inventor/nodes/SoTriangleStripSet.h index e1e0dc5419e..de9dbabadf6 100644 --- a/include/Inventor/nodes/SoTriangleStripSet.h +++ b/include/Inventor/nodes/SoTriangleStripSet.h @@ -48,7 +48,9 @@ class COIN_DLL_API SoTriangleStripSet : public SoNonIndexedShape { SoMFInt32 numVertices; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; SbBool generateDefaultNormals(SoState * state, SoNormalBundle * nb) override; diff --git a/include/Inventor/nodes/SoUnits.h b/include/Inventor/nodes/SoUnits.h index abddcf11708..c53f0d3b27a 100644 --- a/include/Inventor/nodes/SoUnits.h +++ b/include/Inventor/nodes/SoUnits.h @@ -71,7 +71,9 @@ class COIN_DLL_API SoUnits : public SoTransformation { void callback(SoCallbackAction * action) override; void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoVertexAttribute.h b/include/Inventor/nodes/SoVertexAttribute.h index 59051d784c6..829d34e5e02 100644 --- a/include/Inventor/nodes/SoVertexAttribute.h +++ b/include/Inventor/nodes/SoVertexAttribute.h @@ -60,7 +60,9 @@ class COIN_DLL_API SoVertexAttribute : public SoNode { SoMField * getValuesField(void) const; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void write(SoWriteAction * action) override; virtual void copyContents(const SoFieldContainer * from, SbBool copyconnections) override; diff --git a/include/Inventor/nodes/SoVertexAttributeBinding.h b/include/Inventor/nodes/SoVertexAttributeBinding.h index 9a64c5a40e5..e9569f96913 100644 --- a/include/Inventor/nodes/SoVertexAttributeBinding.h +++ b/include/Inventor/nodes/SoVertexAttributeBinding.h @@ -56,7 +56,9 @@ class COIN_DLL_API SoVertexAttributeBinding : public SoNode { SoSFEnum value; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; diff --git a/include/Inventor/nodes/SoVertexProperty.h b/include/Inventor/nodes/SoVertexProperty.h index e114b4a6273..1f43f7c1e2e 100644 --- a/include/Inventor/nodes/SoVertexProperty.h +++ b/include/Inventor/nodes/SoVertexProperty.h @@ -73,7 +73,9 @@ class COIN_DLL_API SoVertexProperty : public SoNode { SoMFInt32 textureUnit; void doAction(SoAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void callback(SoCallbackAction * action) override; void pick(SoPickAction * action) override; diff --git a/include/Inventor/nodes/SoVertexShape.h b/include/Inventor/nodes/SoVertexShape.h index fae2e9bc7a9..a345b96e790 100644 --- a/include/Inventor/nodes/SoVertexShape.h +++ b/include/Inventor/nodes/SoVertexShape.h @@ -68,7 +68,9 @@ class COIN_DLL_API SoVertexShape : public SoShape { SoVertexShape(void); virtual ~SoVertexShape(); +#if COIN_HAVE_LEGACY_GL_RENDERER SbBool shouldGLRender(SoGLRenderAction * action) override; +#endif void setNormalCache(SoState * const state, const int num, const SbVec3f * normals); diff --git a/include/Inventor/nodes/SoWWWInline.h b/include/Inventor/nodes/SoWWWInline.h index 358ba322bf2..fd96072036d 100644 --- a/include/Inventor/nodes/SoWWWInline.h +++ b/include/Inventor/nodes/SoWWWInline.h @@ -103,7 +103,9 @@ class COIN_DLL_API SoWWWInline : public SoNode { void doAction(SoAction * action) override; virtual void doActionOnKidsOrBox(SoAction * action); void callback(SoCallbackAction * action) override; +#if COIN_HAVE_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void getMatrix(SoGetMatrixAction * action) override; void handleEvent(SoHandleEventAction * action) override; diff --git a/src/actions/SoActionGLP.h b/src/actions/SoActionGLP.h new file mode 100644 index 00000000000..288d2b170d0 --- /dev/null +++ b/src/actions/SoActionGLP.h @@ -0,0 +1,18 @@ +#ifndef COIN_SOACTIONGLP_H +#define COIN_SOACTIONGLP_H + +/* This header is private to Coin's implementation. */ +#ifndef COIN_INTERNAL +#error this is a private header file +#endif + +/* Core builds retain the action and node APIs, but do not register or call + legacy fixed-function GL elements. Keep this switch out of public + headers so platform GL headers cannot leak into application code. */ +#if COIN_BUILD_LEGACY_GL_RENDERER +#define SO_ENABLE_LEGACY_GL(action, element) SO_ENABLE(action, element) +#else +#define SO_ENABLE_LEGACY_GL(action, element) do { } WHILE_0 +#endif + +#endif /* COIN_SOACTIONGLP_H */ diff --git a/src/bundles/SoMaterialBundle.cpp b/src/bundles/SoMaterialBundle.cpp index ead840a5f36..8766399d50a 100644 --- a/src/bundles/SoMaterialBundle.cpp +++ b/src/bundles/SoMaterialBundle.cpp @@ -42,7 +42,10 @@ */ #include +#include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #ifdef HAVE_CONFIG_H @@ -53,8 +56,10 @@ #include "SbBasicP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "glue/glp.h" #include "rendering/SoGL.h" +#endif #define FLAG_COLORONLY 0x01 #define FLAG_NVIDIA_BUG 0x02 @@ -76,10 +81,12 @@ SoMaterialBundle::SoMaterialBundle(SoAction *action) if (SoLazyElement::getLightModel(this->state) == SoLazyElement::BASE_COLOR) this->coloronly |= FLAG_COLORONLY; +#if COIN_BUILD_LEGACY_GL_RENDERER const cc_glglue * glue = sogl_glue_instance(this->state); - if (glue->nvidia_color_per_face_bug) { + if (glue && glue->nvidia_color_per_face_bug) { this->coloronly |= FLAG_NVIDIA_BUG; } +#endif } /*! @@ -95,7 +102,9 @@ SoMaterialBundle::~SoMaterialBundle() void SoMaterialBundle::setUpMultiple(void) { +#if COIN_BUILD_LEGACY_GL_RENDERER this->setupElements(FALSE); +#endif } /*! @@ -105,7 +114,9 @@ SoMaterialBundle::setUpMultiple(void) void SoMaterialBundle::sendFirst(void) { +#if COIN_BUILD_LEGACY_GL_RENDERER this->setupElements(FALSE); +#endif } /*! @@ -119,6 +130,7 @@ SoMaterialBundle::sendFirst(void) void SoMaterialBundle::send(const int index, const SbBool betweenbeginend) { +#if COIN_BUILD_LEGACY_GL_RENDERER if (this->firsttime) this->setupElements(betweenbeginend); //if (index != this->currindex || (this->coloronly & FLAG_NVIDIA_BUG)) { // Bug fix: Force setting the color for all indices. ATI cards do not @@ -126,6 +138,10 @@ SoMaterialBundle::send(const int index, const SbBool betweenbeginend) // it to black. - jostein 20/09/2010 this->lazyelem->sendDiffuseByIndex(index); this->currindex = index; +#else + (void)index; + (void)betweenbeginend; +#endif //} } @@ -138,9 +154,13 @@ SoMaterialBundle::send(const int index, const SbBool betweenbeginend) void SoMaterialBundle::forceSend(const int index) { +#if COIN_BUILD_LEGACY_GL_RENDERER if (this->firsttime) this->setupElements(FALSE); this->reallySend(index); this->currindex = index; +#else + (void)index; +#endif } /*! @@ -158,7 +178,11 @@ SoMaterialBundle::isColorOnly(void) const void SoMaterialBundle::reallySend(const int index) { +#if COIN_BUILD_LEGACY_GL_RENDERER this->lazyelem->sendDiffuseByIndex(index); +#else + (void)index; +#endif } // @@ -167,6 +191,7 @@ SoMaterialBundle::reallySend(const int index) void SoMaterialBundle::setupElements(const SbBool isbetweenbeginend) { +#if COIN_BUILD_LEGACY_GL_RENDERER this->lazyelem = static_cast(SoLazyElement::getInstance(this->state)); this->currindex = 0; @@ -177,6 +202,11 @@ SoMaterialBundle::setupElements(const SbBool isbetweenbeginend) this->lazyelem->send(this->state, SoLazyElement::ALL_MASK); } this->firsttime = FALSE; +#else + (void)isbetweenbeginend; + this->currindex = 0; + this->firsttime = FALSE; +#endif } #undef FLAG_COLORONLY diff --git a/src/draggers/SoDragger.cpp b/src/draggers/SoDragger.cpp index ccff96340be..ac67d522643 100644 --- a/src/draggers/SoDragger.cpp +++ b/src/draggers/SoDragger.cpp @@ -516,6 +516,7 @@ SoDragger::callback(SoCallbackAction * action) // Doc in superclass. Overridden to initialize some elements before // traversing children. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoDragger::GLRender(SoGLRenderAction * action) { @@ -525,6 +526,7 @@ SoDragger::GLRender(SoGLRenderAction * action) inherited::GLRender(action); state->pop(); } +#endif // Doc in superclass. Overridden to initialize some elements before // traversing children. diff --git a/src/draggers/SoTabPlaneDragger.cpp b/src/draggers/SoTabPlaneDragger.cpp index cd6b5620b0e..2e1b3b07b25 100644 --- a/src/draggers/SoTabPlaneDragger.cpp +++ b/src/draggers/SoTabPlaneDragger.cpp @@ -370,6 +370,7 @@ SoTabPlaneDragger::valueChangedCB(void *, SoDragger * d) } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTabPlaneDragger::GLRender(SoGLRenderAction * action) { @@ -390,6 +391,7 @@ SoTabPlaneDragger::GLRender(SoGLRenderAction * action) } inherited::GLRender(action); } +#endif /*! Signals the dragger to recalculate the size of its tabs. This method diff --git a/src/geo/SoGeoCoordinate.cpp b/src/geo/SoGeoCoordinate.cpp index 703474c2c21..c2d97bbb720 100644 --- a/src/geo/SoGeoCoordinate.cpp +++ b/src/geo/SoGeoCoordinate.cpp @@ -163,11 +163,13 @@ SoGeoCoordinate::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoGeoCoordinate::GLRender(SoGLRenderAction * action) { SoGeoCoordinate::doAction((SoAction *)action); } +#endif // Doc from superclass. void diff --git a/src/geo/SoGeoLocation.cpp b/src/geo/SoGeoLocation.cpp index 6cc30cbc339..c7ce5c6c76b 100644 --- a/src/geo/SoGeoLocation.cpp +++ b/src/geo/SoGeoLocation.cpp @@ -139,11 +139,13 @@ SoGeoLocation::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoGeoLocation::GLRender(SoGLRenderAction * action) { SoGeoLocation::doAction((SoAction *)action); } +#endif // Doc from superclass. void diff --git a/src/geo/SoGeoOrigin.cpp b/src/geo/SoGeoOrigin.cpp index d3e3b755b46..2b61c816433 100644 --- a/src/geo/SoGeoOrigin.cpp +++ b/src/geo/SoGeoOrigin.cpp @@ -280,7 +280,7 @@ SoGeoOrigin::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoGeoOrigin, SO_FROM_INVENTOR_1|SoNode::VRML1); SO_ENABLE(SoGetBoundingBoxAction, SoGeoElement); - SO_ENABLE(SoGLRenderAction, SoGeoElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGeoElement); SO_ENABLE(SoGetMatrixAction, SoGeoElement); SO_ENABLE(SoGetPrimitiveCountAction, SoGeoElement); SO_ENABLE(SoPickAction, SoGeoElement); @@ -297,11 +297,13 @@ SoGeoOrigin::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoGeoOrigin::GLRender(SoGLRenderAction * action) { SoGeoOrigin::doAction((SoAction *)action); } +#endif // Doc from superclass. void diff --git a/src/geo/SoGeoSeparator.cpp b/src/geo/SoGeoSeparator.cpp index e344b93e80c..cec0ab61717 100644 --- a/src/geo/SoGeoSeparator.cpp +++ b/src/geo/SoGeoSeparator.cpp @@ -148,6 +148,7 @@ SoGeoSeparator::applyTransformation(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoGeoSeparator::GLRenderBelowPath(SoGLRenderAction * action) { @@ -157,8 +158,10 @@ SoGeoSeparator::GLRenderBelowPath(SoGLRenderAction * action) SoSeparator::GLRenderBelowPath(action); state->pop(); } +#endif // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoGeoSeparator::GLRenderInPath(SoGLRenderAction * action) { @@ -168,6 +171,7 @@ SoGeoSeparator::GLRenderInPath(SoGLRenderAction * action) SoSeparator::GLRenderInPath(action); state->pop(); } +#endif // Doc from superclass. void diff --git a/src/manips/SoClipPlaneManip.cpp b/src/manips/SoClipPlaneManip.cpp index 24f918e48a8..4311bf1dd84 100644 --- a/src/manips/SoClipPlaneManip.cpp +++ b/src/manips/SoClipPlaneManip.cpp @@ -413,12 +413,14 @@ SoClipPlaneManip::callback(SoCallbackAction * action) } // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoClipPlaneManip::GLRender(SoGLRenderAction * action) { SoClipPlaneManip::doAction(action); SoClipPlane::GLRender(action); } +#endif // doc from parent void diff --git a/src/manips/SoDirectionalLightManip.cpp b/src/manips/SoDirectionalLightManip.cpp index 06d14ac7794..c2f2ad13c4b 100644 --- a/src/manips/SoDirectionalLightManip.cpp +++ b/src/manips/SoDirectionalLightManip.cpp @@ -265,12 +265,14 @@ SoDirectionalLightManip::callback(SoCallbackAction * action) } // documented in superclass +#if COIN_BUILD_LEGACY_GL_RENDERER void SoDirectionalLightManip::GLRender(SoGLRenderAction * action) { SoDirectionalLightManip::doAction(action); SoDirectionalLight::GLRender(action); } +#endif // documented in superclass void diff --git a/src/manips/SoPointLightManip.cpp b/src/manips/SoPointLightManip.cpp index be19e369ff7..a3429200d09 100644 --- a/src/manips/SoPointLightManip.cpp +++ b/src/manips/SoPointLightManip.cpp @@ -266,12 +266,14 @@ SoPointLightManip::callback(SoCallbackAction * action) } // Documented in superclass +#if COIN_BUILD_LEGACY_GL_RENDERER void SoPointLightManip::GLRender(SoGLRenderAction * action) { SoPointLightManip::doAction(action); SoPointLight::GLRender(action); } +#endif // Documented in superclass void diff --git a/src/manips/SoSpotLightManip.cpp b/src/manips/SoSpotLightManip.cpp index b53cb0e037e..fb961c1f2a6 100644 --- a/src/manips/SoSpotLightManip.cpp +++ b/src/manips/SoSpotLightManip.cpp @@ -284,12 +284,14 @@ SoSpotLightManip::callback(SoCallbackAction * action) } // Documented in superclass +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSpotLightManip::GLRender(SoGLRenderAction * action) { SoSpotLightManip::doAction(action); SoSpotLight::GLRender(action); } +#endif // Documented in superclass void diff --git a/src/manips/SoTransformManip.cpp b/src/manips/SoTransformManip.cpp index 7c2b0ad038d..7dedfb2f94b 100644 --- a/src/manips/SoTransformManip.cpp +++ b/src/manips/SoTransformManip.cpp @@ -337,12 +337,14 @@ SoTransformManip::callback(SoCallbackAction * action) } // Documented in superclass +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTransformManip::GLRender(SoGLRenderAction * action) { SoTransformManip::doAction(action); SoTransform::GLRender(action); } +#endif // Documented in superclass void diff --git a/src/nodekits/SoBaseKit.cpp b/src/nodekits/SoBaseKit.cpp index 3c58b7e6399..3579c9febd9 100644 --- a/src/nodekits/SoBaseKit.cpp +++ b/src/nodekits/SoBaseKit.cpp @@ -1004,11 +1004,13 @@ SoBaseKit::callback(SoCallbackAction * action) } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoBaseKit::GLRender(SoGLRenderAction * action) { SoBaseKit::doAction((SoAction *)action); } +#endif // Doc in superclass. Overridden to calculate bounding box center. void diff --git a/src/nodekits/SoNodeKitListPart.cpp b/src/nodekits/SoNodeKitListPart.cpp index e830da56bf2..6c7ce2c9c45 100644 --- a/src/nodekits/SoNodeKitListPart.cpp +++ b/src/nodekits/SoNodeKitListPart.cpp @@ -465,11 +465,13 @@ SoNodeKitListPart::callback(SoCallbackAction * action) /*! This just "forwards" the call to the same method at the container node. */ +#if COIN_BUILD_LEGACY_GL_RENDERER void SoNodeKitListPart::GLRender(SoGLRenderAction * action) { SoNodeKitListPart::doAction((SoAction*)action); } +#endif /*! This just "forwards" the call to the same method at the container node. diff --git a/src/nodes/SoAlphaTest.cpp b/src/nodes/SoAlphaTest.cpp index f7616d5f0c5..ca49c37838e 100644 --- a/src/nodes/SoAlphaTest.cpp +++ b/src/nodes/SoAlphaTest.cpp @@ -174,6 +174,7 @@ SoAlphaTest::~SoAlphaTest() } // Doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoAlphaTest::GLRender(SoGLRenderAction * action) { @@ -213,3 +214,4 @@ SoAlphaTest::GLRender(SoGLRenderAction * action) SoLazyElement::setAlphaTest(action->getState(), glfunc, this->value.getValue()); } +#endif diff --git a/src/nodes/SoAnnotation.cpp b/src/nodes/SoAnnotation.cpp index ae41b481d77..c3b27fd2445 100644 --- a/src/nodes/SoAnnotation.cpp +++ b/src/nodes/SoAnnotation.cpp @@ -97,6 +97,7 @@ SoAnnotation::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoAnnotation, SO_FROM_INVENTOR_1); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc in superclass. void SoAnnotation::GLRender(SoGLRenderAction * action) @@ -114,8 +115,10 @@ SoAnnotation::GLRender(SoGLRenderAction * action) break; } } +#endif // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoAnnotation::GLRenderBelowPath(SoGLRenderAction * action) { @@ -130,8 +133,10 @@ SoAnnotation::GLRenderBelowPath(SoGLRenderAction * action) action->addDelayedPath(action->getCurPath()->copy()); } } +#endif // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoAnnotation::GLRenderInPath(SoGLRenderAction * action) { @@ -146,13 +151,16 @@ SoAnnotation::GLRenderInPath(SoGLRenderAction * action) action->addDelayedPath(action->getCurPath()->copy()); } } +#endif // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoAnnotation::GLRenderOffPath(SoGLRenderAction *) { // should never render, this is a separator node } +#endif #ifdef COIN_TEST_SUITE diff --git a/src/nodes/SoAntiSquish.cpp b/src/nodes/SoAntiSquish.cpp index 970727cf973..24a056f4eb6 100644 --- a/src/nodes/SoAntiSquish.cpp +++ b/src/nodes/SoAntiSquish.cpp @@ -222,11 +222,13 @@ SoAntiSquish::callback(SoCallbackAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoAntiSquish::GLRender(SoGLRenderAction * action) { SoAntiSquish::doAction((SoAction *) action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoArray.cpp b/src/nodes/SoArray.cpp index 43eeb506a26..70909796604 100644 --- a/src/nodes/SoArray.cpp +++ b/src/nodes/SoArray.cpp @@ -341,11 +341,13 @@ SoArray::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoArray::GLRender(SoGLRenderAction * action) { SoArray::doAction(action); } +#endif // Doc in superclass. SbBool diff --git a/src/nodes/SoBaseColor.cpp b/src/nodes/SoBaseColor.cpp index f3059b81476..ece762e7312 100644 --- a/src/nodes/SoBaseColor.cpp +++ b/src/nodes/SoBaseColor.cpp @@ -50,6 +50,7 @@ */ #include +#include #ifdef HAVE_CONFIG_H #include @@ -58,17 +59,25 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #ifdef COIN_THREADSAFE #include #endif // COIN_THREADSAFE +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif #include "nodes/SoSubNodeP.h" +class SoVBO; + /*! \var SoMFColor SoBaseColor::rgb @@ -84,7 +93,11 @@ class SoBaseColorP { colorpacker_storage(sizeof(void*), alloc_colorpacker, free_colorpacker), #endif // COIN_THREADSAFE vbo(NULL) { } - ~SoBaseColorP() { delete this->vbo; } + ~SoBaseColorP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } #ifdef COIN_THREADSAFE SbStorage colorpacker_storage; @@ -149,19 +162,21 @@ SoBaseColor::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoBaseColor, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoGLLazyElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLLazyElement); SO_ENABLE(SoCallbackAction, SoLazyElement); SO_ENABLE(SoCallbackAction, SoDiffuseColorElement); - SO_ENABLE(SoGLRenderAction, SoDiffuseColorElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoDiffuseColorElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoBaseColor::GLRender(SoGLRenderAction * action) { SoBaseColor::doAction(action); } +#endif // Doc from superclass. void @@ -175,6 +190,7 @@ SoBaseColor::doAction(SoAction * action) SoLazyElement::setDiffuse(state, this, num, this->rgb.getValues(0), PRIVATE(this)->getColorPacker()); +#if COIN_BUILD_LEGACY_GL_RENDERER if (state->isElementEnabled(SoGLVBOElement::getClassStackIndex())) { SbBool setvbo = FALSE; SoBase::staticDataLock(); @@ -194,6 +210,7 @@ SoBaseColor::doAction(SoAction * action) SoGLVBOElement::setColorVBO(state, PRIVATE(this)->vbo); } } +#endif if (this->isOverride()) { SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); } diff --git a/src/nodes/SoBumpMap.cpp b/src/nodes/SoBumpMap.cpp index 9ab8996b03a..443597da2ea 100644 --- a/src/nodes/SoBumpMap.cpp +++ b/src/nodes/SoBumpMap.cpp @@ -103,7 +103,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -204,7 +206,9 @@ SO_NODE_SOURCE(SoBumpMap); SoBumpMap::SoBumpMap(void) { PRIVATE(this) = new SoBumpMapP; +#if COIN_BUILD_LEGACY_GL_RENDERER PRIVATE(this)->glimage = new SoGLImage; +#endif PRIVATE(this)->glimagevalid = FALSE; PRIVATE(this)->didconvert = FALSE; PRIVATE(this)->isgrayscale = -1; @@ -236,7 +240,9 @@ SoBumpMap::SoBumpMap(void) */ SoBumpMap::~SoBumpMap() { +#if COIN_BUILD_LEGACY_GL_RENDERER PRIVATE(this)->glimage->unref(NULL); +#endif delete PRIVATE(this)->filenamesensor; delete PRIVATE(this); } @@ -250,7 +256,7 @@ SoBumpMap::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoBumpMap, SO_FROM_COIN_2_2); - SO_ENABLE(SoGLRenderAction, SoBumpMapElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoBumpMapElement); SO_ENABLE(SoCallbackAction, SoBumpMapElement); SO_ENABLE(SoRayPickAction, SoBumpMapElement); } @@ -274,14 +280,17 @@ SoBumpMap::readInstance(SoInput * in, unsigned short flags) return readOK; } +#if COIN_BUILD_LEGACY_GL_RENDERER static SoGLImage::Wrap bumpmap_translateWrap(const SoBumpMap::Wrap wrap) { if (wrap == SoBumpMap::REPEAT) return SoGLImage::REPEAT; return SoGLImage::CLAMP; } +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoBumpMap::GLRender(SoGLRenderAction * action) @@ -331,6 +340,7 @@ SoBumpMap::GLRender(SoGLRenderAction * action) } } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoBumpMapCoordinate.cpp b/src/nodes/SoBumpMapCoordinate.cpp index 8855d9c0d19..9a033ad6426 100644 --- a/src/nodes/SoBumpMapCoordinate.cpp +++ b/src/nodes/SoBumpMapCoordinate.cpp @@ -111,7 +111,7 @@ SoBumpMapCoordinate::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoBumpMapCoordinate, SO_FROM_COIN_2_2); - SO_ENABLE(SoGLRenderAction, SoBumpMapCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoBumpMapCoordinateElement); SO_ENABLE(SoCallbackAction, SoBumpMapCoordinateElement); SO_ENABLE(SoPickAction, SoBumpMapCoordinateElement); } @@ -125,12 +125,14 @@ SoBumpMapCoordinate::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoBumpMapCoordinate::GLRender(SoGLRenderAction * action) { SoBumpMapCoordinateElement::set(action->getState(), this, point.getNum(), point.getValues(0)); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoBumpMapTransform.cpp b/src/nodes/SoBumpMapTransform.cpp index f8a4c850258..94f97ed8f44 100644 --- a/src/nodes/SoBumpMapTransform.cpp +++ b/src/nodes/SoBumpMapTransform.cpp @@ -122,18 +122,20 @@ SoBumpMapTransform::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoBumpMapTransform, SO_FROM_COIN_2_2); - SO_ENABLE(SoGLRenderAction, SoBumpMapMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoBumpMapMatrixElement); SO_ENABLE(SoCallbackAction, SoBumpMapMatrixElement); SO_ENABLE(SoPickAction, SoBumpMapMatrixElement); } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoBumpMapTransform::GLRender(SoGLRenderAction * action) { SoBumpMapTransform::doAction(action); } +#endif // Documented in superclass. void diff --git a/src/nodes/SoCacheHint.cpp b/src/nodes/SoCacheHint.cpp index e66a9e02593..5409e1fd08f 100644 --- a/src/nodes/SoCacheHint.cpp +++ b/src/nodes/SoCacheHint.cpp @@ -109,7 +109,7 @@ SoCacheHint::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoCacheHint, SO_FROM_COIN_2_4); - SO_ENABLE(SoGLRenderAction, SoCacheHintElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoCacheHintElement); } void @@ -121,11 +121,13 @@ SoCacheHint::doAction(SoAction * action) this->gfxValue.getValue()); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoCacheHint::GLRender(SoGLRenderAction * action) { SoCacheHint::doAction(action); } +#endif void SoCacheHint::callback(SoCallbackAction * action) diff --git a/src/nodes/SoCallback.cpp b/src/nodes/SoCallback.cpp index 4e2f4d2247d..c6452e25491 100644 --- a/src/nodes/SoCallback.cpp +++ b/src/nodes/SoCallback.cpp @@ -173,6 +173,7 @@ SoCallback::callback(SoCallbackAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoCallback::GLRender(SoGLRenderAction * action) { @@ -183,6 +184,7 @@ SoCallback::GLRender(SoGLRenderAction * action) SoCallback::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoCamera.cpp b/src/nodes/SoCamera.cpp index e67778959e9..01a8aff43bb 100644 --- a/src/nodes/SoCamera.cpp +++ b/src/nodes/SoCamera.cpp @@ -115,6 +115,11 @@ */ #include +#include +#include +#include +#include +#include #include // for FLT_EPSILON @@ -128,21 +133,33 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -380,12 +397,12 @@ SoCamera::initClass(void) { SO_NODE_INTERNAL_INIT_ABSTRACT_CLASS(SoCamera, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoFocalDistanceElement); - SO_ENABLE(SoGLRenderAction, SoGLProjectionMatrixElement); - SO_ENABLE(SoGLRenderAction, SoViewVolumeElement); - SO_ENABLE(SoGLRenderAction, SoGLViewingMatrixElement); - SO_ENABLE(SoGLRenderAction, SoResetMatrixElement); - SO_ENABLE(SoGLRenderAction, SoCullElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoFocalDistanceElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLProjectionMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoViewVolumeElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLViewingMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoResetMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoCullElement); SO_ENABLE(SoGetBoundingBoxAction, SoFocalDistanceElement); SO_ENABLE(SoGetBoundingBoxAction, SoProjectionMatrixElement); @@ -650,6 +667,7 @@ SoCamera::getViewportBounds(const SbViewportRegion & region) const return vp; } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc in superclass. void SoCamera::GLRender(SoGLRenderAction * action) @@ -725,6 +743,7 @@ SoCamera::GLRender(SoGLRenderAction * action) SoViewingMatrixElement::set(state, this, affine); SoFocalDistanceElement::set(state, this, this->focalDistance.getValue()); } +#endif // Documented in superclass. void @@ -928,10 +947,12 @@ SoCamera::getView(SoAction * action, SbViewVolume & resultvv, SbViewportRegion & resultvv = this->getViewVolume(oldvp, resultvp, mm); if (resultvp != oldvp) { +#if COIN_BUILD_LEGACY_GL_RENDERER // only draw if this is an SoGLRenderAction if (action->isOfType(SoGLRenderAction::getClassTypeId())) { this->drawCroppedFrame((SoGLRenderAction*)action, this->viewportMapping.getValue(), oldvp, resultvp); } +#endif if (usevpelement) { SoViewportRegionElement::set(action->getState(), resultvp); } @@ -941,6 +962,7 @@ SoCamera::getView(SoAction * action, SbViewVolume & resultvv, SbViewportRegion & // // private method that draws a cropped frame // +#if COIN_BUILD_LEGACY_GL_RENDERER void SoCamera::drawCroppedFrame(SoGLRenderAction *action, const int viewportmapping, @@ -1046,9 +1068,9 @@ SoCamera::drawCroppedFrame(SoGLRenderAction *action, glPopMatrix(); glPopAttrib(); - state->pop(); } +#endif /*! Sets the stereo mode. diff --git a/src/nodes/SoClipPlane.cpp b/src/nodes/SoClipPlane.cpp index 72a9b0fe3b6..ee15ba8212f 100644 --- a/src/nodes/SoClipPlane.cpp +++ b/src/nodes/SoClipPlane.cpp @@ -111,11 +111,14 @@ // ************************************************************************* #include +#include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -169,7 +172,7 @@ SoClipPlane::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoClipPlane, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoGLClipPlaneElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLClipPlaneElement); SO_ENABLE(SoPickAction, SoClipPlaneElement); SO_ENABLE(SoCallbackAction, SoClipPlaneElement); } @@ -184,6 +187,7 @@ SoClipPlane::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoClipPlane::GLRender(SoGLRenderAction * action) { @@ -195,6 +199,7 @@ SoClipPlane::GLRender(SoGLRenderAction * action) SoCullElement::addPlane(action->getState(), p); } } +#endif // Doc from superclass. void diff --git a/src/nodes/SoColorIndex.cpp b/src/nodes/SoColorIndex.cpp index 631a0c5c5e1..321f4e03ac5 100644 --- a/src/nodes/SoColorIndex.cpp +++ b/src/nodes/SoColorIndex.cpp @@ -69,7 +69,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -108,9 +110,10 @@ SoColorIndex::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoColorIndex, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoGLColorIndexElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLColorIndexElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc in parent void SoColorIndex::GLRender(SoGLRenderAction * action) @@ -126,3 +129,4 @@ SoColorIndex::GLRender(SoGLRenderAction * action) this->index.getValues(0)); } } +#endif diff --git a/src/nodes/SoComplexity.cpp b/src/nodes/SoComplexity.cpp index 9dc66625d55..8b001f4b94a 100644 --- a/src/nodes/SoComplexity.cpp +++ b/src/nodes/SoComplexity.cpp @@ -184,10 +184,10 @@ SoComplexity::initClass(void) SO_ENABLE(SoGetBoundingBoxAction, SoComplexityTypeElement); SO_ENABLE(SoGetBoundingBoxAction, SoShapeStyleElement); - SO_ENABLE(SoGLRenderAction, SoComplexityElement); - SO_ENABLE(SoGLRenderAction, SoComplexityTypeElement); - SO_ENABLE(SoGLRenderAction, SoShapeStyleElement); - SO_ENABLE(SoGLRenderAction, SoTextureQualityElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoComplexityElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoComplexityTypeElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoShapeStyleElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoTextureQualityElement); SO_ENABLE(SoCallbackAction, SoComplexityElement); SO_ENABLE(SoCallbackAction, SoComplexityTypeElement); @@ -211,6 +211,7 @@ SoComplexity::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoComplexity::GLRender(SoGLRenderAction * action) { @@ -226,6 +227,7 @@ SoComplexity::GLRender(SoGLRenderAction * action) } } } +#endif // Doc from superclass. void diff --git a/src/nodes/SoCoordinate3.cpp b/src/nodes/SoCoordinate3.cpp index 6d6f5431ed2..0b7b4530945 100644 --- a/src/nodes/SoCoordinate3.cpp +++ b/src/nodes/SoCoordinate3.cpp @@ -56,16 +56,25 @@ #include +class SoVBO; +#include + #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif /*! \var SoMFVec3f SoCoordinate3::point @@ -75,7 +84,11 @@ class SoCoordinate3P { public: SoCoordinate3P() : vbo(NULL) { } - ~SoCoordinate3P() { delete this->vbo; } + ~SoCoordinate3P() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -114,8 +127,8 @@ SoCoordinate3::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoCoordinate3, SO_FROM_INVENTOR_1|SoNode::VRML1); SO_ENABLE(SoGetBoundingBoxAction, SoCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoGLCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoGLVBOElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLVBOElement); SO_ENABLE(SoPickAction, SoCoordinateElement); SO_ENABLE(SoCallbackAction, SoCoordinateElement); SO_ENABLE(SoGetPrimitiveCountAction, SoCoordinateElement); @@ -129,6 +142,7 @@ SoCoordinate3::doAction(SoAction * action) point.getNum(), point.getValues(0)); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoCoordinate3::GLRender(SoGLRenderAction * action) @@ -161,6 +175,7 @@ SoCoordinate3::GLRender(SoGLRenderAction * action) SoBase::staticDataUnlock(); SoGLVBOElement::setVertexVBO(state, setvbo ? PRIVATE(this)->vbo : NULL); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoCoordinate4.cpp b/src/nodes/SoCoordinate4.cpp index 38f972da9a0..09474494391 100644 --- a/src/nodes/SoCoordinate4.cpp +++ b/src/nodes/SoCoordinate4.cpp @@ -61,16 +61,25 @@ #include +class SoVBO; +#include + #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif /*! \var SoMFVec4f SoCoordinate4::point @@ -82,7 +91,11 @@ class SoCoordinate4P { public: SoCoordinate4P() : vbo(NULL) { } - ~SoCoordinate4P() { delete this->vbo; } + ~SoCoordinate4P() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -120,7 +133,7 @@ SoCoordinate4::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoCoordinate4, SO_FROM_INVENTOR_1); SO_ENABLE(SoGetBoundingBoxAction, SoCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoGLCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLCoordinateElement); SO_ENABLE(SoPickAction, SoCoordinateElement); SO_ENABLE(SoCallbackAction, SoCoordinateElement); SO_ENABLE(SoGetPrimitiveCountAction, SoCoordinateElement); @@ -141,6 +154,7 @@ SoCoordinate4::doAction(SoAction * action) point.getNum(), point.getValues(0)); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoCoordinate4::GLRender(SoGLRenderAction * action) @@ -175,6 +189,7 @@ SoCoordinate4::GLRender(SoGLRenderAction * action) SoGLVBOElement::setVertexVBO(state, PRIVATE(this)->vbo); } } +#endif // Doc from superclass. void diff --git a/src/nodes/SoDepthBuffer.cpp b/src/nodes/SoDepthBuffer.cpp index b23660cab79..29039079957 100644 --- a/src/nodes/SoDepthBuffer.cpp +++ b/src/nodes/SoDepthBuffer.cpp @@ -67,8 +67,11 @@ */ #include +#include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -153,7 +156,7 @@ SoDepthBuffer::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoDepthBuffer, SO_FROM_COIN_3_0); - SO_ENABLE(SoGLRenderAction, SoGLDepthBufferElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLDepthBufferElement); } /*! @@ -186,6 +189,7 @@ SoDepthBuffer::~SoDepthBuffer() { } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from parent void SoDepthBuffer::GLRender(SoGLRenderAction * action) @@ -217,3 +221,4 @@ SoDepthBuffer::GLRender(SoGLRenderAction * action) SoDepthBufferElement::set(state, testenable, writeenable, function, depthrange); } +#endif diff --git a/src/nodes/SoDirectionalLight.cpp b/src/nodes/SoDirectionalLight.cpp index 84c3bfefcb4..987ee512cda 100644 --- a/src/nodes/SoDirectionalLight.cpp +++ b/src/nodes/SoDirectionalLight.cpp @@ -99,7 +99,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -107,6 +109,7 @@ #include #include "nodes/SoSubNodeP.h" +#include "rendering/SoGL.h" // ************************************************************************* @@ -152,6 +155,7 @@ SoDirectionalLight::initClass(void) // ************************************************************************* // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoDirectionalLight::GLRender(SoGLRenderAction * action) { @@ -202,5 +206,6 @@ SoDirectionalLight::GLRender(SoGLRenderAction * action) glLightf(light, GL_LINEAR_ATTENUATION, 0); glLightf(light, GL_QUADRATIC_ATTENUATION, 0); } +#endif // ************************************************************************* diff --git a/src/nodes/SoDrawStyle.cpp b/src/nodes/SoDrawStyle.cpp index 746ab52b736..42a4ebfb885 100644 --- a/src/nodes/SoDrawStyle.cpp +++ b/src/nodes/SoDrawStyle.cpp @@ -76,12 +76,24 @@ // ************************************************************************* #include +#include +#include +#include +#include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -205,11 +217,11 @@ SoDrawStyle::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoDrawStyle, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoGLDrawStyleElement); - SO_ENABLE(SoGLRenderAction, SoShapeStyleElement); - SO_ENABLE(SoGLRenderAction, SoGLLinePatternElement); - SO_ENABLE(SoGLRenderAction, SoGLLineWidthElement); - SO_ENABLE(SoGLRenderAction, SoGLPointSizeElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLDrawStyleElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoShapeStyleElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLLinePatternElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLLineWidthElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLPointSizeElement); SO_ENABLE(SoCallbackAction, SoDrawStyleElement); SO_ENABLE(SoCallbackAction, SoShapeStyleElement); @@ -258,11 +270,13 @@ SoDrawStyle::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoDrawStyle::GLRender(SoGLRenderAction * action) { SoDrawStyle::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoEnvironment.cpp b/src/nodes/SoEnvironment.cpp index 694859355b8..f5ace6225a4 100644 --- a/src/nodes/SoEnvironment.cpp +++ b/src/nodes/SoEnvironment.cpp @@ -55,10 +55,13 @@ // ************************************************************************* #include +#include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -181,13 +184,14 @@ SoEnvironment::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoEnvironment, SO_FROM_INVENTOR_2_0); - SO_ENABLE(SoGLRenderAction, SoGLEnvironmentElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLEnvironmentElement); SO_ENABLE(SoCallbackAction, SoEnvironmentElement); - SO_ENABLE(SoGLRenderAction, SoLightAttenuationElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoLightAttenuationElement); SO_ENABLE(SoCallbackAction, SoLightAttenuationElement); } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoEnvironment::GLRender(SoGLRenderAction * action) { @@ -202,6 +206,7 @@ SoEnvironment::GLRender(SoGLRenderAction * action) this->fogColor.getValue(), this->fogVisibility.getValue()); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoFile.cpp b/src/nodes/SoFile.cpp index e52dc9a1f86..98922e12ea3 100644 --- a/src/nodes/SoFile.cpp +++ b/src/nodes/SoFile.cpp @@ -185,11 +185,13 @@ SoFile::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoFile::GLRender(SoGLRenderAction * action) { SoFile::doAction((SoAction *)action); } +#endif // Doc from superclass. SbBool diff --git a/src/nodes/SoFont.cpp b/src/nodes/SoFont.cpp index 0c3d6a05b8b..a2c13221c4e 100644 --- a/src/nodes/SoFont.cpp +++ b/src/nodes/SoFont.cpp @@ -279,8 +279,8 @@ SoFont::initClass(void) SO_ENABLE(SoCallbackAction, SoFontNameElement); SO_ENABLE(SoCallbackAction, SoFontSizeElement); - SO_ENABLE(SoGLRenderAction, SoFontNameElement); - SO_ENABLE(SoGLRenderAction, SoFontSizeElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoFontNameElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoFontSizeElement); SO_ENABLE(SoGetBoundingBoxAction, SoFontNameElement); SO_ENABLE(SoGetBoundingBoxAction, SoFontSizeElement); SO_ENABLE(SoGetPrimitiveCountAction, SoFontNameElement); @@ -322,11 +322,13 @@ SoFont::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoFont::GLRender(SoGLRenderAction * action) { SoFont::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoFontStyle.cpp b/src/nodes/SoFontStyle.cpp index b07fe199e31..4accbbcea0d 100644 --- a/src/nodes/SoFontStyle.cpp +++ b/src/nodes/SoFontStyle.cpp @@ -275,11 +275,13 @@ SoFontStyle::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoFontStyle::GLRender(SoGLRenderAction * action) { this->doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoGroup.cpp b/src/nodes/SoGroup.cpp index 2612a68a8b7..8d6412d8522 100644 --- a/src/nodes/SoGroup.cpp +++ b/src/nodes/SoGroup.cpp @@ -229,6 +229,7 @@ // pimpl-ptr) implemented for SoNode. (The class should be as slim as // possible.) +#if COIN_BUILD_LEGACY_GL_RENDERER class SoGroupP { public: typedef void GLRenderFunc(SoGroup *, SoNode *, SoGLRenderAction *); @@ -238,6 +239,7 @@ class SoGroupP { }; SoGroupP::GLRenderFunc * SoGroupP::glrenderfunc = NULL; +#endif // ************************************************************************* @@ -527,12 +529,14 @@ SoGroup::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoGroup, SO_FROM_INVENTOR_1); +#if COIN_BUILD_LEGACY_GL_RENDERER // for the built-in Coin profiler. set up the functionptr to use, so // we don't have any overhead when profiling is off: SoGroupP::glrenderfunc = SoGroupP::childGLRender; if (SoProfiler::isEnabled()) { SoGroupP::glrenderfunc = SoGroupP::childGLRenderProfiler; } +#endif } // ************************************************************************* @@ -592,14 +596,17 @@ SoGroup::getBoundingBox(SoGetBoundingBoxAction * action) // ************************************************************************* +#if COIN_BUILD_LEGACY_GL_RENDERER void SoGroupP::childGLRender(SoGroup * COIN_UNUSED_ARG(thisp), SoNode * child, SoGLRenderAction * action) { child->GLRender(action); } +#endif // This function is called for each child to traverse, and // action->getCurPath() is already updated at this point. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoGroupP::childGLRenderProfiler(SoGroup * COIN_UNUSED_ARG(thisp), SoNode * child, SoGLRenderAction * action) { @@ -608,7 +615,9 @@ SoGroupP::childGLRenderProfiler(SoGroup * COIN_UNUSED_ARG(thisp), SoNode * child child->GLRender(action); profiling.postTraversal(action); } +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoGroup::GLRender(SoGLRenderAction * action) @@ -681,6 +690,7 @@ SoGroup::GLRender(SoGLRenderAction * action) action->popCurPath(); } } +#endif // ************************************************************************* diff --git a/src/nodes/SoLOD.cpp b/src/nodes/SoLOD.cpp index 185797a4d10..d1c1d739d5b 100644 --- a/src/nodes/SoLOD.cpp +++ b/src/nodes/SoLOD.cpp @@ -247,6 +247,7 @@ SoLOD::audioRender(SoAudioRenderAction * action) PRIVATE(this)->postAudioRender(this, action); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoLOD::GLRender(SoGLRenderAction * action) @@ -267,8 +268,10 @@ SoLOD::GLRender(SoGLRenderAction * action) break; } } +#endif // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLOD::GLRenderBelowPath(SoGLRenderAction * action) { @@ -288,8 +291,10 @@ SoLOD::GLRenderBelowPath(SoGLRenderAction * action) SoGLCacheContextElement::shouldAutoCache(action->getState(), SoGLCacheContextElement::DONT_AUTO_CACHE); } +#endif // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLOD::GLRenderInPath(SoGLRenderAction * action) { @@ -316,8 +321,10 @@ SoLOD::GLRenderInPath(SoGLRenderAction * action) SoLOD::GLRenderBelowPath(action); } } +#endif // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLOD::GLRenderOffPath(SoGLRenderAction * action) { @@ -336,6 +343,7 @@ SoLOD::GLRenderOffPath(SoGLRenderAction * action) } } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoLevelOfDetail.cpp b/src/nodes/SoLevelOfDetail.cpp index 0fdd4e8ebf1..dc0a247eb9e 100644 --- a/src/nodes/SoLevelOfDetail.cpp +++ b/src/nodes/SoLevelOfDetail.cpp @@ -422,6 +422,7 @@ SoLevelOfDetail::callback(SoCallbackAction *action) } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLevelOfDetail::GLRender(SoGLRenderAction *action) { @@ -430,6 +431,7 @@ SoLevelOfDetail::GLRender(SoGLRenderAction *action) SoGLCacheContextElement::shouldAutoCache(action->getState(), SoGLCacheContextElement::DONT_AUTO_CACHE); } +#endif // Documented in superclass. void diff --git a/src/nodes/SoLight.cpp b/src/nodes/SoLight.cpp index 989f6d4275b..1809c524a39 100644 --- a/src/nodes/SoLight.cpp +++ b/src/nodes/SoLight.cpp @@ -73,7 +73,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -130,9 +132,9 @@ SoLight::initClass(void) { SO_NODE_INTERNAL_INIT_ABSTRACT_CLASS(SoLight, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoLightAttenuationElement); - SO_ENABLE(SoGLRenderAction, SoGLLightIdElement); - SO_ENABLE(SoGLRenderAction, SoLightElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoLightAttenuationElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLLightIdElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoLightElement); SO_ENABLE(SoCallbackAction, SoLightAttenuationElement); SO_ENABLE(SoCallbackAction, SoLightElement); diff --git a/src/nodes/SoLightModel.cpp b/src/nodes/SoLightModel.cpp index 86da8eaaab7..e1d165b4325 100644 --- a/src/nodes/SoLightModel.cpp +++ b/src/nodes/SoLightModel.cpp @@ -50,10 +50,13 @@ // ************************************************************************* #include +#include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -117,18 +120,20 @@ SoLightModel::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoLightModel, SO_FROM_INVENTOR_1); SO_ENABLE(SoCallbackAction, SoLazyElement); - SO_ENABLE(SoGLRenderAction, SoGLLazyElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLLazyElement); SO_ENABLE(SoCallbackAction, SoLightModelElement); - SO_ENABLE(SoGLRenderAction, SoLightModelElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoLightModelElement); } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLightModel::GLRender(SoGLRenderAction * action) { SoLightModel::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoLocateHighlight.cpp b/src/nodes/SoLocateHighlight.cpp index 7e800f94050..139f5e0bfd5 100644 --- a/src/nodes/SoLocateHighlight.cpp +++ b/src/nodes/SoLocateHighlight.cpp @@ -270,6 +270,7 @@ SoLocateHighlight::handleEvent(SoHandleEventAction * action) } // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLocateHighlight::GLRenderBelowPath(SoGLRenderAction * action) { @@ -281,8 +282,10 @@ SoLocateHighlight::GLRenderBelowPath(SoGLRenderAction * action) inherited::GLRenderBelowPath(action); state->pop(); } +#endif // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLocateHighlight::GLRenderInPath(SoGLRenderAction * action) { @@ -294,6 +297,7 @@ SoLocateHighlight::GLRenderInPath(SoGLRenderAction * action) inherited::GLRenderInPath(action); state->pop(); } +#endif /*! Empty method in Coin. Can be used by subclasses to be told diff --git a/src/nodes/SoMaterial.cpp b/src/nodes/SoMaterial.cpp index 1b096ed2cba..75174ba35f4 100644 --- a/src/nodes/SoMaterial.cpp +++ b/src/nodes/SoMaterial.cpp @@ -153,6 +153,9 @@ #include +class SoVBO; +#include + #include #include @@ -161,7 +164,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -169,7 +174,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -184,7 +191,9 @@ #include #endif // COIN_THREADSAFE +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif #include "nodes/SoSubNodeP.h" // ************************************************************************* @@ -294,7 +303,11 @@ class SoMaterialP { colorpacker_storage(sizeof(void*), alloc_colorpacker, free_colorpacker), #endif // COIN_THREADSAFE vbo(NULL) { } - ~SoMaterialP() { delete this->vbo; } + ~SoMaterialP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } int materialtype; int transparencyflag; @@ -368,7 +381,7 @@ SoMaterial::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoMaterial, SO_FROM_INVENTOR_1|SoNode::VRML1); - SO_ENABLE(SoGLRenderAction, SoGLLazyElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLLazyElement); SO_ENABLE(SoCallbackAction, SoLazyElement); SO_ENABLE(SoCallbackAction, SoAmbientColorElement); @@ -378,20 +391,22 @@ SoMaterial::initClass(void) SO_ENABLE(SoCallbackAction, SoShininessElement); SO_ENABLE(SoCallbackAction, SoTransparencyElement); - SO_ENABLE(SoGLRenderAction, SoAmbientColorElement); - SO_ENABLE(SoGLRenderAction, SoDiffuseColorElement); - SO_ENABLE(SoGLRenderAction, SoEmissiveColorElement); - SO_ENABLE(SoGLRenderAction, SoSpecularColorElement); - SO_ENABLE(SoGLRenderAction, SoShininessElement); - SO_ENABLE(SoGLRenderAction, SoTransparencyElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoAmbientColorElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoDiffuseColorElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoEmissiveColorElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoSpecularColorElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoShininessElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoTransparencyElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoMaterial::GLRender(SoGLRenderAction * action) { SoMaterial::doAction(action); } +#endif // Doc from superclass. void @@ -537,6 +552,7 @@ SoMaterial::doAction(SoAction * action) bitmask & SoLazyElement::SHININESS_MASK ? SbClamp(this->shininess[0], 0.0f, 1.0f) : dummyval, istransparent); +#if COIN_BUILD_LEGACY_GL_RENDERER if (state->isElementEnabled(SoGLVBOElement::getClassStackIndex())) { SoBase::staticDataLock(); SbBool setvbo = FALSE; @@ -556,6 +572,7 @@ SoMaterial::doAction(SoAction * action) SoGLVBOElement::setColorVBO(state, PRIVATE(this)->vbo); } } +#endif } } diff --git a/src/nodes/SoMaterialBinding.cpp b/src/nodes/SoMaterialBinding.cpp index ec889bdb162..3d3b54823dc 100644 --- a/src/nodes/SoMaterialBinding.cpp +++ b/src/nodes/SoMaterialBinding.cpp @@ -263,18 +263,20 @@ SoMaterialBinding::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoMaterialBinding, SO_FROM_INVENTOR_1|SoNode::VRML1); - SO_ENABLE(SoGLRenderAction, SoMaterialBindingElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoMaterialBindingElement); SO_ENABLE(SoPickAction, SoMaterialBindingElement); SO_ENABLE(SoCallbackAction, SoMaterialBindingElement); SO_ENABLE(SoGetPrimitiveCountAction, SoMaterialBindingElement); } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoMaterialBinding::GLRender(SoGLRenderAction * action) { SoMaterialBinding::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoMatrixTransform.cpp b/src/nodes/SoMatrixTransform.cpp index 80c0b402274..5ee430c71f5 100644 --- a/src/nodes/SoMatrixTransform.cpp +++ b/src/nodes/SoMatrixTransform.cpp @@ -114,11 +114,13 @@ SoMatrixTransform::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoMatrixTransform::GLRender(SoGLRenderAction * action) { SoMatrixTransform::doAction((SoAction *)action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoMultipleCopy.cpp b/src/nodes/SoMultipleCopy.cpp index d516243c241..372898480a3 100644 --- a/src/nodes/SoMultipleCopy.cpp +++ b/src/nodes/SoMultipleCopy.cpp @@ -166,11 +166,13 @@ SoMultipleCopy::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoMultipleCopy::GLRender(SoGLRenderAction * action) { SoMultipleCopy::doAction((SoAction*)action); } +#endif // Doc in superclass void diff --git a/src/nodes/SoNode.cpp b/src/nodes/SoNode.cpp index 8d02893e14e..a36922fdca5 100644 --- a/src/nodes/SoNode.cpp +++ b/src/nodes/SoNode.cpp @@ -722,7 +722,9 @@ SoNode::initClasses(void) SoBumpMapTransform::initClass(); SoSceneTexture2::initClass(); +#if COIN_BUILD_LEGACY_GL_RENDERER SoSceneTextureCubeMap::initClass(); +#endif SoTextureCoordinateCube::initClass(); SoTextureCoordinateSphere::initClass(); @@ -951,6 +953,7 @@ SoNode::getPrimitiveCount(SoGetPrimitiveCountAction * COIN_UNUSED_ARG(action)) used for calling the SoNode::GLRender() virtual method which does the \e real work. */ +#if COIN_BUILD_LEGACY_GL_RENDERER void SoNode::GLRenderS(SoAction * action, SoNode * node) { @@ -989,7 +992,9 @@ SoNode::GLRenderS(SoAction * action, SoNode * node) cc_string_clean(&str); } } +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER // Note that this documentation will also be used for all subclasses // which reimplements the method, so keep the doc "generic enough". /*! @@ -1039,6 +1044,7 @@ SoNode::GLRenderOffPath(SoGLRenderAction * action) { this->GLRender(action); } +#endif // ************************************************************************* @@ -1614,7 +1620,9 @@ static void init_action_methods(void) { SoCallbackAction::addMethod(SoNode::getClassTypeId(), SoNode::callbackS); +#if COIN_BUILD_LEGACY_GL_RENDERER SoGLRenderAction::addMethod(SoNode::getClassTypeId(), SoNode::GLRenderS); +#endif SoGetBoundingBoxAction::addMethod(SoNode::getClassTypeId(), SoNode::getBoundingBoxS); SoGetMatrixAction::addMethod(SoNode::getClassTypeId(), SoNode::getMatrixS); SoGetPrimitiveCountAction::addMethod(SoNode::getClassTypeId(), SoNode::getPrimitiveCountS); @@ -1631,7 +1639,9 @@ init_action_methods(void) SoRayPickAction::addMethod(SoBumpMap::getClassTypeId(), SoNode::rayPickS); SoRayPickAction::addMethod(SoImage::getClassTypeId(), SoNode::rayPickS); SoRayPickAction::addMethod(SoSceneTexture2::getClassTypeId(), SoNode::rayPickS); +#if COIN_BUILD_LEGACY_GL_RENDERER SoRayPickAction::addMethod(SoSceneTextureCubeMap::getClassTypeId(), SoNode::rayPickS); +#endif SoRayPickAction::addMethod(SoTextureCubeMap::getClassTypeId(), SoNode::rayPickS); SoSearchAction::addMethod(SoNode::getClassTypeId(), SoNode::searchS); diff --git a/src/nodes/SoNormal.cpp b/src/nodes/SoNormal.cpp index 583b95bec1d..e51a7c35c66 100644 --- a/src/nodes/SoNormal.cpp +++ b/src/nodes/SoNormal.cpp @@ -56,16 +56,22 @@ #include +class SoVBO; + #include #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif // ************************************************************************* @@ -79,7 +85,11 @@ class SoNormalP { public: SoNormalP() : vbo(NULL) { } - ~SoNormalP() { delete this->vbo; } + ~SoNormalP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -117,11 +127,12 @@ SoNormal::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoNormal, SO_FROM_INVENTOR_1|SoNode::VRML1); SO_ENABLE(SoCallbackAction, SoNormalElement); - SO_ENABLE(SoGLRenderAction, SoNormalElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoNormalElement); SO_ENABLE(SoGetPrimitiveCountAction, SoNormalElement); SO_ENABLE(SoPickAction, SoNormalElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc in superclass. void SoNormal::GLRender(SoGLRenderAction * action) @@ -160,6 +171,7 @@ SoNormal::GLRender(SoGLRenderAction * action) SoBase::staticDataUnlock(); SoGLVBOElement::setNormalVBO(state, setvbo? PRIVATE(this)->vbo : NULL); } +#endif // Doc in superclass. void diff --git a/src/nodes/SoNormalBinding.cpp b/src/nodes/SoNormalBinding.cpp index 6c36eec393b..acaf831582d 100644 --- a/src/nodes/SoNormalBinding.cpp +++ b/src/nodes/SoNormalBinding.cpp @@ -207,18 +207,20 @@ SoNormalBinding::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoNormalBinding, SO_FROM_INVENTOR_1|SoNode::VRML1); - SO_ENABLE(SoGLRenderAction, SoNormalBindingElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoNormalBindingElement); SO_ENABLE(SoPickAction, SoNormalBindingElement); SO_ENABLE(SoCallbackAction, SoNormalBindingElement); SO_ENABLE(SoGetPrimitiveCountAction, SoNormalBindingElement); } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoNormalBinding::GLRender(SoGLRenderAction * action) { SoNormalBinding::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoNurbsProfile.cpp b/src/nodes/SoNurbsProfile.cpp index 3c9110e19b4..4596249a908 100644 --- a/src/nodes/SoNurbsProfile.cpp +++ b/src/nodes/SoNurbsProfile.cpp @@ -383,6 +383,7 @@ SoNurbsProfile::getVertices(SoState * state, int32_t & numvertices, nurbsProfileTempList->append(0.0f); // gluNurbs needs 3D coordinates } } +#if COIN_BUILD_LEGACY_GL_RENDERER if (GLUWrapper()->available && GLUWrapper()->versionMatchesAtLeast(1, 3, 0)) { // we will write into this array in the GLU callback @@ -439,7 +440,9 @@ SoNurbsProfile::getVertices(SoState * state, int32_t & numvertices, numvertices = coordListNurbsProfile->getLength() / 2; vertices = (SbVec2f*) coordListNurbsProfile->getArrayPtr(); } - else { + else +#endif + { // just send the control points when GLU v1.3 is not available numvertices = numpoints; vertices = (SbVec2f*) nurbsProfileTempList->getArrayPtr(); diff --git a/src/nodes/SoPackedColor.cpp b/src/nodes/SoPackedColor.cpp index 2ad43a60183..6238ea70e13 100644 --- a/src/nodes/SoPackedColor.cpp +++ b/src/nodes/SoPackedColor.cpp @@ -60,15 +60,24 @@ #include +class SoVBO; +#include + #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif // ************************************************************************* @@ -90,7 +99,11 @@ class SoPackedColorP { public: SoPackedColorP() : vbo(NULL) { } - ~SoPackedColorP() { delete this->vbo; } + ~SoPackedColorP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SbBool transparent; SbBool checktransparent; SoVBO * vbo; @@ -131,15 +144,17 @@ SoPackedColor::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoPackedColor, SO_FROM_INVENTOR_2_1); SO_ENABLE(SoCallbackAction, SoLazyElement); - SO_ENABLE(SoGLRenderAction, SoGLLazyElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLLazyElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoPackedColor::GLRender(SoGLRenderAction * action) { SoPackedColor::doAction(action); } +#endif // Doc from superclass. void @@ -157,6 +172,7 @@ SoPackedColor::doAction(SoAction * action) this->orderedRGBA.getValues(0), PRIVATE(this)->transparent); +#if COIN_BUILD_LEGACY_GL_RENDERER if (state->isElementEnabled(SoGLVBOElement::getClassStackIndex())) { SoBase::staticDataLock(); SbBool setvbo = FALSE; @@ -201,6 +217,7 @@ SoPackedColor::doAction(SoAction * action) SoGLVBOElement::setColorVBO(state, PRIVATE(this)->vbo); } } +#endif if (this->isOverride()) { SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); } diff --git a/src/nodes/SoPathSwitch.cpp b/src/nodes/SoPathSwitch.cpp index a3a43656482..937cff54ebe 100644 --- a/src/nodes/SoPathSwitch.cpp +++ b/src/nodes/SoPathSwitch.cpp @@ -174,6 +174,7 @@ SoPathSwitch::doAction(SoAction * action) } // doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoPathSwitch::GLRender(SoGLRenderAction * action) { @@ -181,6 +182,7 @@ SoPathSwitch::GLRender(SoGLRenderAction * action) inherited::GLRender(action); } } +#endif // doc in parent void diff --git a/src/nodes/SoPointLight.cpp b/src/nodes/SoPointLight.cpp index b415b0d772f..976b3bcc58c 100644 --- a/src/nodes/SoPointLight.cpp +++ b/src/nodes/SoPointLight.cpp @@ -65,7 +65,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -73,6 +75,7 @@ #include #include "nodes/SoSubNodeP.h" +#include "rendering/SoGL.h" // ************************************************************************* @@ -113,6 +116,7 @@ SoPointLight::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoPointLight, SO_FROM_INVENTOR_1|SoNode::VRML1); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoPointLight::GLRender(SoGLRenderAction * action) @@ -161,3 +165,4 @@ SoPointLight::GLRender(SoGLRenderAction * action) glLightf(light, GL_SPOT_EXPONENT, 0.0); glLightf(light, GL_SPOT_CUTOFF, 180.0); } +#endif diff --git a/src/nodes/SoPolygonOffset.cpp b/src/nodes/SoPolygonOffset.cpp index 366efaab6ba..fc5bda0f105 100644 --- a/src/nodes/SoPolygonOffset.cpp +++ b/src/nodes/SoPolygonOffset.cpp @@ -149,10 +149,13 @@ // ************************************************************************* #include +#include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -315,7 +318,7 @@ SoPolygonOffset::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoPolygonOffset, SO_FROM_INVENTOR_2_5|SO_FROM_COIN_1_0); SO_ENABLE(SoCallbackAction, SoPolygonOffsetElement); - SO_ENABLE(SoGLRenderAction, SoGLPolygonOffsetElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLPolygonOffsetElement); } @@ -353,8 +356,10 @@ SoPolygonOffset::callback(SoCallbackAction * action) SoPolygonOffset::doAction((SoAction *)action); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoPolygonOffset::GLRender(SoGLRenderAction * action) { SoPolygonOffset::doAction((SoAction *)action); } +#endif diff --git a/src/nodes/SoProfile.cpp b/src/nodes/SoProfile.cpp index df0820125d1..11717241ee3 100644 --- a/src/nodes/SoProfile.cpp +++ b/src/nodes/SoProfile.cpp @@ -139,8 +139,8 @@ SoProfile::initClass(void) SO_ENABLE(SoCallbackAction, SoProfileCoordinateElement); SO_ENABLE(SoCallbackAction, SoProfileCoordinateElement); SO_ENABLE(SoCallbackAction, SoProfileElement); - SO_ENABLE(SoGLRenderAction, SoProfileCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoProfileElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoProfileCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoProfileElement); SO_ENABLE(SoGetBoundingBoxAction, SoProfileCoordinateElement); SO_ENABLE(SoGetBoundingBoxAction, SoProfileElement); SO_ENABLE(SoGetPrimitiveCountAction, SoProfileElement); @@ -170,11 +170,13 @@ SoProfile::callback(SoCallbackAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoProfile::GLRender(SoGLRenderAction * action) { SoProfile::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoProfileCoordinate2.cpp b/src/nodes/SoProfileCoordinate2.cpp index 569efb07275..8757d1c9d37 100644 --- a/src/nodes/SoProfileCoordinate2.cpp +++ b/src/nodes/SoProfileCoordinate2.cpp @@ -103,7 +103,7 @@ SoProfileCoordinate2::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoProfileCoordinate2, SO_FROM_INVENTOR_1); SO_ENABLE(SoCallbackAction, SoProfileCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoProfileCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoProfileCoordinateElement); SO_ENABLE(SoGetBoundingBoxAction, SoProfileCoordinateElement); SO_ENABLE(SoGetPrimitiveCountAction, SoProfileCoordinateElement); SO_ENABLE(SoPickAction, SoProfileCoordinateElement); @@ -123,11 +123,13 @@ SoProfileCoordinate2::doAction(SoAction * action) this->point.getValues(0)); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoProfileCoordinate2::GLRender(SoGLRenderAction * action) { SoProfileCoordinate2::doAction(action); } +#endif void SoProfileCoordinate2::callback(SoCallbackAction * action) diff --git a/src/nodes/SoProfileCoordinate3.cpp b/src/nodes/SoProfileCoordinate3.cpp index 08dc4c665d4..dd74c4d2d7d 100644 --- a/src/nodes/SoProfileCoordinate3.cpp +++ b/src/nodes/SoProfileCoordinate3.cpp @@ -107,7 +107,7 @@ SoProfileCoordinate3::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoProfileCoordinate3, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoProfileCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoProfileCoordinateElement); SO_ENABLE(SoPickAction, SoProfileCoordinateElement); SO_ENABLE(SoCallbackAction, SoProfileCoordinateElement); SO_ENABLE(SoGetBoundingBoxAction, SoProfileCoordinateElement); @@ -128,11 +128,13 @@ SoProfileCoordinate3::doAction(SoAction * action) this->point.getValues(0)); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoProfileCoordinate3::GLRender(SoGLRenderAction * action) { SoProfileCoordinate3::doAction(action); } +#endif void SoProfileCoordinate3::callback(SoCallbackAction * action) diff --git a/src/nodes/SoResetTransform.cpp b/src/nodes/SoResetTransform.cpp index 5bd40a72459..d9cd66b666e 100644 --- a/src/nodes/SoResetTransform.cpp +++ b/src/nodes/SoResetTransform.cpp @@ -51,11 +51,14 @@ // ************************************************************************* #include +#include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -123,6 +126,7 @@ SoResetTransform::initClass(void) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoResetTransform::GLRender(SoGLRenderAction * action) { @@ -132,6 +136,7 @@ SoResetTransform::GLRender(SoGLRenderAction * action) SoGLModelMatrixElement::makeIdentity(state, this); } } +#endif // Doc from superclass. void diff --git a/src/nodes/SoRotation.cpp b/src/nodes/SoRotation.cpp index 760afb695cd..f2695a50bbc 100644 --- a/src/nodes/SoRotation.cpp +++ b/src/nodes/SoRotation.cpp @@ -147,11 +147,13 @@ SoRotation::callback(SoCallbackAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoRotation::GLRender(SoGLRenderAction * action) { SoRotation::doAction((SoAction *)action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoRotationXYZ.cpp b/src/nodes/SoRotationXYZ.cpp index e6727682b31..cd3fa871542 100644 --- a/src/nodes/SoRotationXYZ.cpp +++ b/src/nodes/SoRotationXYZ.cpp @@ -146,11 +146,13 @@ SoRotationXYZ::callback(SoCallbackAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoRotationXYZ::GLRender(SoGLRenderAction * action) { SoRotationXYZ::doAction((SoAction *)action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoScale.cpp b/src/nodes/SoScale.cpp index 7ccaddd6703..f42bda4569e 100644 --- a/src/nodes/SoScale.cpp +++ b/src/nodes/SoScale.cpp @@ -124,11 +124,13 @@ SoScale::doAction(SoAction * action) } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoScale::GLRender(SoGLRenderAction * action) { SoScale::doAction((SoAction *)action); } +#endif // Doc in superclass. void diff --git a/src/nodes/SoSceneTexture2.cpp b/src/nodes/SoSceneTexture2.cpp index 2ba0754d728..6ecd403203a 100644 --- a/src/nodes/SoSceneTexture2.cpp +++ b/src/nodes/SoSceneTexture2.cpp @@ -261,6 +261,9 @@ */ #include +#include +#include +#include #include "coindefs.h" #include @@ -281,19 +284,31 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -302,7 +317,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -316,6 +333,8 @@ #endif // COIN_THREADSAFE #include "nodes/SoSubNodeP.h" + +class SoGLImage; #include "elements/SoTextureScalePolicyElement.h" @@ -437,8 +456,8 @@ SoSceneTexture2::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoSceneTexture2, SO_FROM_COIN_2_2); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureImageElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureEnabledElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureImageElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureEnabledElement); SO_ENABLE(SoCallbackAction, SoMultiTextureImageElement); SO_ENABLE(SoCallbackAction, SoMultiTextureEnabledElement); @@ -447,6 +466,7 @@ SoSceneTexture2::initClass(void) SO_ENABLE(SoRayPickAction, SoMultiTextureEnabledElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER static SoGLImage::Wrap translateWrap(const SoSceneTexture2::Wrap wrap) { @@ -454,6 +474,7 @@ translateWrap(const SoSceneTexture2::Wrap wrap) if (wrap == SoSceneTexture2::REPEAT) return SoGLImage::REPEAT; return SoGLImage::CLAMP; } +#endif SoSceneTexture2::SoSceneTexture2(void) { @@ -523,6 +544,7 @@ SoSceneTexture2::~SoSceneTexture2(void) // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSceneTexture2::GLRender(SoGLRenderAction * action) { @@ -598,6 +620,7 @@ SoSceneTexture2::GLRender(SoGLRenderAction * action) // units will be ignored. pederb, 2003-11-04 } } +#endif // Documented in superclass. @@ -679,13 +702,16 @@ SoSceneTexture2::write(SoWriteAction * action) #define PUBLIC(obj) obj->api +#if COIN_BUILD_LEGACY_GL_RENDERER SoSceneTexture2P::SoSceneTexture2P(SoSceneTexture2 * apiptr) { this->api = apiptr; this->glcontext = NULL; this->buffervalid = FALSE; +#if COIN_BUILD_LEGACY_GL_RENDERER this->glimagevalid = FALSE; this->glimage = NULL; +#endif this->glimagecontext = 0; this->glaction = NULL; this->glcontextsize.setValue(-1,-1); @@ -1371,6 +1397,36 @@ SoSceneTexture2P::getTransparencyType(SoState * state) SoShapeStyleElement::getTransparencyType(state); } +#else + +SoSceneTexture2P::SoSceneTexture2P(SoSceneTexture2 * apiptr) +{ + this->api = apiptr; + this->glcontext = NULL; + this->buffervalid = FALSE; + this->glimagevalid = FALSE; + this->glimage = NULL; + this->glimagecontext = 0; + this->glaction = NULL; + this->glcontextsize.setValue(-1, -1); + this->glrectangle = FALSE; + this->offscreenbuffer = NULL; + this->offscreenbuffersize = 0; + this->canrendertotexture = FALSE; + this->contextid = -1; + this->fbodata = NULL; +} + +SoSceneTexture2P::~SoSceneTexture2P() +{ +#if COIN_BUILD_LEGACY_GL_RENDERER + if (this->glimage) this->glimage->unref(NULL); +#endif + delete [] this->offscreenbuffer; +} + +#endif + #undef PUBLIC diff --git a/src/nodes/SoSeparator.cpp b/src/nodes/SoSeparator.cpp index 2401c6c3a27..8e7fe1b9c33 100644 --- a/src/nodes/SoSeparator.cpp +++ b/src/nodes/SoSeparator.cpp @@ -76,7 +76,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -101,6 +103,8 @@ #include #include "profiler/SoNodeProfiling.h" +class SoGLCacheList; + // ************************************************************************* #if COIN_DEBUG @@ -294,7 +298,9 @@ static void soseparator_storage_destruct(void * data) { soseparator_storage * ptr = (soseparator_storage*) data; +#if COIN_BUILD_LEGACY_GL_RENDERER delete ptr->glcachelist; +#endif } // ************************************************************************* @@ -302,10 +308,14 @@ soseparator_storage_destruct(void * data) class SoSeparatorP { public: SoSeparatorP(void) { +#if COIN_BUILD_LEGACY_GL_RENDERER this->glcachestorage = new SbStorage(sizeof(soseparator_storage), soseparator_storage_construct, soseparator_storage_destruct); +#else + this->glcachestorage = NULL; +#endif this->pub = NULL; } ~SoSeparatorP() { @@ -328,19 +338,25 @@ class SoSeparatorP { #endif // !COIN_THREADSAFE SbStorage * glcachestorage; static void invalidate_gl_cache(void * tls, void *) { +#if COIN_BUILD_LEGACY_GL_RENDERER soseparator_storage * ptr = (soseparator_storage*) tls; if (ptr->glcachelist) { ptr->glcachelist->invalidateAll(); } +#else + (void) tls; +#endif } enum { YES, NO, MAYBE } hassoundchild; +#if COIN_BUILD_LEGACY_GL_RENDERER SoGLCacheList * getGLCacheList(SbBool createifnull); void invalidateGLCaches(void) { glcachestorage->applyToAll(invalidate_gl_cache, NULL); } +#endif void lock(void) { #ifdef COIN_THREADSAFE @@ -362,6 +378,7 @@ class SoSeparatorP { // ************************************************************************* +#if COIN_BUILD_LEGACY_GL_RENDERER SoGLCacheList * SoSeparatorP::getGLCacheList(SbBool createifnull) { @@ -372,6 +389,7 @@ SoSeparatorP::getGLCacheList(SbBool createifnull) } return ptr->glcachelist; } +#endif // ************************************************************************* @@ -477,7 +495,9 @@ SoSeparator::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoSeparator, SO_FROM_INVENTOR_1|SoNode::VRML1); SO_ENABLE(SoGetBoundingBoxAction, SoCacheElement); - SO_ENABLE(SoGLRenderAction, SoCacheElement); +#if COIN_BUILD_LEGACY_GL_RENDERER + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoCacheElement); +#endif SoSeparator::numrendercaches = 2; } @@ -619,6 +639,7 @@ SoSeparator::callback(SoCallbackAction * action) // ************************************************************************* // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSeparator::GLRender(SoGLRenderAction * action) { @@ -635,6 +656,7 @@ SoSeparator::GLRender(SoGLRenderAction * action) break; } } +#endif /*! SGI Open Inventor v2.1 obsoleted support for @@ -649,6 +671,7 @@ SoSeparator::GLRender(SoGLRenderAction * action) SoChildList::traverse(), but calls GLRenderBelowPath() directly for all its children. */ +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSeparator::GLRenderBelowPath(SoGLRenderAction * action) { @@ -657,7 +680,7 @@ SoSeparator::GLRenderBelowPath(SoGLRenderAction * action) SbBool didcull = FALSE; SoGLCacheList * createcache = NULL; - if ((this->renderCaching.getValue() != OFF) && + if (this->renderCaching.getValue() != OFF && (SoSeparator::getNumRenderCaches() > 0)) { // test if bbox is outside view-volume @@ -751,8 +774,10 @@ SoSeparator::GLRenderBelowPath(SoGLRenderAction * action) createcache->close(action); } } +#endif // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSeparator::GLRenderInPath(SoGLRenderAction * action) { @@ -803,13 +828,16 @@ SoSeparator::GLRenderInPath(SoGLRenderAction * action) this->GLRenderBelowPath(action); } } +#endif // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSeparator::GLRenderOffPath(SoGLRenderAction *) { // do nothing, since all state changes will be reset by the separator } +#endif // Doc from superclass. void @@ -954,7 +982,9 @@ SoSeparator::notify(SoNotList * nl) // are valid while reading them PRIVATE(this)->lock(); if (PRIVATE(this)->bboxcache) PRIVATE(this)->bboxcache->invalidate(); +#if COIN_BUILD_LEGACY_GL_RENDERER PRIVATE(this)->invalidateGLCaches(); +#endif PRIVATE(this)->hassoundchild = SoSeparatorP::MAYBE; PRIVATE(this)->unlock(); } @@ -964,12 +994,14 @@ SoSeparator::notify(SoNotList * nl) view frustum culling in a different manner. Let us know if you need this function, and we'll consider implementing it. */ +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoSeparator::cullTest(SoGLRenderAction * COIN_UNUSED_ARG(action), int & COIN_UNUSED_ARG(cullresults)) { COIN_OBSOLETED(); return FALSE; } +#endif // Doc from superclass. SbBool diff --git a/src/nodes/SoShapeHints.cpp b/src/nodes/SoShapeHints.cpp index c254ab44073..5dfdb02eb06 100644 --- a/src/nodes/SoShapeHints.cpp +++ b/src/nodes/SoShapeHints.cpp @@ -146,12 +146,15 @@ // ************************************************************************* #include +#include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -342,8 +345,8 @@ SoShapeHints::initClass(void) SO_ENABLE(SoCallbackAction, SoCreaseAngleElement); SO_ENABLE(SoCallbackAction, SoShapeHintsElement); - SO_ENABLE(SoGLRenderAction, SoCreaseAngleElement); - SO_ENABLE(SoGLRenderAction, SoGLShapeHintsElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoCreaseAngleElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLShapeHintsElement); SO_ENABLE(SoGetBoundingBoxAction, SoCreaseAngleElement); SO_ENABLE(SoGetBoundingBoxAction, SoShapeHintsElement); SO_ENABLE(SoPickAction, SoCreaseAngleElement); @@ -403,11 +406,13 @@ SoShapeHints::doAction(SoAction * action) #undef TEST_OVERRIDE } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoShapeHints::GLRender(SoGLRenderAction * action) { SoShapeHints::doAction(action); } +#endif void SoShapeHints::callback(SoCallbackAction * action) diff --git a/src/nodes/SoSpotLight.cpp b/src/nodes/SoSpotLight.cpp index 2d8ea78d030..7e04ec5fb54 100644 --- a/src/nodes/SoSpotLight.cpp +++ b/src/nodes/SoSpotLight.cpp @@ -70,7 +70,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -78,6 +80,7 @@ #include #include "nodes/SoSubNodeP.h" +#include "rendering/SoGL.h" // ************************************************************************* @@ -147,6 +150,7 @@ SoSpotLight::initClass(void) SO_NODE_INTERNAL_INIT_CLASS(SoSpotLight, SO_FROM_INVENTOR_1|SoNode::VRML1); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc in superclass. void SoSpotLight::GLRender(SoGLRenderAction * action) @@ -209,3 +213,4 @@ SoSpotLight::GLRender(SoGLRenderAction * action) glLightf(light, GL_SPOT_EXPONENT, dropoff); glLightf(light, GL_SPOT_CUTOFF, cutoff); } +#endif diff --git a/src/nodes/SoSubNodeP.h b/src/nodes/SoSubNodeP.h index 65d47b99867..146515e9d53 100644 --- a/src/nodes/SoSubNodeP.h +++ b/src/nodes/SoSubNodeP.h @@ -45,6 +45,8 @@ #error this is a private header file #endif // !COIN_INTERNAL +#include "actions/SoActionGLP.h" + // only internal nodes can use this macro and pass "inherited" as arg #4 #define PRIVATE_INTERNAL_COMMON_INIT_CODE(_class_, _classname_, _createfunc_, _parentclass_) \ do { \ diff --git a/src/nodes/SoSurroundScale.cpp b/src/nodes/SoSurroundScale.cpp index a1a63926260..3f7fc4e9bd1 100644 --- a/src/nodes/SoSurroundScale.cpp +++ b/src/nodes/SoSurroundScale.cpp @@ -334,11 +334,13 @@ SoSurroundScale::callback(SoCallbackAction * action) } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSurroundScale::GLRender(SoGLRenderAction * action) { SoSurroundScale::doAction((SoAction *)action); } +#endif // Doc in superclass. void diff --git a/src/nodes/SoSwitch.cpp b/src/nodes/SoSwitch.cpp index ccdbdbc82ee..fbfb8a67506 100644 --- a/src/nodes/SoSwitch.cpp +++ b/src/nodes/SoSwitch.cpp @@ -203,7 +203,7 @@ SoSwitch::initClass(void) SO_ENABLE(SoGetBoundingBoxAction, SoSwitchElement); SO_ENABLE(SoSearchAction, SoSwitchElement); SO_ENABLE(SoGetMatrixAction, SoSwitchElement); - SO_ENABLE(SoGLRenderAction, SoSwitchElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoSwitchElement); SO_ENABLE(SoPickAction, SoSwitchElement); SO_ENABLE(SoCallbackAction, SoSwitchElement); @@ -212,11 +212,13 @@ SoSwitch::initClass(void) } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSwitch::GLRender(SoGLRenderAction * action) { this->doAction(action); } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTexture.cpp b/src/nodes/SoTexture.cpp index bd4b786ba47..450ac3f2c12 100644 --- a/src/nodes/SoTexture.cpp +++ b/src/nodes/SoTexture.cpp @@ -75,11 +75,13 @@ SoTexture::doAction(SoAction * action) inherited::doAction(action); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTexture::GLRender(SoGLRenderAction * action) { inherited::GLRender(action); } +#endif void SoTexture::callback(SoCallbackAction * action) diff --git a/src/nodes/SoTexture2.cpp b/src/nodes/SoTexture2.cpp index af900b2c0be..416a128945c 100644 --- a/src/nodes/SoTexture2.cpp +++ b/src/nodes/SoTexture2.cpp @@ -193,6 +193,8 @@ // ************************************************************************* #include +#include +#include #include @@ -212,9 +214,15 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -222,10 +230,14 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include +class SoGLImage; + // ************************************************************************* /*! @@ -435,7 +447,9 @@ SoTexture2::SoTexture2(void) SO_NODE_DEFINE_ENUM_VALUE(Model, REPLACE); SO_NODE_SET_SF_ENUM_TYPE(model, Model); +#if COIN_BUILD_LEGACY_GL_RENDERER PRIVATE(this)->glimage = NULL; +#endif PRIVATE(this)->glimagevalid = FALSE; PRIVATE(this)->readstatus = 1; @@ -453,7 +467,9 @@ SoTexture2::SoTexture2(void) */ SoTexture2::~SoTexture2() { +#if COIN_BUILD_LEGACY_GL_RENDERER if (PRIVATE(this)->glimage) PRIVATE(this)->glimage->unref(NULL); +#endif delete PRIVATE(this)->filenamesensor; delete PRIVATE(this); } @@ -467,8 +483,8 @@ SoTexture2::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTexture2, SO_FROM_INVENTOR_1|SoNode::VRML1); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureImageElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureEnabledElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureImageElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureEnabledElement); SO_ENABLE(SoCallbackAction, SoMultiTextureEnabledElement); SO_ENABLE(SoCallbackAction, SoMultiTextureImageElement); @@ -503,14 +519,17 @@ SoTexture2::readInstance(SoInput * in, unsigned short flags) return readOK; } +#if COIN_BUILD_LEGACY_GL_RENDERER static SoGLImage::Wrap translateWrap(const SoTexture2::Wrap wrap) { if (wrap == SoTexture2::REPEAT) return SoGLImage::REPEAT; return SoGLImage::CLAMP; } +#endif // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTexture2::GLRender(SoGLRenderAction * action) { @@ -614,6 +633,7 @@ SoTexture2::GLRender(SoGLRenderAction * action) // units will be ignored. pederb, 2003-11-04 } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTexture2Transform.cpp b/src/nodes/SoTexture2Transform.cpp index 047a950c295..d037a699a0d 100644 --- a/src/nodes/SoTexture2Transform.cpp +++ b/src/nodes/SoTexture2Transform.cpp @@ -59,11 +59,14 @@ // ************************************************************************* #include +#include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -129,12 +132,13 @@ SoTexture2Transform::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTexture2Transform, SO_FROM_INVENTOR_1|SoNode::VRML1); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureMatrixElement); SO_ENABLE(SoCallbackAction, SoMultiTextureMatrixElement); SO_ENABLE(SoPickAction, SoMultiTextureMatrixElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoTexture2Transform::GLRender(SoGLRenderAction * action) @@ -161,6 +165,7 @@ SoTexture2Transform::GLRender(SoGLRenderAction * action) // units will be ignored. pederb, 2003-11-10 } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTexture3.cpp b/src/nodes/SoTexture3.cpp index f7b2a49ced0..4475c4a0e98 100644 --- a/src/nodes/SoTexture3.cpp +++ b/src/nodes/SoTexture3.cpp @@ -74,6 +74,8 @@ // ************************************************************************* #include +#include +#include #include #include @@ -81,14 +83,20 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -228,7 +236,9 @@ SoTexture3::SoTexture3(void) */ SoTexture3::~SoTexture3() { +#if COIN_BUILD_LEGACY_GL_RENDERER if (this->glimage) this->glimage->unref(NULL); +#endif delete this->filenamesensor; } @@ -241,7 +251,7 @@ SoTexture3::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTexture3, SO_FROM_INVENTOR_2_6|SO_FROM_COIN_2_0); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureImageElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureImageElement); SO_ENABLE(SoCallbackAction, SoMultiTextureImageElement); } @@ -265,14 +275,17 @@ SoTexture3::readInstance(SoInput * in, unsigned short flags) return readOK; } +#if COIN_BUILD_LEGACY_GL_RENDERER static SoGLImage::Wrap translateWrap(const SoTexture3::Wrap wrap) { if (wrap == SoTexture3::REPEAT) return SoGLImage::REPEAT; return SoGLImage::CLAMP; } +#endif // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTexture3::GLRender(SoGLRenderAction * action) { @@ -354,6 +367,7 @@ SoTexture3::GLRender(SoGLRenderAction * action) SoTextureOverrideElement::setImageOverride(state, TRUE); } } +#endif // doc from parent void diff --git a/src/nodes/SoTexture3Transform.cpp b/src/nodes/SoTexture3Transform.cpp index 3295a546959..f18ba44c36b 100644 --- a/src/nodes/SoTexture3Transform.cpp +++ b/src/nodes/SoTexture3Transform.cpp @@ -64,12 +64,15 @@ // ************************************************************************* #include +#include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -140,12 +143,13 @@ SoTexture3Transform::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTexture3Transform, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureMatrixElement); SO_ENABLE(SoCallbackAction, SoMultiTextureMatrixElement); SO_ENABLE(SoPickAction, SoMultiTextureMatrixElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoTexture3Transform::GLRender(SoGLRenderAction * action) @@ -171,6 +175,7 @@ SoTexture3Transform::GLRender(SoGLRenderAction * action) // units will be ignored. pederb, 2003-11-11 } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureCombine.cpp b/src/nodes/SoTextureCombine.cpp index ab3fe56d8b2..cf616e0466e 100644 --- a/src/nodes/SoTextureCombine.cpp +++ b/src/nodes/SoTextureCombine.cpp @@ -483,9 +483,10 @@ SoTextureCombine::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCombine, SO_FROM_COIN_2_2); - SO_ENABLE(SoGLRenderAction, SoTextureCombineElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoTextureCombineElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoTextureCombine::GLRender(SoGLRenderAction * action) @@ -523,6 +524,7 @@ SoTextureCombine::GLRender(SoGLRenderAction * action) } } +#endif // Doc from superclass. void diff --git a/src/nodes/SoTextureCoordinate2.cpp b/src/nodes/SoTextureCoordinate2.cpp index 7d5f754b64d..d746903633b 100644 --- a/src/nodes/SoTextureCoordinate2.cpp +++ b/src/nodes/SoTextureCoordinate2.cpp @@ -109,17 +109,26 @@ Separator { #include +class SoVBO; +#include + #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif // ************************************************************************* @@ -143,7 +152,11 @@ Separator { class SoTextureCoordinate2P { public: SoTextureCoordinate2P() : vbo(NULL) { } - ~SoTextureCoordinate2P() { delete this->vbo; } + ~SoTextureCoordinate2P() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -178,7 +191,7 @@ SoTextureCoordinate2::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCoordinate2, SO_FROM_INVENTOR_1|SoNode::VRML1); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureCoordinateElement); SO_ENABLE(SoCallbackAction, SoMultiTextureCoordinateElement); SO_ENABLE(SoPickAction, SoMultiTextureCoordinateElement); } @@ -194,6 +207,7 @@ SoTextureCoordinate2::doAction(SoAction * action) this->point.getValues(0)); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoTextureCoordinate2::GLRender(SoGLRenderAction * action) @@ -237,6 +251,7 @@ SoTextureCoordinate2::GLRender(SoGLRenderAction * action) SoBase::staticDataUnlock(); SoGLVBOElement::setTexCoordVBO(state, 0, setvbo ? PRIVATE(this)->vbo : NULL); } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureCoordinate3.cpp b/src/nodes/SoTextureCoordinate3.cpp index 5e9512690ad..94ef12a60ec 100644 --- a/src/nodes/SoTextureCoordinate3.cpp +++ b/src/nodes/SoTextureCoordinate3.cpp @@ -67,17 +67,26 @@ #include +class SoVBO; +#include + #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif // ************************************************************************* @@ -99,7 +108,11 @@ class SoTextureCoordinate3P { public: SoTextureCoordinate3P() : vbo(NULL) { } - ~SoTextureCoordinate3P() { delete this->vbo; } + ~SoTextureCoordinate3P() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -134,7 +147,7 @@ SoTextureCoordinate3::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCoordinate3, SO_FROM_INVENTOR_2_6|SO_FROM_COIN_2_0); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureCoordinateElement); SO_ENABLE(SoCallbackAction, SoMultiTextureCoordinateElement); } @@ -150,6 +163,7 @@ SoTextureCoordinate3::doAction(SoAction * action) this->point.getValues(0)); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoTextureCoordinate3::GLRender(SoGLRenderAction * action) @@ -193,6 +207,7 @@ SoTextureCoordinate3::GLRender(SoGLRenderAction * action) SoBase::staticDataUnlock(); SoGLVBOElement::setVertexVBO(state, setvbo ? PRIVATE(this)->vbo : NULL); } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureCoordinateBinding.cpp b/src/nodes/SoTextureCoordinateBinding.cpp index f785461da22..d01bb0703e8 100644 --- a/src/nodes/SoTextureCoordinateBinding.cpp +++ b/src/nodes/SoTextureCoordinateBinding.cpp @@ -131,17 +131,19 @@ SoTextureCoordinateBinding::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCoordinateBinding, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoTextureCoordinateBindingElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoTextureCoordinateBindingElement); SO_ENABLE(SoPickAction, SoTextureCoordinateBindingElement); SO_ENABLE(SoCallbackAction, SoTextureCoordinateBindingElement); } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureCoordinateBinding::GLRender(SoGLRenderAction * action) { SoTextureCoordinateBinding::doAction(action); } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureCoordinateCube.cpp b/src/nodes/SoTextureCoordinateCube.cpp index 910e82a0fce..c4615216aa9 100644 --- a/src/nodes/SoTextureCoordinateCube.cpp +++ b/src/nodes/SoTextureCoordinateCube.cpp @@ -51,6 +51,7 @@ // ************************************************************************* #include +#include #include "coindefs.h" #ifdef HAVE_CONFIG_H @@ -65,7 +66,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -164,7 +167,7 @@ SoTextureCoordinateCube::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCoordinateCube, SO_FROM_COIN_2_3); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureCoordinateElement); SO_ENABLE(SoCallbackAction, SoMultiTextureCoordinateElement); SO_ENABLE(SoPickAction, SoMultiTextureCoordinateElement); } @@ -288,6 +291,7 @@ SoTextureCoordinateCube::doAction(SoAction * action) } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureCoordinateCube::GLRender(SoGLRenderAction * action) { @@ -305,6 +309,7 @@ SoTextureCoordinateCube::GLRender(SoGLRenderAction * action) PRIVATE(this)); } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureCoordinateCylinder.cpp b/src/nodes/SoTextureCoordinateCylinder.cpp index 47807707859..274d6dfaddc 100644 --- a/src/nodes/SoTextureCoordinateCylinder.cpp +++ b/src/nodes/SoTextureCoordinateCylinder.cpp @@ -49,6 +49,7 @@ // ************************************************************************* #include +#include #include "coindefs.h" #ifdef HAVE_CONFIG_H @@ -63,7 +64,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -163,7 +166,7 @@ SoTextureCoordinateCylinder::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCoordinateCylinder, SO_FROM_COIN_2_3); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureCoordinateElement); SO_ENABLE(SoCallbackAction, SoMultiTextureCoordinateElement); SO_ENABLE(SoPickAction, SoMultiTextureCoordinateElement); @@ -276,6 +279,7 @@ SoTextureCoordinateCylinder::doAction(SoAction * action) } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureCoordinateCylinder::GLRender(SoGLRenderAction * action) { @@ -293,6 +297,7 @@ SoTextureCoordinateCylinder::GLRender(SoGLRenderAction * action) PRIVATE(this)); } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureCoordinateDefault.cpp b/src/nodes/SoTextureCoordinateDefault.cpp index 485d73c77ad..fee2190b4a1 100644 --- a/src/nodes/SoTextureCoordinateDefault.cpp +++ b/src/nodes/SoTextureCoordinateDefault.cpp @@ -50,9 +50,12 @@ // ************************************************************************* #include +#include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -94,6 +97,7 @@ SoTextureCoordinateDefault::doAction(SoAction * action) SoMultiTextureCoordinateElement::setDefault(action->getState(), this, unit); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoTextureCoordinateDefault::GLRender(SoGLRenderAction * action) @@ -103,6 +107,7 @@ SoTextureCoordinateDefault::GLRender(SoGLRenderAction * action) this, 0, NULL); SoTextureCoordinateDefault::doAction((SoAction *)action); } +#endif // doc from parent void diff --git a/src/nodes/SoTextureCoordinateEnvironment.cpp b/src/nodes/SoTextureCoordinateEnvironment.cpp index 7ceab57567f..becdec66ba5 100644 --- a/src/nodes/SoTextureCoordinateEnvironment.cpp +++ b/src/nodes/SoTextureCoordinateEnvironment.cpp @@ -70,6 +70,7 @@ // FIXME: Can this somehow relate to 3D textures? (kintel 20020203) #include +#include #include #include @@ -80,7 +81,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -184,6 +187,7 @@ SoTextureCoordinateEnvironment::doAction(SoAction * action) action->getState()); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoTextureCoordinateEnvironment::GLRender(SoGLRenderAction * action) @@ -204,6 +208,7 @@ SoTextureCoordinateEnvironment::GLRender(SoGLRenderAction * action) action->getState()); } } +#endif // doc from parent void @@ -219,6 +224,7 @@ SoTextureCoordinateEnvironment::pick(SoPickAction * action) SoTextureCoordinateEnvironment::doAction((SoAction *)action); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureCoordinateEnvironment::handleTexgen(void * /* data */) { @@ -243,3 +249,4 @@ SoTextureCoordinateEnvironment::handleTexgen(void * /* data */) glTexGenfv(GL_R, GL_OBJECT_PLANE, plane); glTexGenfv(GL_Q, GL_OBJECT_PLANE, plane); } +#endif diff --git a/src/nodes/SoTextureCoordinateNormalMap.cpp b/src/nodes/SoTextureCoordinateNormalMap.cpp index c9046960666..3d8fea6b66e 100644 --- a/src/nodes/SoTextureCoordinateNormalMap.cpp +++ b/src/nodes/SoTextureCoordinateNormalMap.cpp @@ -70,6 +70,7 @@ // FIXME: Can this somehow relate to 3D textures? (kintel 20020203) #include +#include #include "coindefs.h" #include @@ -81,7 +82,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -157,6 +160,7 @@ SoTextureCoordinateNormalMap::doAction(SoAction * action) action->getState()); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoTextureCoordinateNormalMap::GLRender(SoGLRenderAction * action) @@ -174,6 +178,7 @@ SoTextureCoordinateNormalMap::GLRender(SoGLRenderAction * action) action->getState()); } +#endif // doc from parent void @@ -192,7 +197,9 @@ SoTextureCoordinateNormalMap::pick(SoPickAction * action) void SoTextureCoordinateNormalMap::handleTexgen(void * /* data */) { +#if COIN_BUILD_LEGACY_GL_RENDERER glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP); glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP); +#endif } diff --git a/src/nodes/SoTextureCoordinateObject.cpp b/src/nodes/SoTextureCoordinateObject.cpp index 21855c58ca0..57e3776a0b4 100644 --- a/src/nodes/SoTextureCoordinateObject.cpp +++ b/src/nodes/SoTextureCoordinateObject.cpp @@ -52,6 +52,7 @@ // ************************************************************************* #include +#include #include "coindefs.h" #ifdef HAVE_CONFIG_H @@ -60,7 +61,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -150,6 +153,7 @@ SoTextureCoordinateObject::doAction(SoAction * action) this); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoTextureCoordinateObject::GLRender(SoGLRenderAction * action) @@ -168,6 +172,7 @@ SoTextureCoordinateObject::GLRender(SoGLRenderAction * action) this); } } +#endif // doc from parent void @@ -184,6 +189,7 @@ SoTextureCoordinateObject::pick(SoPickAction * action) } // texgen callback. Turns on plane texgen in OpenGL +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureCoordinateObject::handleTexgen(void * data) { @@ -205,3 +211,4 @@ SoTextureCoordinateObject::handleTexgen(void * data) const SbVec4f & q = thisp->factorQ.getValue(); glTexGenfv(GL_Q, GL_OBJECT_PLANE, q.getValue()); } +#endif diff --git a/src/nodes/SoTextureCoordinatePlane.cpp b/src/nodes/SoTextureCoordinatePlane.cpp index 60bbf493953..4008fa704f1 100644 --- a/src/nodes/SoTextureCoordinatePlane.cpp +++ b/src/nodes/SoTextureCoordinatePlane.cpp @@ -113,6 +113,7 @@ // ************************************************************************* #include +#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -120,7 +121,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -224,6 +227,7 @@ SoTextureCoordinatePlane::doAction(SoAction * action) this); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoTextureCoordinatePlane::GLRender(SoGLRenderAction * action) @@ -243,6 +247,7 @@ SoTextureCoordinatePlane::GLRender(SoGLRenderAction * action) this); } } +#endif // doc from parent void @@ -259,6 +264,7 @@ SoTextureCoordinatePlane::pick(SoPickAction * action) } // texgen callback. Turns on plane texgen in OpenGL +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureCoordinatePlane::handleTexgen(void *data) { @@ -295,6 +301,7 @@ SoTextureCoordinatePlane::handleTexgen(void *data) plane[3] = 1.0f; glTexGenfv(GL_Q, GL_OBJECT_PLANE, plane); } +#endif void SoTextureCoordinatePlane::setupGencache(void) diff --git a/src/nodes/SoTextureCoordinateReflectionMap.cpp b/src/nodes/SoTextureCoordinateReflectionMap.cpp index 8cc04f09962..70470344335 100644 --- a/src/nodes/SoTextureCoordinateReflectionMap.cpp +++ b/src/nodes/SoTextureCoordinateReflectionMap.cpp @@ -50,6 +50,7 @@ // ************************************************************************* #include +#include #include "coindefs.h" #include @@ -61,7 +62,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -157,6 +160,7 @@ SoTextureCoordinateReflectionMap::doAction(SoAction * action) action->getState()); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoTextureCoordinateReflectionMap::GLRender(SoGLRenderAction * action) @@ -174,6 +178,7 @@ SoTextureCoordinateReflectionMap::GLRender(SoGLRenderAction * action) action->getState()); } +#endif // doc from parent void @@ -192,7 +197,9 @@ SoTextureCoordinateReflectionMap::pick(SoPickAction * action) void SoTextureCoordinateReflectionMap::handleTexgen(void * COIN_UNUSED_ARG(data)) { +#if COIN_BUILD_LEGACY_GL_RENDERER glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); +#endif } diff --git a/src/nodes/SoTextureCoordinateSphere.cpp b/src/nodes/SoTextureCoordinateSphere.cpp index c2178649ec2..b6e7055b8b2 100644 --- a/src/nodes/SoTextureCoordinateSphere.cpp +++ b/src/nodes/SoTextureCoordinateSphere.cpp @@ -49,6 +49,7 @@ // ************************************************************************* #include +#include #include "coindefs.h" #ifdef HAVE_CONFIG_H @@ -63,7 +64,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -159,7 +162,7 @@ SoTextureCoordinateSphere::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCoordinateSphere, SO_FROM_COIN_2_3); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureCoordinateElement); SO_ENABLE(SoCallbackAction, SoMultiTextureCoordinateElement); SO_ENABLE(SoPickAction, SoMultiTextureCoordinateElement); @@ -243,6 +246,7 @@ SoTextureCoordinateSphere::doAction(SoAction * action) } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureCoordinateSphere::GLRender(SoGLRenderAction * action) { @@ -260,6 +264,7 @@ SoTextureCoordinateSphere::GLRender(SoGLRenderAction * action) PRIVATE(this)); } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureCubeMap.cpp b/src/nodes/SoTextureCubeMap.cpp index dbe0fabf7f8..45a09a0b333 100644 --- a/src/nodes/SoTextureCubeMap.cpp +++ b/src/nodes/SoTextureCubeMap.cpp @@ -66,6 +66,9 @@ // ************************************************************************* #include +#include +#include +#include #include @@ -79,14 +82,22 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -101,6 +112,8 @@ #include "nodes/SoSubNodeP.h" #include "elements/SoTextureScalePolicyElement.h" +class SoGLCubeMapImage; + /*! \enum SoTextureCubeMap::Model @@ -317,7 +330,9 @@ SoTextureCubeMap::SoTextureCubeMap(void) */ SoTextureCubeMap::~SoTextureCubeMap() { +#if COIN_BUILD_LEGACY_GL_RENDERER if (PRIVATE(this)->glimage) PRIVATE(this)->glimage->unref(NULL); +#endif delete PRIVATE(this)->filenames_sensor; delete PRIVATE(this); } @@ -331,8 +346,8 @@ SoTextureCubeMap::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureCubeMap, SO_FROM_COIN_2_4); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureImageElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureEnabledElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureImageElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureEnabledElement); SO_ENABLE(SoCallbackAction, SoMultiTextureImageElement); SO_ENABLE(SoCallbackAction, SoMultiTextureEnabledElement); @@ -379,6 +394,7 @@ SoTextureCubeMap::readInstance(SoInput * in, unsigned short flags) return readOK; } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoTextureCubeMap::GLRender(SoGLRenderAction * action) @@ -460,6 +476,7 @@ SoTextureCubeMap::GLRender(SoGLRenderAction * action) // units will be ignored. pederb, 2003-11-04 } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureMatrixTransform.cpp b/src/nodes/SoTextureMatrixTransform.cpp index 7877386f512..ae6a88526b0 100644 --- a/src/nodes/SoTextureMatrixTransform.cpp +++ b/src/nodes/SoTextureMatrixTransform.cpp @@ -59,12 +59,15 @@ // ************************************************************************* #include +#include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -110,12 +113,13 @@ SoTextureMatrixTransform::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureMatrixTransform, SO_FROM_INVENTOR_1); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureMatrixElement); SO_ENABLE(SoCallbackAction, SoMultiTextureMatrixElement); SO_ENABLE(SoPickAction, SoMultiTextureMatrixElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoTextureMatrixTransform::GLRender(SoGLRenderAction * action) @@ -140,6 +144,7 @@ SoTextureMatrixTransform::GLRender(SoGLRenderAction * action) // units will be ignored. pederb, 2003-11-11 } } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTextureScalePolicy.cpp b/src/nodes/SoTextureScalePolicy.cpp index 73bc020f59a..2fa64776d2e 100644 --- a/src/nodes/SoTextureScalePolicy.cpp +++ b/src/nodes/SoTextureScalePolicy.cpp @@ -209,8 +209,8 @@ void SoTextureScalePolicy::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureScalePolicy, SO_FROM_COIN_2_0); - SO_ENABLE(SoGLRenderAction, SoTextureScalePolicyElement); - SO_ENABLE(SoGLRenderAction, SoTextureScaleQualityElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoTextureScalePolicyElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoTextureScaleQualityElement); } static SoTextureScalePolicyElement::Policy @@ -237,6 +237,7 @@ convert_policy(const SoTextureScalePolicy::Policy policy) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTextureScalePolicy::GLRender(SoGLRenderAction * action) { @@ -249,3 +250,4 @@ SoTextureScalePolicy::GLRender(SoGLRenderAction * action) this->quality.getValue()); } } +#endif diff --git a/src/nodes/SoTextureUnit.cpp b/src/nodes/SoTextureUnit.cpp index c74bb7a578d..89b149d00e6 100644 --- a/src/nodes/SoTextureUnit.cpp +++ b/src/nodes/SoTextureUnit.cpp @@ -56,6 +56,10 @@ */ #include +#include +#include +#include +#include #include #include @@ -63,10 +67,18 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -137,17 +149,18 @@ SoTextureUnit::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoTextureUnit, SO_FROM_COIN_2_2); - SO_ENABLE(SoGLRenderAction, SoTextureUnitElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoTextureUnitElement); SO_ENABLE(SoCallbackAction, SoTextureUnitElement); SO_ENABLE(SoPickAction, SoTextureUnitElement); SO_ENABLE(SoGetBoundingBoxAction, SoTextureUnitElement); SO_ENABLE(SoGetMatrixAction, SoTextureUnitElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureImageElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureEnabledElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureImageElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureEnabledElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureMatrixElement); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Doc from superclass. void SoTextureUnit::GLRender(SoGLRenderAction * action) @@ -173,6 +186,7 @@ SoTextureUnit::GLRender(SoGLRenderAction * action) } } } +#endif // Doc from superclass. void @@ -224,7 +238,11 @@ uint32_t SoTextureUnit::getMaxTextureUnit(void) { GLint tmp; +#if COIN_BUILD_LEGACY_GL_RENDERER glGetIntegerv(GL_MAX_TEXTURE_UNITS, &tmp); +#else + glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &tmp); +#endif return (uint32_t) tmp; } diff --git a/src/nodes/SoTransform.cpp b/src/nodes/SoTransform.cpp index f7d7524fdd2..c8f1d92f67c 100644 --- a/src/nodes/SoTransform.cpp +++ b/src/nodes/SoTransform.cpp @@ -341,11 +341,13 @@ SoTransform::doAction(SoAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTransform::GLRender(SoGLRenderAction * action) { SoTransform::doAction((SoAction *)action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoTransformSeparator.cpp b/src/nodes/SoTransformSeparator.cpp index b489bf996c2..643ca085a07 100644 --- a/src/nodes/SoTransformSeparator.cpp +++ b/src/nodes/SoTransformSeparator.cpp @@ -144,6 +144,7 @@ SoTransformSeparator::callback(SoCallbackAction * action) SoModelMatrixElement::popMatrix(action->getState(), matrix); } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoTransformSeparator::GLRender(SoGLRenderAction * action) @@ -154,6 +155,7 @@ SoTransformSeparator::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::shouldAutoCache(action->getState(), SoGLCacheContextElement::DONT_AUTO_CACHE); } +#endif // Documented in superclass. void diff --git a/src/nodes/SoTransformation.cpp b/src/nodes/SoTransformation.cpp index ff3695c46ae..3e79bd7afb9 100644 --- a/src/nodes/SoTransformation.cpp +++ b/src/nodes/SoTransformation.cpp @@ -85,13 +85,16 @@ Separator { #include +#include #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -125,7 +128,7 @@ SoTransformation::initClass(void) SO_ENABLE(SoGetBoundingBoxAction, SoBBoxModelMatrixElement); SO_ENABLE(SoGetBoundingBoxAction, SoLocalBBoxMatrixElement); - SO_ENABLE(SoGLRenderAction, SoGLModelMatrixElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLModelMatrixElement); SO_ENABLE(SoPickAction, SoModelMatrixElement); diff --git a/src/nodes/SoTranslation.cpp b/src/nodes/SoTranslation.cpp index 5622007965c..61d9ce49055 100644 --- a/src/nodes/SoTranslation.cpp +++ b/src/nodes/SoTranslation.cpp @@ -106,11 +106,13 @@ SoTranslation::doAction(SoAction * action) } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTranslation::GLRender(SoGLRenderAction * action) { SoTranslation::doAction((SoAction *)action); } +#endif // Doc in superclass. void diff --git a/src/nodes/SoTransparencyType.cpp b/src/nodes/SoTransparencyType.cpp index d2fb3c12bae..781c8452744 100644 --- a/src/nodes/SoTransparencyType.cpp +++ b/src/nodes/SoTransparencyType.cpp @@ -136,11 +136,13 @@ SoTransparencyType::initClass(void) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTransparencyType::GLRender(SoGLRenderAction * action) { SoTransparencyType::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoUnits.cpp b/src/nodes/SoUnits.cpp index ead8bb00c20..760e03866aa 100644 --- a/src/nodes/SoUnits.cpp +++ b/src/nodes/SoUnits.cpp @@ -152,7 +152,7 @@ SoUnits::initClass(void) SO_ENABLE(SoGetBoundingBoxAction, SoUnitsElement); SO_ENABLE(SoGetMatrixAction, SoUnitsElement); - SO_ENABLE(SoGLRenderAction, SoUnitsElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoUnitsElement); SO_ENABLE(SoPickAction, SoUnitsElement); SO_ENABLE(SoCallbackAction, SoUnitsElement); SO_ENABLE(SoGetPrimitiveCountAction, SoUnitsElement); @@ -166,11 +166,13 @@ SoUnits::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoUnits::GLRender(SoGLRenderAction * action) { SoUnits::doAction((SoAction*)action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoUnknownNode.cpp b/src/nodes/SoUnknownNode.cpp index eb37678a8b1..bf66f0e52fd 100644 --- a/src/nodes/SoUnknownNode.cpp +++ b/src/nodes/SoUnknownNode.cpp @@ -279,11 +279,13 @@ SoUnknownNode::search(SoSearchAction * action) PRIVATE(this)->alternate->traverse(action); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoUnknownNode::GLRender(SoGLRenderAction * action) { PRIVATE(this)->alternate->traverse(action); } +#endif void SoUnknownNode::getBoundingBox(SoGetBoundingBoxAction * action) diff --git a/src/nodes/SoUnknownNode.h b/src/nodes/SoUnknownNode.h index 44141be2406..8da826dcac6 100644 --- a/src/nodes/SoUnknownNode.h +++ b/src/nodes/SoUnknownNode.h @@ -69,7 +69,9 @@ class SoUnknownNode : public SoNode { void setNodeClassName(const SbName & name); SoChildList * getChildren(void) const override; +#if COIN_BUILD_LEGACY_GL_RENDERER void GLRender(SoGLRenderAction * action) override; +#endif void getBoundingBox(SoGetBoundingBoxAction * action) override; void pick(SoPickAction * action) override; void search(SoSearchAction * action) override; diff --git a/src/nodes/SoVertexAttribute.cpp b/src/nodes/SoVertexAttribute.cpp index e8c06a5ca26..84b1ba3e6e6 100644 --- a/src/nodes/SoVertexAttribute.cpp +++ b/src/nodes/SoVertexAttribute.cpp @@ -31,7 +31,12 @@ \**************************************************************************/ #include + +class SoVBO; +#include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include @@ -49,12 +54,17 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif #include "nodes/SoSubNodeP.h" #include "elements/SoVertexAttributeData.h" +#include "coindefs.h" /*! \class SoVertexAttribute SoVertexAttribute.h Inventor/nodes/SoVertexAttribute.h @@ -168,7 +178,7 @@ SoVertexAttribute::initClass(void) SoNode::nextActionMethodIndex++); SoNode::setCompatibilityTypes(SoVertexAttribute::getClassTypeId(), SO_FROM_COIN_3_0); - SO_ENABLE(SoGLRenderAction, SoGLVertexAttributeElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLVertexAttributeElement); } /*! @@ -247,6 +257,7 @@ SoVertexAttribute::doAction(SoAction * action) SoVertexAttributeElement::add(action->getState(), PRIVATE(this)->attributedata); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVertexAttribute::GLRender(SoGLRenderAction * action) { @@ -313,6 +324,7 @@ SoVertexAttribute::GLRender(SoGLRenderAction * action) } SoBase::staticDataUnlock(); } +#endif SoMField * SoVertexAttribute::getValuesField(void) const diff --git a/src/nodes/SoVertexAttributeBinding.cpp b/src/nodes/SoVertexAttributeBinding.cpp index 274b5f3f23e..188dbed5d8e 100644 --- a/src/nodes/SoVertexAttributeBinding.cpp +++ b/src/nodes/SoVertexAttributeBinding.cpp @@ -198,18 +198,20 @@ SoVertexAttributeBinding::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoVertexAttributeBinding, SO_FROM_INVENTOR_1|SoNode::VRML1); - SO_ENABLE(SoGLRenderAction, SoVertexAttributeBindingElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoVertexAttributeBindingElement); SO_ENABLE(SoPickAction, SoVertexAttributeBindingElement); SO_ENABLE(SoCallbackAction, SoVertexAttributeBindingElement); SO_ENABLE(SoGetPrimitiveCountAction, SoVertexAttributeBindingElement); } // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVertexAttributeBinding::GLRender(SoGLRenderAction * action) { SoVertexAttributeBinding::doAction(action); } +#endif // Doc from superclass. void diff --git a/src/nodes/SoVertexProperty.cpp b/src/nodes/SoVertexProperty.cpp index c5f6075d21b..aabf6096a70 100644 --- a/src/nodes/SoVertexProperty.cpp +++ b/src/nodes/SoVertexProperty.cpp @@ -95,25 +95,40 @@ #include +class SoVBO; +#include +#include +#include + #include #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif /*! \enum SoVertexProperty::Binding @@ -229,12 +244,14 @@ class SoVertexPropertyP { this->transparent = FALSE; } ~SoVertexPropertyP() { +#if COIN_BUILD_LEGACY_GL_RENDERER for (int i = 0; i < this->texcoordvbo.getLength(); i++) { delete this->texcoordvbo[i]; } delete this->vertexvbo; delete this->normalvbo; delete this->colorvbo; +#endif } SoVertexProperty * master; @@ -306,11 +323,11 @@ SoVertexProperty::initClass(void) SO_ENABLE(SoGetBoundingBoxAction, SoCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoGLCoordinateElement); - SO_ENABLE(SoGLRenderAction, SoMaterialBindingElement); - SO_ENABLE(SoGLRenderAction, SoNormalBindingElement); - SO_ENABLE(SoGLRenderAction, SoGLNormalElement); - SO_ENABLE(SoGLRenderAction, SoGLMultiTextureCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLCoordinateElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoMaterialBindingElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoNormalBindingElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLNormalElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoGLMultiTextureCoordinateElement); SO_ENABLE(SoPickAction, SoCoordinateElement); SO_ENABLE(SoPickAction, SoMaterialBindingElement); @@ -341,12 +358,14 @@ SoVertexProperty::getBoundingBox(SoGetBoundingBoxAction * action) } } +#if COIN_BUILD_LEGACY_GL_RENDERER // Documented in superclass. void SoVertexProperty::GLRender(SoGLRenderAction * action) { SoVertexProperty::doAction(action); } +#endif #define TEST_OVERRIDE(bit, flags) ((SoOverrideElement::bit & (flags)) != 0) @@ -357,7 +376,10 @@ SoVertexProperty::doAction(SoAction *action) SoState * state = action->getState(); uint32_t overrideflags = SoOverrideElement::getFlags(state); - SbBool glrender = action->isOfType(SoGLRenderAction::getClassTypeId()); + SbBool glrender = FALSE; +#if COIN_BUILD_LEGACY_GL_RENDERER + glrender = action->isOfType(SoGLRenderAction::getClassTypeId()); +#endif if (glrender) SoBase::staticDataLock(); if (PRIVATE(this)->checktransparent) { @@ -371,7 +393,11 @@ SoVertexProperty::doAction(SoAction *action) } } } +#if COIN_BUILD_LEGACY_GL_RENDERER const SbBool shouldcreatevbo = glrender ? SoGLVBOElement::shouldCreateVBO(state, this->vertex.getNum()) : FALSE; +#else + const SbBool shouldcreatevbo = FALSE; +#endif this->updateVertex(state, glrender, shouldcreatevbo); this->updateNormal(state, overrideflags, glrender, shouldcreatevbo); this->updateMaterial(state, overrideflags, glrender, shouldcreatevbo); @@ -425,6 +451,7 @@ SoVertexProperty::updateVertex(SoState * state, SbBool glrender, SbBool vbo) if (num > 0) { SoCoordinateElement::set3(state, this, num, this->vertex.getValues(0)); +#if COIN_BUILD_LEGACY_GL_RENDERER if (glrender) { if (vbo) { SbBool dirty = FALSE; @@ -447,6 +474,7 @@ SoVertexProperty::updateVertex(SoState * state, SbBool glrender, SbBool vbo) } SoGLVBOElement::setVertexVBO(state, vbo ? PRIVATE(this)->vertexvbo : NULL); } +#endif } } @@ -478,12 +506,14 @@ SoVertexProperty::updateTexCoord(SoState * state, SbBool glrender, SbBool vbo) else { for (int i = 0; i < numunits; i++) { int32_t unit = this->textureUnit[i]; +#if COIN_BUILD_LEGACY_GL_RENDERER if (glrender) { // it's important to call this _before_ setting the coordinates // on the state. SoGLMultiTextureCoordinateElement::setTexGen(state, this, unit, NULL); } +#endif if (dim == 2) { SoMultiTextureCoordinateElement::set2(state, this, unit, numperunit, tc2 + i*numperunit); @@ -493,6 +523,7 @@ SoVertexProperty::updateTexCoord(SoState * state, SbBool glrender, SbBool vbo) tc3 + i*numperunit); } +#if COIN_BUILD_LEGACY_GL_RENDERER if (glrender) { SbBool setvbo = FALSE; @@ -529,6 +560,7 @@ SoVertexProperty::updateTexCoord(SoState * state, SbBool glrender, SbBool vbo) } SoGLVBOElement::setTexCoordVBO(state, 0, setvbo ? PRIVATE(this)->texcoordvbo[i] : NULL); } +#endif } } } @@ -545,6 +577,7 @@ SoVertexProperty::updateNormal(SoState * state, uint32_t overrideflags, SbBool g if (this->isOverride()) { SoOverrideElement::setNormalVectorOverride(state, this, TRUE); } +#if COIN_BUILD_LEGACY_GL_RENDERER if (glrender) { SbBool setvbo = FALSE; if ((num == numvertex) && vbo) { @@ -569,6 +602,7 @@ SoVertexProperty::updateNormal(SoState * state, uint32_t overrideflags, SbBool g } SoGLVBOElement::setNormalVBO(state, setvbo ? PRIVATE(this)->normalvbo : NULL); } +#endif } if (this->normal.getNum() > 0 && !TEST_OVERRIDE(NORMAL_BINDING, overrideflags)) { SoNormalBindingElement::set(state, this, @@ -594,6 +628,7 @@ SoVertexProperty::updateMaterial(SoState * state, uint32_t overrideflags, SbBool if (this->isOverride()) { SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); } +#if COIN_BUILD_LEGACY_GL_RENDERER if (glrender) { SbBool setvbo = FALSE; if ((num == numvertex) && vbo) { @@ -633,6 +668,7 @@ SoVertexProperty::updateMaterial(SoState * state, uint32_t overrideflags, SbBool } SoGLVBOElement::setColorVBO(state, setvbo ? PRIVATE(this)->colorvbo : NULL); } +#endif } if (num && !TEST_OVERRIDE(MATERIAL_BINDING, overrideflags)) { SoMaterialBindingElement::set(state, this, diff --git a/src/nodes/SoWWWInline.cpp b/src/nodes/SoWWWInline.cpp index ce49df773d5..29c9517f953 100644 --- a/src/nodes/SoWWWInline.cpp +++ b/src/nodes/SoWWWInline.cpp @@ -83,6 +83,7 @@ // ************************************************************************* #include +#include #include #include @@ -96,7 +97,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -443,6 +446,7 @@ SoWWWInline::getReadAsSoFile(void) // Documented in superclass. Overridden to render children and/or // bounding box. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoWWWInline::GLRender(SoGLRenderAction * action) { @@ -507,6 +511,7 @@ SoWWWInline::GLRender(SoGLRenderAction * action) state->pop(); // restore state } +#endif // doc in super void diff --git a/src/profiler/SoNodeProfiling.h b/src/profiler/SoNodeProfiling.h index 4244c3b1c84..445f4d60f7e 100644 --- a/src/profiler/SoNodeProfiling.h +++ b/src/profiler/SoNodeProfiling.h @@ -90,9 +90,11 @@ class SoNodeProfiling { { if (!SoNodeProfiling::isActive(action)) return; +#if COIN_BUILD_LEGACY_GL_RENDERER if (action->isOfType(SoGLRenderAction::getClassTypeId()) && SoProfilerP::shouldSyncGL()) glFinish(); +#endif const SbTime duration(SbTime::getTimeOfDay() - this->pretime); diff --git a/src/profiler/SoProfiler.cpp b/src/profiler/SoProfiler.cpp index bffee64c0e5..26bb26f02a2 100644 --- a/src/profiler/SoProfiler.cpp +++ b/src/profiler/SoProfiler.cpp @@ -267,8 +267,11 @@ SoProfilerP::setActionType(SoType actiontype) profiler::console::actiontype = actiontype; \ } +#if COIN_BUILD_LEGACY_GL_RENDERER IF_ACTION(SoGLRenderAction) - else IF_ACTION(SoPickAction) + else +#endif + IF_ACTION(SoPickAction) else IF_ACTION(SoCallbackAction) else IF_ACTION(SoGetBoundingBoxAction) else IF_ACTION(SoGetMatrixAction) @@ -289,7 +292,9 @@ SoType SoProfilerP::getActionType(void) { if (profiler::console::actiontype == SoType::badType()) { +#if COIN_BUILD_LEGACY_GL_RENDERER profiler::console::actiontype = SoGLRenderAction::getClassTypeId(); +#endif } return profiler::console::actiontype; } diff --git a/src/profiler/SoProfilerStats.cpp b/src/profiler/SoProfilerStats.cpp index 79bf2abcbd3..5c1fd0f1c1d 100644 --- a/src/profiler/SoProfilerStats.cpp +++ b/src/profiler/SoProfilerStats.cpp @@ -141,8 +141,10 @@ SoProfilerStatsP::doAction(SoAction * action) clear_state = FALSE; } +#if COIN_BUILD_LEGACY_GL_RENDERER this->action_timings.put(SoGLRenderAction::getClassTypeId().getKey(), SbTime::zero()); +#endif SoState * state = action->getState(); if (state->isElementEnabled(SoCacheElement::getClassStackIndex())) { @@ -166,6 +168,7 @@ SoProfilerStatsP::doAction(SoAction * action) this->updateNodeTypeTimingMap(e); this->updateActionTimingMaps(e, action); +#if COIN_BUILD_LEGACY_GL_RENDERER if (action->isOfType(SoGLRenderAction::getClassTypeId())) { this->updateNodeTypeTimingFields(); updateActionTimingFields(e); @@ -173,6 +176,7 @@ SoProfilerStatsP::doAction(SoAction * action) clear_state = TRUE; } +#endif } // doAction void @@ -358,7 +362,7 @@ SoProfilerStats::initClass(void) { SO_NODE_INTERNAL_INIT_CLASS(SoProfilerStats, SO_FROM_COIN_3_0); - SO_ENABLE(SoGLRenderAction, SoProfilerElement); + SO_ENABLE_LEGACY_GL(SoGLRenderAction, SoProfilerElement); SO_ENABLE(SoHandleEventAction, SoProfilerElement); } @@ -404,11 +408,13 @@ SoProfilerStats::~SoProfilerStats() // ************************************************************************* // Doc from superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoProfilerStats::GLRender(SoGLRenderAction * action) { PRIVATE(this)->doAction(action); } +#endif // Doc from superclass. void diff --git a/src/profiler/SoProfilerVisualizeKit.cpp b/src/profiler/SoProfilerVisualizeKit.cpp index faf6158a4f5..69256d6e845 100644 --- a/src/profiler/SoProfilerVisualizeKit.cpp +++ b/src/profiler/SoProfilerVisualizeKit.cpp @@ -200,6 +200,7 @@ SoProfilerVisualizeKit::GLRender(SoGLRenderAcion * action) } } +#endif */ #undef PRIVATE diff --git a/src/shapenodes/SoAsciiText.cpp b/src/shapenodes/SoAsciiText.cpp index da4fca8b668..3ec1c6d3af0 100644 --- a/src/shapenodes/SoAsciiText.cpp +++ b/src/shapenodes/SoAsciiText.cpp @@ -138,6 +138,7 @@ // ************************************************************************* #include +#include #include "coindefs.h" #include @@ -154,7 +155,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -316,6 +319,7 @@ SoAsciiText::initClass(void) } // Doc in parent. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoAsciiText::GLRender(SoGLRenderAction * action) { @@ -466,6 +470,7 @@ SoAsciiText::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::incNumShapes(state); } } +#endif // Doc in parent. void diff --git a/src/shapenodes/SoCone.cpp b/src/shapenodes/SoCone.cpp index 21070427baf..efd9f64e6d0 100644 --- a/src/shapenodes/SoCone.cpp +++ b/src/shapenodes/SoCone.cpp @@ -74,6 +74,7 @@ */ #include +#include #include "coindefs.h" #include @@ -88,7 +89,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -204,6 +207,7 @@ SoCone::computeBBox(SoAction * COIN_UNUSED_ARG(action), SbBox3f & box, SbVec3f & } // Doc from parent. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoCone::GLRender(SoGLRenderAction * action) { @@ -253,6 +257,7 @@ SoCone::GLRender(SoGLRenderAction * action) SoDebugError::postInfo("SoCone::GLRender", "end"); #endif // debug } +#endif /*! Add a \a part to the cone. diff --git a/src/shapenodes/SoCube.cpp b/src/shapenodes/SoCube.cpp index 4fe8ece1500..9d685c6ec30 100644 --- a/src/shapenodes/SoCube.cpp +++ b/src/shapenodes/SoCube.cpp @@ -67,6 +67,7 @@ */ #include +#include #include "coindefs.h" #include @@ -77,7 +78,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -134,6 +137,7 @@ SoCube::initClass(void) } // Doc in parent. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoCube::GLRender(SoGLRenderAction * action) { @@ -186,6 +190,7 @@ SoCube::GLRender(SoGLRenderAction * action) &mb, flags, state); } +#endif // Doc in parent. void diff --git a/src/shapenodes/SoCylinder.cpp b/src/shapenodes/SoCylinder.cpp index d5028bc6597..29227154380 100644 --- a/src/shapenodes/SoCylinder.cpp +++ b/src/shapenodes/SoCylinder.cpp @@ -91,6 +91,7 @@ */ #include +#include #include "coindefs.h" #include @@ -108,7 +109,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -234,6 +237,7 @@ SoCylinder::computeBBox(SoAction * COIN_UNUSED_ARG(action), SbBox3f & box, SbVec } // Doc in parent. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoCylinder::GLRender(SoGLRenderAction * action) { @@ -278,6 +282,7 @@ SoCylinder::GLRender(SoGLRenderAction * action) &mb, flags, state); } +#endif /*! Add a \a part to the cylinder. diff --git a/src/shapenodes/SoFaceSet.cpp b/src/shapenodes/SoFaceSet.cpp index ef1f1143dd3..66e71666532 100644 --- a/src/shapenodes/SoFaceSet.cpp +++ b/src/shapenodes/SoFaceSet.cpp @@ -66,6 +66,10 @@ */ #include + +class SoVBO; +#include +#include #include "coindefs.h" #ifdef HAVE_CONFIG_H @@ -76,7 +80,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -94,15 +100,21 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #ifdef COIN_THREADSAFE #include #endif // COIN_THREADSAFE #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif #include "rendering/SoGL.h" // ************************************************************************* @@ -282,6 +294,8 @@ SoFaceSet::findNormalBinding(SoState * const state) const return binding; } +#if COIN_BUILD_LEGACY_GL_RENDERER + namespace { namespace SoGL { namespace FaceSet { enum AttributeBinding { @@ -404,6 +418,8 @@ namespace { namespace SoGL { namespace FaceSet { } } } // namespace +#endif + /*! \copydetails SoNode::initClass(void) */ @@ -459,6 +475,7 @@ SoFaceSet::initClass(void) SOGL_FACESET_GLRENDER_RESOLVE_ARG1(normalbinding, materialbinding, texturing, args) +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoFaceSet::GLRender(SoGLRenderAction * action) @@ -652,6 +669,7 @@ SoFaceSet::GLRender(SoGLRenderAction * action) sogl_autocache_update(state, numv ? (this->numVertices[0]-2)*numv : 0, didusevbo); } +#endif #undef SOGL_FACESET_GLRENDER_CALL_FUNC #undef SOGL_FACESET_GLRENDER_RESOLVE_ARG3 @@ -926,6 +944,7 @@ SoFaceSet::notify(SoNotList * l) // internal method which checks if convex cache needs to be // used or (re)created. Renders the shape if convex cache needs to be used. // +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoFaceSet::useConvexCache(SoAction * action) { @@ -1122,6 +1141,7 @@ SoFaceSet::useConvexCache(SoAction * action) return TRUE; } +#endif #undef PRIVATE #undef STATUS_UNKNOWN diff --git a/src/shapenodes/SoImage.cpp b/src/shapenodes/SoImage.cpp index 94c9510d987..89c16b3529c 100644 --- a/src/shapenodes/SoImage.cpp +++ b/src/shapenodes/SoImage.cpp @@ -146,6 +146,7 @@ */ #include +#include #ifdef HAVE_CONFIG_H #include @@ -163,7 +164,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -328,6 +331,7 @@ SoImage::computeBBox(SoAction * action, } // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoImage::GLRender(SoGLRenderAction * action) { @@ -524,7 +528,9 @@ SoImage::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::shouldAutoCache(action->getState(), SoGLCacheContextElement::DONT_AUTO_CACHE); } +#endif + // doc from parent // doc from parent void SoImage::rayPick(SoRayPickAction * action) diff --git a/src/shapenodes/SoIndexedFaceSet.cpp b/src/shapenodes/SoIndexedFaceSet.cpp index ce2d62df779..9d4e1daa9a8 100644 --- a/src/shapenodes/SoIndexedFaceSet.cpp +++ b/src/shapenodes/SoIndexedFaceSet.cpp @@ -182,6 +182,9 @@ #include +class SoVBO; +#include + #include #ifdef HAVE_CONFIG_H @@ -202,8 +205,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -224,10 +231,17 @@ #include #include "nodes/SoSubNodeP.h" + +#include "coindefs.h" +class SoVertexArrayIndexer; #include "tidbitsp.h" #include "threads/threadsutilp.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVertexArrayIndexer.h" +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif #include "rendering/SoGL.h" // ************************************************************************* @@ -310,7 +324,9 @@ SoIndexedFaceSet::SoIndexedFaceSet() */ SoIndexedFaceSet::~SoIndexedFaceSet() { +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->vaindexer; +#endif if (PRIVATE(this)->convexCache) PRIVATE(this)->convexCache->unref(); delete PRIVATE(this); } @@ -413,13 +429,16 @@ SoIndexedFaceSet::notify(SoNotList * list) if (f == &this->coordIndex) { PRIVATE(this)->concavestatus = STATUS_UNKNOWN; LOCK_VAINDEXER(this); +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->vaindexer; +#endif PRIVATE(this)->vaindexer = NULL; UNLOCK_VAINDEXER(this); } inherited::notify(list); } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoIndexedFaceSet::GLRender(SoGLRenderAction * action) @@ -661,6 +680,7 @@ SoIndexedFaceSet::GLRender(SoGLRenderAction * action) // send approx number of triangles for autocache handling sogl_autocache_update(state, this->coordIndex.getNum() / 4, didrenderasvbo); } +#endif // this macro actually makes the code below more readable :-) #define DO_VERTEX(idx) \ @@ -778,6 +798,7 @@ SoIndexedFaceSet::generatePrimitives(SoAction *action) } SbBool convexcacheused = FALSE; +#if COIN_BUILD_LEGACY_GL_RENDERER if (this->useConvexCache(action, normals, nindices, normalCacheUsed)) { cindices = PRIVATE(this)->convexCache->getCoordIndices(); numindices = PRIVATE(this)->convexCache->getNumCoordIndices(); @@ -793,6 +814,7 @@ SoIndexedFaceSet::generatePrimitives(SoAction *action) if (tbind != NONE) tbind = PER_VERTEX_INDEXED; convexcacheused = TRUE; } +#endif int texidx = 0; TriangleShape mode = POLYGON; @@ -950,6 +972,7 @@ SoIndexedFaceSet::getPrimitiveCount(SoGetPrimitiveCountAction *action) // used or (re)created. Returns TRUE if convex cache must be // used. this->convexCache is then guaranteed to be != NULL. // +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoIndexedFaceSet::useConvexCache(SoAction * action, const SbVec3f * COIN_UNUSED_ARG(normals), @@ -1077,6 +1100,7 @@ SoIndexedFaceSet::useConvexCache(SoAction * action, return TRUE; } +#endif // Documented in superclass. SbBool diff --git a/src/shapenodes/SoIndexedLineSet.cpp b/src/shapenodes/SoIndexedLineSet.cpp index 07007afd3ad..80f0027d3d3 100644 --- a/src/shapenodes/SoIndexedLineSet.cpp +++ b/src/shapenodes/SoIndexedLineSet.cpp @@ -61,6 +61,10 @@ #include +class SoVBO; +#include +#include + #include #ifdef HAVE_CONFIG_H @@ -78,13 +82,21 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -97,9 +109,16 @@ #endif // COIN_DEBUG #include "nodes/SoSubNodeP.h" + +#include "coindefs.h" +class SoVertexArrayIndexer; #include "rendering/SoGL.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVertexArrayIndexer.h" +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif SO_NODE_SOURCE(SoIndexedLineSet); @@ -130,7 +149,9 @@ SoIndexedLineSet::SoIndexedLineSet() */ SoIndexedLineSet::~SoIndexedLineSet() { +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->vaindexer; +#endif delete PRIVATE(this); } @@ -229,6 +250,7 @@ SoIndexedLineSet::findNormalBinding(SoState* state) } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoIndexedLineSet::GLRender(SoGLRenderAction * action) @@ -413,6 +435,7 @@ SoIndexedLineSet::GLRender(SoGLRenderAction * action) // send approx number of lines for autocache handling sogl_autocache_update(state, this->coordIndex.getNum() / 2, didrenderasvbo); } +#endif // Documented in superclass. SbBool @@ -781,7 +804,9 @@ SoIndexedLineSet::notify(SoNotList * list) SoField *f = list->getLastField(); if (f == &this->coordIndex) { LOCK_VAINDEXER(this); +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->vaindexer; +#endif PRIVATE(this)->vaindexer = NULL; UNLOCK_VAINDEXER(this); } diff --git a/src/shapenodes/SoIndexedMarkerSet.cpp b/src/shapenodes/SoIndexedMarkerSet.cpp index a439c522e1f..f9e3dc50f58 100644 --- a/src/shapenodes/SoIndexedMarkerSet.cpp +++ b/src/shapenodes/SoIndexedMarkerSet.cpp @@ -86,6 +86,8 @@ */ #include +#include +#include #ifdef HAVE_CONFIG_H #include @@ -96,7 +98,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -104,8 +108,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -147,6 +155,7 @@ SoIndexedMarkerSet::initClass(void) } // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoIndexedMarkerSet::GLRender(SoGLRenderAction * action) { @@ -160,6 +169,7 @@ SoIndexedMarkerSet::GLRender(SoGLRenderAction * action) this->vertexProperty.getValue()->GLRender(action); } + // send approx number of points for autocache handling. Divide if (!this->shouldGLRender(action)){ state->pop(); return; @@ -320,3 +330,4 @@ SoIndexedMarkerSet::GLRender(SoGLRenderAction * action) // by three so that three points is the same as one triangle. sogl_autocache_update(state, numindices/3, FALSE); } +#endif diff --git a/src/shapenodes/SoIndexedNurbsCurve.cpp b/src/shapenodes/SoIndexedNurbsCurve.cpp index 691a683a812..7f45418732f 100644 --- a/src/shapenodes/SoIndexedNurbsCurve.cpp +++ b/src/shapenodes/SoIndexedNurbsCurve.cpp @@ -55,19 +55,24 @@ // book on NURBS. 20011220 mortene. #include +#include #ifdef HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -205,6 +210,7 @@ SoIndexedNurbsCurve::computeBBox(SoAction * action, } // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoIndexedNurbsCurve::GLRender(SoGLRenderAction * action) { @@ -235,7 +241,9 @@ SoIndexedNurbsCurve::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::incNumShapes(state); } } +#endif + // doc from parent // doc from parent void SoIndexedNurbsCurve::rayPick(SoRayPickAction * action) diff --git a/src/shapenodes/SoIndexedNurbsSurface.cpp b/src/shapenodes/SoIndexedNurbsSurface.cpp index 653366e5288..532bd4a0cc7 100644 --- a/src/shapenodes/SoIndexedNurbsSurface.cpp +++ b/src/shapenodes/SoIndexedNurbsSurface.cpp @@ -68,7 +68,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -240,6 +242,7 @@ SoIndexedNurbsSurface::computeBBox(SoAction * action, } // Doc in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoIndexedNurbsSurface::GLRender(SoGLRenderAction * action) { @@ -266,7 +269,9 @@ SoIndexedNurbsSurface::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::incNumShapes(state); } } +#endif + // Doc in superclass. // Doc in superclass. void SoIndexedNurbsSurface::rayPick(SoRayPickAction * action) diff --git a/src/shapenodes/SoIndexedPointSet.cpp b/src/shapenodes/SoIndexedPointSet.cpp index 6befbd0833f..1a309a8f65d 100644 --- a/src/shapenodes/SoIndexedPointSet.cpp +++ b/src/shapenodes/SoIndexedPointSet.cpp @@ -93,6 +93,10 @@ #include +class SoVBO; +#include +#include + #ifdef HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H @@ -104,13 +108,19 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -119,9 +129,16 @@ #endif // COIN_DEBUG #include "nodes/SoSubNodeP.h" + +#include "coindefs.h" +class SoVertexArrayIndexer; #include "rendering/SoGL.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVertexArrayIndexer.h" +#endif #define LOCK_VAINDEXER(obj) SoBase::staticDataLock() #define UNLOCK_VAINDEXER(obj) SoBase::staticDataUnlock() @@ -142,7 +159,9 @@ SoIndexedPointSet::SoIndexedPointSet() */ SoIndexedPointSet::~SoIndexedPointSet() { +#if COIN_BUILD_LEGACY_GL_RENDERER delete this->vaindexer; +#endif } /*! @@ -225,6 +244,7 @@ SoIndexedPointSet::findTextureBinding(SoState * const state) const return binding; } +#if COIN_BUILD_LEGACY_GL_RENDERER // doc from parent void SoIndexedPointSet::GLRender(SoGLRenderAction * action) @@ -413,6 +433,7 @@ SoIndexedPointSet::GLRender(SoGLRenderAction * action) // by three so that three points is the same as one triangle. sogl_autocache_update(state, numindices/3, didrenderasvbo); } +#endif // Documented in superclass. SbBool @@ -580,7 +601,9 @@ SoIndexedPointSet::notify(SoNotList * list) SoField * f = list->getLastField(); if (f == &this->coordIndex) { LOCK_VAINDEXER(this); +#if COIN_BUILD_LEGACY_GL_RENDERER delete this->vaindexer; +#endif this->vaindexer = NULL; UNLOCK_VAINDEXER(this); } diff --git a/src/shapenodes/SoIndexedTriangleStripSet.cpp b/src/shapenodes/SoIndexedTriangleStripSet.cpp index b0d2e9fe203..bbe16833aed 100644 --- a/src/shapenodes/SoIndexedTriangleStripSet.cpp +++ b/src/shapenodes/SoIndexedTriangleStripSet.cpp @@ -82,6 +82,7 @@ */ #include +#include #include @@ -102,7 +103,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -221,6 +224,7 @@ SoIndexedTriangleStripSet::findNormalBinding(SoState * const state) const } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoIndexedTriangleStripSet::GLRender(SoGLRenderAction * action) { @@ -332,6 +336,7 @@ SoIndexedTriangleStripSet::GLRender(SoGLRenderAction * action) // send approx number of triangles for autocache handling sogl_autocache_update(state, this->coordIndex.getNum() / 2, FALSE); } +#endif // Documented in superclass. SbBool diff --git a/src/shapenodes/SoLineSet.cpp b/src/shapenodes/SoLineSet.cpp index 829879b05e9..5e69b09997a 100644 --- a/src/shapenodes/SoLineSet.cpp +++ b/src/shapenodes/SoLineSet.cpp @@ -82,6 +82,7 @@ */ #include +#include #ifdef HAVE_CONFIG_H #include @@ -96,7 +97,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -222,6 +225,8 @@ SoLineSet::findNormalBinding(SoState * const state) const return binding; } +#if COIN_BUILD_LEGACY_GL_RENDERER + namespace { namespace SoGL { namespace LineSet { enum AttributeBinding { @@ -370,6 +375,8 @@ namespace { namespace SoGL { namespace LineSet { } } } // namespace +#endif + /*! \copydetails SoNode::initClass(void) */ @@ -431,6 +438,7 @@ SoLineSet::initClass(void) SOGL_LINESET_GLRENDER_RESOLVE_ARG1(normalbinding, materialbinding, texturing, args) // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoLineSet::GLRender(SoGLRenderAction * action) { @@ -513,6 +521,7 @@ SoLineSet::GLRender(SoGLRenderAction * action) sogl_autocache_update(state, numv ? (this->numVertices[0]-1)*numv : 0, FALSE); } +#endif #undef SOGL_LINESET_GLRENDER_CALL_FUNC #undef SOGL_LINESET_GLRENDER_RESOLVE_ARG3 diff --git a/src/shapenodes/SoMarkerSet.cpp b/src/shapenodes/SoMarkerSet.cpp index 1cf8d915ee2..8606148cb5a 100644 --- a/src/shapenodes/SoMarkerSet.cpp +++ b/src/shapenodes/SoMarkerSet.cpp @@ -67,6 +67,7 @@ // FIXME: change standard markers to use GL_UNPACK_ALIGNMENT 1, instead of 4, as it is now... skei 200009005 #include +#include #include #include @@ -80,7 +81,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -1133,6 +1136,7 @@ convert_bitmaps(void) } // doc in super +#if COIN_BUILD_LEGACY_GL_RENDERER void SoMarkerSet::GLRender(SoGLRenderAction * action) { @@ -1276,6 +1280,7 @@ SoMarkerSet::GLRender(SoGLRenderAction * action) state->pop(); // we pushed, remember } +#endif // ---------------------------------------------------------------------------------------------------- diff --git a/src/shapenodes/SoNurbsCurve.cpp b/src/shapenodes/SoNurbsCurve.cpp index d4ff5aae78d..0e58e9d5e54 100644 --- a/src/shapenodes/SoNurbsCurve.cpp +++ b/src/shapenodes/SoNurbsCurve.cpp @@ -98,13 +98,16 @@ */ #include +#include #ifdef HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -113,7 +116,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -208,6 +213,7 @@ SoNurbsCurve::initClass(void) } // Doc from parent class. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoNurbsCurve::GLRender(SoGLRenderAction * action) { @@ -238,6 +244,7 @@ SoNurbsCurve::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::DO_AUTO_CACHE); } } +#endif /*! Calculates the bounding box of all control points, and sets the diff --git a/src/shapenodes/SoNurbsSurface.cpp b/src/shapenodes/SoNurbsSurface.cpp index e89e7fee5e9..57bcbdfecab 100644 --- a/src/shapenodes/SoNurbsSurface.cpp +++ b/src/shapenodes/SoNurbsSurface.cpp @@ -112,7 +112,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -233,6 +235,7 @@ SoNurbsSurface::initClass(void) } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoNurbsSurface::GLRender(SoGLRenderAction * action) { @@ -258,6 +261,7 @@ SoNurbsSurface::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::DO_AUTO_CACHE); } } +#endif /*! Calculates the bounding box of all control points, and sets the center to diff --git a/src/shapenodes/SoPointSet.cpp b/src/shapenodes/SoPointSet.cpp index 2577f50691e..fa05ef47630 100644 --- a/src/shapenodes/SoPointSet.cpp +++ b/src/shapenodes/SoPointSet.cpp @@ -83,6 +83,10 @@ #include +class SoVBO; +#include +#include + #ifdef HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H @@ -94,12 +98,18 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -108,8 +118,11 @@ #endif // COIN_DEBUG #include "nodes/SoSubNodeP.h" +#include "coindefs.h" #include "rendering/SoGL.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif /*! \var SoSFInt32 SoPointSet::numPoints @@ -196,6 +209,7 @@ SoPointSet::findNormalBinding(SoState * const state) const } // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoPointSet::GLRender(SoGLRenderAction * action) { @@ -298,6 +312,7 @@ SoPointSet::GLRender(SoGLRenderAction * action) sogl_autocache_update(state, numpts/3, didrenderasvbo); } +#endif // Documented in superclass. SbBool diff --git a/src/shapenodes/SoQuadMesh.cpp b/src/shapenodes/SoQuadMesh.cpp index dfc8bef6dd4..f990e56db5e 100644 --- a/src/shapenodes/SoQuadMesh.cpp +++ b/src/shapenodes/SoQuadMesh.cpp @@ -164,6 +164,8 @@ */ #include +#include +#include #include // ilogb #include // _logb @@ -181,8 +183,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -346,6 +352,8 @@ static SbBool qmeshNormalize(SbVec3f & v, float toLength2) return FALSE; } +#if COIN_BUILD_LEGACY_GL_RENDERER + namespace { namespace SoGL { namespace QuadMesh { #define IDX(r,c) ((r)*rowsize+(c)) @@ -783,6 +791,8 @@ namespace { namespace SoGL { namespace QuadMesh { } } } // namespace +#endif + /*! \copydetails SoNode::initClass(void) */ @@ -849,6 +859,7 @@ SoQuadMesh::initClass(void) SOGL_QUADMESH_GLRENDER_RESOLVE_ARG1(normalbinding, materialbinding, texturing, args) // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoQuadMesh::GLRender(SoGLRenderAction * action) { @@ -980,7 +991,9 @@ SoQuadMesh::GLRender(SoGLRenderAction * action) if (didpush) state->pop(); } +#endif + #undef SOGL_QUADMESH_GLRENDER_CALL_FUNC #undef SOGL_QUADMESH_GLRENDER_CALL_FUNC #undef SOGL_QUADMESH_GLRENDER_RESOLVE_ARG3 #undef SOGL_QUADMESH_GLRENDER_RESOLVE_ARG2 diff --git a/src/shapenodes/SoShape.cpp b/src/shapenodes/SoShape.cpp index 963348437f7..5014d03a1c5 100644 --- a/src/shapenodes/SoShape.cpp +++ b/src/shapenodes/SoShape.cpp @@ -45,6 +45,11 @@ #include +class SoVBO; +#include +#include +#include + #include #include @@ -61,14 +66,20 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -77,12 +88,24 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -98,7 +121,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -119,15 +144,19 @@ #include "glue/glp.h" #include "threads/threadsutilp.h" #include "tidbitsp.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif #include "coindefs.h" // COIN_OBSOLETED() // SoShape.cpp grew too big, so I had to move some code into new // files. pederb, 2001-07-18 #include "soshape_primdata.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "soshape_trianglesort.h" #include "soshape_bigtexture.h" #include "soshape_bumprender.h" +#endif // ************************************************************************* @@ -174,15 +203,23 @@ class SoShapeP { public: SoShapeP() { this->bboxcache = NULL; +#if COIN_BUILD_LEGACY_GL_RENDERER this->pvcache = NULL; +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER this->bumprender = NULL; +#endif this->rendercnt = 0; this->flags = 0; } ~SoShapeP() { if (this->bboxcache) { this->bboxcache->unref(); } +#if COIN_BUILD_LEGACY_GL_RENDERER if (this->pvcache) { this->pvcache->unref(); } +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER delete this->bumprender; +#endif } enum { RENDERCNT_BITS = 4, // bits needed to store rendercnt @@ -197,8 +234,12 @@ class SoShapeP { static void calibrateBBoxCache(void); static double bboxcachetimelimit; SoBoundingBoxCache * bboxcache; +#if COIN_BUILD_LEGACY_GL_RENDERER SoPrimitiveVertexCache * pvcache; +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER soshape_bumprender * bumprender; +#endif uint32_t flags : FLAG_BITS; // stores the number of frames rendered with no node changes uint32_t rendercnt : RENDERCNT_BITS; @@ -220,7 +261,11 @@ class SoShapeP { if (this->flags & SoShapeP::NEED_SETUP_SHAPE_HINTS) { SbBool ccw = ((SoSFBool*)(shape->getField("ccw")))->getValue(); SbBool solid = ((SoSFBool*)(shape->getField("solid")))->getValue(); +#if COIN_BUILD_LEGACY_GL_RENDERER SoGLShapeHintsElement::forceSend(state, ccw, solid, !solid); +#else + (void)state; +#endif } #endif // HAVE_VRML97 } @@ -269,17 +314,22 @@ enum SoShapeRenderMode { typedef struct { soshape_primdata * primdata; +#if COIN_BUILD_LEGACY_GL_RENDERER SbList * bigtexturelist; SbList * bigtexturecontext; soshape_trianglesort * trianglesort; soshape_bigtexture * currentbigtexture; +#endif // used in generatePrimitives() callbacks to set correct material SoMaterialBundle * currentbundle; +#if COIN_BUILD_LEGACY_GL_RENDERER int rendermode; +#endif } soshape_staticdata; +#if COIN_BUILD_LEGACY_GL_RENDERER static soshape_bigtexture * soshape_get_bigtexture(soshape_staticdata * data, uint32_t context) { @@ -293,30 +343,37 @@ soshape_get_bigtexture(soshape_staticdata * data, uint32_t context) data->bigtexturecontext->append(context); return newtex; } +#endif static void soshape_construct_staticdata(void * closure) { soshape_staticdata * data = (soshape_staticdata*) closure; +#if COIN_BUILD_LEGACY_GL_RENDERER data->bigtexturelist = new SbList ; data->bigtexturecontext = new SbList ; - data->primdata = new soshape_primdata(); data->trianglesort = new soshape_trianglesort(); data->rendermode = NORMAL; +#endif + data->primdata = new soshape_primdata(); } static void soshape_destruct_staticdata(void * closure) { soshape_staticdata * data = (soshape_staticdata*) closure; +#if COIN_BUILD_LEGACY_GL_RENDERER for (int i = 0; i < data->bigtexturelist->getLength(); i++) { delete (*(data->bigtexturelist))[i]; } delete data->bigtexturelist; delete data->bigtexturecontext; +#endif delete data->primdata; +#if COIN_BUILD_LEGACY_GL_RENDERER delete data->trianglesort; +#endif } static SbStorage * soshape_staticstorage; @@ -396,6 +453,7 @@ SoShape::getBoundingBox(SoGetBoundingBoxAction * action) } // Doc in parent. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoShape::GLRender(SoGLRenderAction * action) { @@ -425,6 +483,7 @@ SoShape::GLRender(SoGLRenderAction * action) if (vp) action->getState()->pop(); } +#endif // Doc in parent. void @@ -553,6 +612,7 @@ SoShape::getComplexityValue(SoAction * action) } } +#if COIN_BUILD_LEGACY_GL_RENDERER /*! \COININTERNAL */ @@ -823,6 +883,7 @@ SoShape::shouldGLRender(SoGLRenderAction * action) return TRUE; // let the shape node render the geometry using OpenGL #endif // ! generatePrimitives() rendering } +#endif /*! \COININTERNAL @@ -847,9 +908,10 @@ SoShape::shouldRayPick(SoRayPickAction * const action) } } +#if COIN_BUILD_LEGACY_GL_RENDERER /*! \COININTERNAL -*/ + */ void SoShape::beginSolidShape(SoGLRenderAction * action) { @@ -870,6 +932,7 @@ SoShape::endSolidShape(SoGLRenderAction * action) { action->getState()->pop(); } +#endif /*! \COININTERNAL @@ -1053,6 +1116,7 @@ SoShape::invokeTriangleCallbacks(SoAction * const action, SoGetPrimitiveCountAction * ga = (SoGetPrimitiveCountAction *) action; ga->incNumTriangles(); } +#if COIN_BUILD_LEGACY_GL_RENDERER else if (action->getTypeId().isDerivedFrom(SoGLRenderAction::getClassTypeId())) { soshape_staticdata * shapedata = soshape_get_staticdata(); @@ -1092,6 +1156,7 @@ SoShape::invokeTriangleCallbacks(SoAction * const action, break; } } +#endif } /*! @@ -1146,6 +1211,7 @@ SoShape::invokeLineSegmentCallbacks(SoAction * const action, SoGetPrimitiveCountAction * ga = (SoGetPrimitiveCountAction *) action; ga->incNumLines(); } +#if COIN_BUILD_LEGACY_GL_RENDERER else if (action->getTypeId().isDerivedFrom(SoGLRenderAction::getClassTypeId())) { soshape_staticdata * shapedata = soshape_get_staticdata(); switch (shapedata->rendermode) { @@ -1167,6 +1233,7 @@ SoShape::invokeLineSegmentCallbacks(SoAction * const action, break; } } +#endif } /*! @@ -1200,6 +1267,7 @@ SoShape::invokePointCallbacks(SoAction * const action, SoGetPrimitiveCountAction * ga = (SoGetPrimitiveCountAction *) action; ga->incNumPoints(); } +#if COIN_BUILD_LEGACY_GL_RENDERER else if (action->getTypeId().isDerivedFrom(SoGLRenderAction::getClassTypeId())) { soshape_staticdata * shapedata = soshape_get_staticdata(); @@ -1217,6 +1285,7 @@ SoShape::invokePointCallbacks(SoAction * const action, break; } } +#endif } /*! @@ -1370,6 +1439,7 @@ SoShape::getDecimatedComplexity(SoState * COIN_UNUSED_ARG(state), float complexi /*! Render a bounding box. */ +#if COIN_BUILD_LEGACY_GL_RENDERER void SoShape::GLRenderBoundingBox(SoGLRenderAction * action) { @@ -1392,6 +1462,7 @@ SoShape::GLRenderBoundingBox(SoGLRenderAction * action) SOGL_NEED_NORMALS | SOGL_NEED_TEXCOORDS, NULL); glPopMatrix(); } +#endif /*! \COININTERNAL @@ -1430,9 +1501,11 @@ SoShape::notify(SoNotList * nl) if (PRIVATE(this)->bboxcache) { PRIVATE(this)->bboxcache->invalidate(); } +#if COIN_BUILD_LEGACY_GL_RENDERER if (PRIVATE(this)->pvcache) { PRIVATE(this)->pvcache->invalidate(); } +#endif PRIVATE(this)->flags &= ~SoShapeP::SHOULD_BBOX_CACHE; PRIVATE(this)->rendercnt = 0; PRIVATE(this)->unlock(); @@ -1559,6 +1632,7 @@ SoShapeP::calibrateBBoxCache(void) \sa finishVertexArray() \since Coin 3.0 */ +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoShape::startVertexArray(SoGLRenderAction * action, const SoCoordinateElement * coords, @@ -1705,8 +1779,8 @@ void SoShape::finishVertexArray(SoGLRenderAction * action, const SbBool vbo, const SbBool normpervertex, - const SbBool texpervertex, - const SbBool colorpervertex) + const SbBool texpervertex, + const SbBool colorpervertex) { SoState * state = action->getState(); const cc_glglue * glue = sogl_glue_instance(state); @@ -1755,7 +1829,9 @@ SoShape::finishVertexArray(SoGLRenderAction * action, SoGLVertexAttributeElement::getInstance(state)->disableVBO(action); } +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER void SoShape::validatePVCache(SoGLRenderAction * action) { @@ -1791,6 +1867,7 @@ SoShape::validatePVCache(SoGLRenderAction * action) PRIVATE(this)->testSetupShapeHints(this); } } +#endif #undef PRIVATE diff --git a/src/shapenodes/SoSphere.cpp b/src/shapenodes/SoSphere.cpp index 39e4fcdf9b5..d661b58f21f 100644 --- a/src/shapenodes/SoSphere.cpp +++ b/src/shapenodes/SoSphere.cpp @@ -79,6 +79,7 @@ */ #include +#include #include "coindefs.h" #include @@ -87,7 +88,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include @@ -136,6 +139,7 @@ SoSphere::initClass(void) } // Documented in superclass. +#if COIN_BUILD_LEGACY_GL_RENDERER void SoSphere::GLRender(SoGLRenderAction * action) { @@ -172,6 +176,7 @@ SoSphere::GLRender(SoGLRenderAction * action) &mb, flags, state); } +#endif // Documented in superclass. void diff --git a/src/shapenodes/SoText2.cpp b/src/shapenodes/SoText2.cpp index 1e319f85d29..b50057f933e 100644 --- a/src/shapenodes/SoText2.cpp +++ b/src/shapenodes/SoText2.cpp @@ -133,7 +133,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #ifdef COIN_THREADSAFE #include @@ -330,6 +332,7 @@ SoText2::initClass(void) // ************************************************************************** // doc in super +#if COIN_BUILD_LEGACY_GL_RENDERER void SoText2::GLRender(SoGLRenderAction * action) { @@ -566,7 +569,9 @@ SoText2::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::shouldAutoCache(action->getState(), SoGLCacheContextElement::DONT_AUTO_CACHE); } +#endif + // ************************************************************************** // ************************************************************************** // doc in super @@ -972,6 +977,12 @@ SoText2P::computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center) void SoText2P::setRasterPos3f(GLfloat x, GLfloat y, GLfloat z) { +#if !COIN_BUILD_LEGACY_GL_RENDERER + (void) x; + (void) y; + (void) z; + return; +#else float rpx = x >= 0 ? x : 0; int offvp = x < 0 ? 1 : 0; float offsetx = x >= 0 ? 0 : x; @@ -982,6 +993,7 @@ SoText2P::setRasterPos3f(GLfloat x, GLfloat y, GLfloat z) glRasterPos3f(rpx,rpy,z); if (offvp) { glBitmap(0, 0, 0, 0,offsetx,offsety, NULL); } +#endif } #undef PRIVATE diff --git a/src/shapenodes/SoText3.cpp b/src/shapenodes/SoText3.cpp index 7cf2ec6139b..a06e9cf7c1e 100644 --- a/src/shapenodes/SoText3.cpp +++ b/src/shapenodes/SoText3.cpp @@ -127,6 +127,8 @@ // ************************************************************************* #include +#include +#include #include #include // FLT_MAX, FLT_MIN @@ -142,14 +144,18 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -476,6 +482,7 @@ SoText3::getCharacterBounds(SoState * COIN_UNUSED_ARG(state), int COIN_UNUSED_AR } // doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoText3::GLRender(SoGLRenderAction * action) { @@ -539,6 +546,7 @@ SoText3::GLRender(SoGLRenderAction * action) } PRIVATE(this)->unlock(); } +#endif // doc in parent void @@ -597,6 +605,12 @@ void SoText3P::render(SoState * state, const cc_font_specification * fontspec, unsigned int part) { +#if !COIN_BUILD_LEGACY_GL_RENDERER + (void) state; + (void) fontspec; + (void) part; + return; +#else int i, n = this->widths.getLength(); int firstprofile = -1; @@ -981,6 +995,7 @@ SoText3P::render(SoState * state, const cc_font_specification * fontspec, } ypos -= fontspec->size * PUBLIC(this)->spacing.getValue(); } +#endif } // render text geometry diff --git a/src/shapenodes/SoTriangleStripSet.cpp b/src/shapenodes/SoTriangleStripSet.cpp index 0a5b43b6ee0..930db18d5c1 100644 --- a/src/shapenodes/SoTriangleStripSet.cpp +++ b/src/shapenodes/SoTriangleStripSet.cpp @@ -111,6 +111,8 @@ */ #include +#include +#include #include "coindefs.h" #ifdef HAVE_CONFIG_H @@ -123,8 +125,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -252,6 +258,8 @@ SoTriangleStripSet::findNormalBinding(SoState * const state) const return binding; } +#if COIN_BUILD_LEGACY_GL_RENDERER + namespace { namespace SoGL { namespace TriStripSet { enum AttributeBinding { @@ -378,6 +386,8 @@ namespace { namespace SoGL { namespace TriStripSet { } } } // namespace +#endif + /*! \copydetails SoEngine::initClass(void) */ @@ -439,6 +449,7 @@ SoTriangleStripSet::initClass(void) SOGL_TRISTRIPSET_GLRENDER_RESOLVE_ARG1(normalbinding, materialbinding, texturing, args) // doc from parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoTriangleStripSet::GLRender(SoGLRenderAction * action) { @@ -527,7 +538,9 @@ SoTriangleStripSet::GLRender(SoGLRenderAction * action) sogl_autocache_update(state, numv ? (this->numVertices[0]-2)*numv : 0, FALSE); } +#endif + #undef SOGL_TRISTRIPSET_GLRENDER_CALL_FUNC #undef SOGL_TRISTRIPSET_GLRENDER_CALL_FUNC #undef SOGL_TRISTRIPSET_GLRENDER_RESOLVE_ARG1 #undef SOGL_TRISTRIPSET_GLRENDER_RESOLVE_ARG2 diff --git a/src/shapenodes/SoVertexShape.cpp b/src/shapenodes/SoVertexShape.cpp index 49cffa21607..b59b271de4a 100644 --- a/src/shapenodes/SoVertexShape.cpp +++ b/src/shapenodes/SoVertexShape.cpp @@ -51,7 +51,9 @@ #include #endif // HAVE_CONFIG_H +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -220,11 +222,13 @@ SoVertexShape::generateDefaultNormals(SoState * /* state */, } // doc from superclass +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoVertexShape::shouldGLRender(SoGLRenderAction * action) { return SoShape::shouldGLRender(action); } +#endif /*! Sets normal cache to contain the normals specified by \a normals and \a num, diff --git a/src/shapenodes/soshape_bigtexture.cpp b/src/shapenodes/soshape_bigtexture.cpp index 6b2c768a44c..c433a813a58 100644 --- a/src/shapenodes/soshape_bigtexture.cpp +++ b/src/shapenodes/soshape_bigtexture.cpp @@ -146,6 +146,12 @@ soshape_bigtexture::endShape(SoState * state, SoShape * shape, SoMaterialBundle & mb) { +#if !COIN_BUILD_LEGACY_GL_RENDERER + (void) state; + (void) shape; + (void) mb; + return TRUE; +#else this->clip_triangles(state); // clear texture matrix. We've already calculated the world space @@ -208,6 +214,7 @@ soshape_bigtexture::endShape(SoState * state, // return TRUE if all textures were created in the correct resolution return ! this->image->exceededChangeLimit(); +#endif } void diff --git a/src/vrml97/Appearance.cpp b/src/vrml97/Appearance.cpp index 47541b39de8..0314d9197ef 100644 --- a/src/vrml97/Appearance.cpp +++ b/src/vrml97/Appearance.cpp @@ -194,6 +194,7 @@ SoVRMLAppearance::callback(SoCallbackAction * action) } // doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLAppearance::GLRender(SoGLRenderAction * action) { @@ -263,6 +264,7 @@ SoVRMLAppearance::GLRender(SoGLRenderAction * action) SoLazyElement::setPacked(state, this, 1, &PRIVATE(this)->fakecolor, alpha != 255); } } +#endif // doc in parent void diff --git a/src/vrml97/Background.cpp b/src/vrml97/Background.cpp index 17b25bdf1f0..e3c0c6fc9a9 100644 --- a/src/vrml97/Background.cpp +++ b/src/vrml97/Background.cpp @@ -516,6 +516,7 @@ SoVRMLBackground::~SoVRMLBackground() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLBackground::GLRender(SoGLRenderAction * action) { @@ -600,6 +601,7 @@ SoVRMLBackground::GLRender(SoGLRenderAction * action) // pop back to the old model matrix state->pop(); } +#endif void diff --git a/src/vrml97/Billboard.cpp b/src/vrml97/Billboard.cpp index ed29bf3bb72..da873114b46 100644 --- a/src/vrml97/Billboard.cpp +++ b/src/vrml97/Billboard.cpp @@ -257,6 +257,7 @@ SoVRMLBillboard::callback(SoCallbackAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLBillboard::GLRender(SoGLRenderAction * action) { @@ -273,6 +274,7 @@ SoVRMLBillboard::GLRender(SoGLRenderAction * action) break; } } +#endif // Doc in parent void @@ -323,6 +325,7 @@ SoVRMLBillboard::search(SoSearchAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLBillboard::GLRenderBelowPath(SoGLRenderAction * action) { @@ -373,8 +376,10 @@ SoVRMLBillboard::GLRenderBelowPath(SoGLRenderAction * action) action->popCurPath(); state->pop(); } +#endif // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLBillboard::GLRenderInPath(SoGLRenderAction * action ) { @@ -424,13 +429,16 @@ SoVRMLBillboard::GLRenderInPath(SoGLRenderAction * action ) this->GLRenderBelowPath(action); } } +#endif // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLBillboard::GLRenderOffPath(SoGLRenderAction * COIN_UNUSED_ARG(action)) { // do nothing } +#endif // Doc in parent void diff --git a/src/vrml97/Box.cpp b/src/vrml97/Box.cpp index 326998dd1c4..68166db02cd 100644 --- a/src/vrml97/Box.cpp +++ b/src/vrml97/Box.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include + #ifdef HAVE_VRML97 /*! @@ -90,7 +92,9 @@ #include "coindefs.h" #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -132,6 +136,7 @@ SoVRMLBox::~SoVRMLBox() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLBox::GLRender(SoGLRenderAction * action) { @@ -158,6 +163,7 @@ SoVRMLBox::GLRender(SoGLRenderAction * action) &mb, flags, state); } +#endif // Doc in parent void diff --git a/src/vrml97/Collision.cpp b/src/vrml97/Collision.cpp index f632a09ae90..9245329dd18 100644 --- a/src/vrml97/Collision.cpp +++ b/src/vrml97/Collision.cpp @@ -207,6 +207,7 @@ SoVRMLCollision::~SoVRMLCollision() // virtual, protected } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLCollision::GLRender(SoGLRenderAction * action) { @@ -258,6 +259,7 @@ SoVRMLCollision::GLRender(SoGLRenderAction * action) } state->pop(); } +#endif // Doc in parent void diff --git a/src/vrml97/Color.cpp b/src/vrml97/Color.cpp index a01e908f117..57902a2bd64 100644 --- a/src/vrml97/Color.cpp +++ b/src/vrml97/Color.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; + #ifdef HAVE_VRML97 /*! @@ -79,13 +81,17 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #ifdef COIN_THREADSAFE #include #endif // COIN_THREADSAFE #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif class SoVRMLColorP { public: @@ -96,7 +102,11 @@ class SoVRMLColorP { vbo(NULL) { } - ~SoVRMLColorP() { delete this->vbo; } + ~SoVRMLColorP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } #ifdef COIN_THREADSAFE SbStorage colorpacker_storage; @@ -176,6 +186,7 @@ SoVRMLColor::doAction(SoAction * action) this->color.getValues(0), PRIVATE(this)->getColorPacker()); +#if COIN_BUILD_LEGACY_GL_RENDERER if (state->isElementEnabled(SoGLVBOElement::getClassStackIndex())) { SbBool setvbo = FALSE; SoBase::staticDataLock(); @@ -195,6 +206,7 @@ SoVRMLColor::doAction(SoAction * action) SoGLVBOElement::setColorVBO(state, PRIVATE(this)->vbo); } } +#endif if (this->isOverride()) { SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); } @@ -202,11 +214,13 @@ SoVRMLColor::doAction(SoAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLColor::GLRender(SoGLRenderAction * action) { SoVRMLColor::doAction((SoAction*) action); } +#endif // Doc in parent void diff --git a/src/vrml97/Cone.cpp b/src/vrml97/Cone.cpp index e7166b1c590..13f2bafb39f 100644 --- a/src/vrml97/Cone.cpp +++ b/src/vrml97/Cone.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +#include +#include + #ifdef HAVE_VRML97 /*! @@ -119,8 +122,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -163,6 +170,7 @@ SoVRMLCone::~SoVRMLCone() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLCone::GLRender(SoGLRenderAction * action) { @@ -196,6 +204,7 @@ SoVRMLCone::GLRender(SoGLRenderAction * action) &mb, flags, state); } +#endif // Doc in parent void diff --git a/src/vrml97/Coordinate.cpp b/src/vrml97/Coordinate.cpp index df89aa7e7ac..afeedb3ad03 100644 --- a/src/vrml97/Coordinate.cpp +++ b/src/vrml97/Coordinate.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; + #ifdef HAVE_VRML97 /*! @@ -66,11 +68,15 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif SO_NODE_SOURCE(SoVRMLCoordinate); @@ -79,7 +85,11 @@ SO_NODE_SOURCE(SoVRMLCoordinate); class SoVRMLCoordinateP { public: SoVRMLCoordinateP() : vbo(NULL) { } - ~SoVRMLCoordinateP() { delete this->vbo; } + ~SoVRMLCoordinateP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -120,6 +130,7 @@ SoVRMLCoordinate::doAction(SoAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLCoordinate::GLRender(SoGLRenderAction * action) { @@ -155,6 +166,7 @@ SoVRMLCoordinate::GLRender(SoGLRenderAction * action) } } +#endif // Doc in parent void diff --git a/src/vrml97/Cylinder.cpp b/src/vrml97/Cylinder.cpp index 24893ce43b1..795cd136c24 100644 --- a/src/vrml97/Cylinder.cpp +++ b/src/vrml97/Cylinder.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +#include +#include + #ifdef HAVE_VRML97 /*! @@ -127,10 +130,14 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include "nodes/SoSubNodeP.h" #include "rendering/SoGL.h" @@ -172,6 +179,7 @@ SoVRMLCylinder::~SoVRMLCylinder() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLCylinder::GLRender(SoGLRenderAction * action) { @@ -207,6 +215,7 @@ SoVRMLCylinder::GLRender(SoGLRenderAction * action) &mb, flags, state); } +#endif // Doc in parent void diff --git a/src/vrml97/DirectionalLight.cpp b/src/vrml97/DirectionalLight.cpp index d2d062e9689..dbfce89f1f2 100644 --- a/src/vrml97/DirectionalLight.cpp +++ b/src/vrml97/DirectionalLight.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include "rendering/SoGL.h" + #ifdef HAVE_VRML97 /*! @@ -86,7 +88,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #if COIN_DEBUG #include @@ -123,6 +127,7 @@ SoVRMLDirectionalLight::~SoVRMLDirectionalLight() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLDirectionalLight::GLRender(SoGLRenderAction * action) { @@ -165,7 +170,7 @@ SoVRMLDirectionalLight::GLRender(SoGLRenderAction * action) glLightf(light, GL_CONSTANT_ATTENUATION, 1); glLightf(light, GL_LINEAR_ATTENUATION, 0); glLightf(light, GL_QUADRATIC_ATTENUATION, 0); - } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/ElevationGrid.cpp b/src/vrml97/ElevationGrid.cpp index ba9058c46d8..c21fcc88de0 100644 --- a/src/vrml97/ElevationGrid.cpp +++ b/src/vrml97/ElevationGrid.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include + #ifdef HAVE_VRML97 /*! @@ -278,8 +280,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -377,6 +383,7 @@ SoVRMLElevationGrid::~SoVRMLElevationGrid(void) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLElevationGrid::GLRender(SoGLRenderAction * action) { @@ -627,6 +634,7 @@ SoVRMLElevationGrid::GLRender(SoGLRenderAction * action) if (normalcache) PRIVATE(this)->readUnlockNormalCache(); state->pop(); } +#endif // Doc in parent void diff --git a/src/vrml97/Extrusion.cpp b/src/vrml97/Extrusion.cpp index 3f29a4fba87..59dab49b405 100644 --- a/src/vrml97/Extrusion.cpp +++ b/src/vrml97/Extrusion.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; + #ifdef HAVE_VRML97 /*! @@ -358,11 +360,20 @@ #endif // HAVE_THREADS #include "nodes/SoSubNodeP.h" + +#include "coindefs.h" +class SoVertexArrayIndexer; +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVertexArrayIndexer.h" +#endif #include "rendering/SoGL.h" #include "misc/SbHash.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "caches/SoVBOCache.h" +#endif // ************************************************************************* @@ -422,8 +433,10 @@ class SoVRMLExtrusionP { tcoord(32), idx(32), gen(TRUE), - dirty(TRUE), - vbocache(NULL) + dirty(TRUE) +#if COIN_BUILD_LEGACY_GL_RENDERER + , vbocache(NULL) +#endif #ifdef COIN_THREADSAFE , rwmutex(SbRWMutex::READ_PRECEDENCE) #endif // COIN_THREADSAFE @@ -431,7 +444,9 @@ class SoVRMLExtrusionP { this->tess.setCallback(tess_callback, this); } ~SoVRMLExtrusionP() { +#if COIN_BUILD_LEGACY_GL_RENDERER if (this->vbocache) this->vbocache->unref(); +#endif } SoVRMLExtrusion * master; @@ -444,7 +459,9 @@ class SoVRMLExtrusionP { void generateCoords(void); void generateNormals(void); SbBool dirty; +#if COIN_BUILD_LEGACY_GL_RENDERER SoVBOCache * vbocache; +#endif SbHash vbohash; @@ -533,6 +550,7 @@ SoVRMLExtrusion::~SoVRMLExtrusion() // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLExtrusion::GLRender(SoGLRenderAction * action) { @@ -679,6 +697,7 @@ SoVRMLExtrusion::GLRender(SoGLRenderAction * action) sogl_autocache_update(state, PRIVATE(this)->idx.getLength() / 4, vbo); } +#endif // Doc in parent void @@ -807,6 +826,7 @@ SoVRMLExtrusion::updateCache(void) } } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLExtrusionP::updateVBO(SoAction * action) { @@ -826,7 +846,9 @@ SoVRMLExtrusionP::updateVBO(SoAction * action) this->readLock(); } } +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLExtrusionP::generateVBO(SoAction * action, SoTextureCoordinateBundle & tb) { @@ -914,13 +936,16 @@ SoVRMLExtrusionP::generateVBO(SoAction * action, SoTextureCoordinateBundle & tb) this->vbocache->getTexCoordVBO(0)->setBufferData(this->vbotexcoord.getArrayPtr(), this->vbotexcoord.getLength()*sizeof(SbVec2f), 1); } +#endif // Doc in parent void SoVRMLExtrusion::notify(SoNotList * list) { +#if COIN_BUILD_LEGACY_GL_RENDERER if (PRIVATE(this)->vbocache) PRIVATE(this)->vbocache->invalidate(); +#endif PRIVATE(this)->dirty = TRUE; inherited::notify(list); } diff --git a/src/vrml97/Fog.cpp b/src/vrml97/Fog.cpp index 4df58664b24..059a127e465 100644 --- a/src/vrml97/Fog.cpp +++ b/src/vrml97/Fog.cpp @@ -231,6 +231,7 @@ SoVRMLFog::~SoVRMLFog() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLFog::GLRender(SoGLRenderAction * action) { @@ -253,6 +254,7 @@ SoVRMLFog::GLRender(SoGLRenderAction * action) PRIVATE(this)->visibilityRange); } +#endif void fog_fieldsensorCB(void * data, SoSensor * sensor) diff --git a/src/vrml97/FontStyle.cpp b/src/vrml97/FontStyle.cpp index 1dcb998585d..921b87bb948 100644 --- a/src/vrml97/FontStyle.cpp +++ b/src/vrml97/FontStyle.cpp @@ -320,10 +320,12 @@ SoVRMLFontStyle::callback(SoCallbackAction * COIN_UNUSED_ARG(action)) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLFontStyle::GLRender(SoGLRenderAction * COIN_UNUSED_ARG(action)) { } +#endif // Doc in parent void diff --git a/src/vrml97/Geometry.cpp b/src/vrml97/Geometry.cpp index ed20716be74..5c8bfa9a86f 100644 --- a/src/vrml97/Geometry.cpp +++ b/src/vrml97/Geometry.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include + #ifdef HAVE_VRML97 /*! @@ -45,7 +47,9 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -113,11 +117,13 @@ SoVRMLGeometry::~SoVRMLGeometry() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoVRMLGeometry::shouldGLRender(SoGLRenderAction * action) { return inherited::shouldGLRender(action); } +#endif /*! Convenience method that updates the shape hints element. diff --git a/src/vrml97/Group.cpp b/src/vrml97/Group.cpp index 7468040d852..218323510cd 100644 --- a/src/vrml97/Group.cpp +++ b/src/vrml97/Group.cpp @@ -109,7 +109,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -138,21 +140,29 @@ // when doing threadsafe rendering, each thread needs its own // glcachelist typedef struct { +#if COIN_BUILD_LEGACY_GL_RENDERER SoGLCacheList * glcachelist; +#endif } sovrmlgroup_storage; static void sovrmlgroup_storage_construct(void * data) { sovrmlgroup_storage * ptr = (sovrmlgroup_storage*) data; +#if COIN_BUILD_LEGACY_GL_RENDERER ptr->glcachelist = NULL; +#else + (void) ptr; +#endif } static void sovrmlgroup_storage_destruct(void * data) { sovrmlgroup_storage * ptr = (sovrmlgroup_storage*) data; +#if COIN_BUILD_LEGACY_GL_RENDERER delete ptr->glcachelist; +#endif } // ************************************************************************* @@ -180,15 +190,21 @@ class SoVRMLGroupP { SbStorage * glcachestorage; static void invalidate_gl_cache(void * tls, void *) { sovrmlgroup_storage * ptr = (sovrmlgroup_storage*) tls; +#if COIN_BUILD_LEGACY_GL_RENDERER if (ptr->glcachelist) { ptr->glcachelist->invalidateAll(); } +#else + (void) ptr; +#endif } public: enum { YES, NO, MAYBE } hassoundchild; +#if COIN_BUILD_LEGACY_GL_RENDERER SoGLCacheList * getGLCacheList(const SbBool createifnull); +#endif void invalidateGLCaches(void) { glcachestorage->applyToAll(invalidate_gl_cache, NULL); @@ -204,6 +220,7 @@ class SoVRMLGroupP { #endif // !COIN_THREADSAFE }; +#if COIN_BUILD_LEGACY_GL_RENDERER SoGLCacheList * SoVRMLGroupP::getGLCacheList(const SbBool createifnull) { @@ -214,6 +231,7 @@ SoVRMLGroupP::getGLCacheList(const SbBool createifnull) } return ptr->glcachelist; } +#endif #define PRIVATE(obj) ((obj)->pimpl) @@ -351,6 +369,7 @@ SoVRMLGroup::callback(SoCallbackAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLGroup::GLRender(SoGLRenderAction * action ) { @@ -367,6 +386,7 @@ SoVRMLGroup::GLRender(SoGLRenderAction * action ) break; } } +#endif // Doc in parent void @@ -560,6 +580,7 @@ SoVRMLGroup::getPrimitiveCount(SoGetPrimitiveCountAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLGroup::GLRenderBelowPath(SoGLRenderAction * action) { @@ -647,8 +668,10 @@ SoVRMLGroup::GLRenderBelowPath(SoGLRenderAction * action) createcache->close(action); } } +#endif // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLGroup::GLRenderInPath(SoGLRenderAction * action) { @@ -701,13 +724,16 @@ SoVRMLGroup::GLRenderInPath(SoGLRenderAction * action) this->GLRenderBelowPath(action); } } +#endif // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLGroup::GLRenderOffPath(SoGLRenderAction * COIN_UNUSED_ARG(action)) { // do nothing } +#endif // Doc in parent void diff --git a/src/vrml97/ImageTexture.cpp b/src/vrml97/ImageTexture.cpp index cf73928f69a..6ca2af0f1a1 100644 --- a/src/vrml97/ImageTexture.cpp +++ b/src/vrml97/ImageTexture.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +#include +#include + #ifdef HAVE_VRML97 /*! @@ -194,15 +197,21 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -384,7 +393,9 @@ SoVRMLImageTexture::~SoVRMLImageTexture() cc_sched_wait_all(SoVRMLImageTextureP::scheduler); } +#if COIN_BUILD_LEGACY_GL_RENDERER if (PRIVATE(this)->glimage) PRIVATE(this)->glimage->unref(NULL); +#endif PRIVATE(this)->clearSearchDirs(); delete PRIVATE(this)->urlsensor; delete PRIVATE(this); @@ -424,12 +435,14 @@ SoVRMLImageTexture::allowPrequalifyFile(SbBool enable) PRIVATE(this)->allowprequalifycb = enable; } +#if COIN_BUILD_LEGACY_GL_RENDERER static SoGLImage::Wrap imagetexture_translate_wrap(const SbBool repeat) { if (repeat) return SoGLImage::REPEAT; return SoGLImage::CLAMP_TO_EDGE; } +#endif // Doc in parent void @@ -482,6 +495,7 @@ SoVRMLImageTexture::rayPick(SoRayPickAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLImageTexture::GLRender(SoGLRenderAction * action) { @@ -556,6 +570,7 @@ SoVRMLImageTexture::GLRender(SoGLRenderAction * action) SoTextureOverrideElement::setImageOverride(state, TRUE); } } +#endif // Doc in parent void @@ -642,6 +657,7 @@ SoVRMLImageTexture::loadUrl(void) } // sensor callback used for deleting old GLImage instances +#if COIN_BUILD_LEGACY_GL_RENDERER static void imagetexture_glimage_delete(void * closure, SoSensor * s) { @@ -649,10 +665,12 @@ imagetexture_glimage_delete(void * closure, SoSensor * s) img->unref(NULL); delete s; } +#endif // // used for checking if this texture should be purged from memory // +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLImageTexture::glimage_callback(void * closure) { @@ -684,6 +702,7 @@ SoVRMLImageTexture::glimage_callback(void * closure) } PRIVATE(thisp)->unlock_glimage(); } +#endif SbBool SoVRMLImageTexture::default_prequalify_cb(const SbString & url, void * COIN_UNUSED_ARG(closure), diff --git a/src/vrml97/IndexedFaceSet.cpp b/src/vrml97/IndexedFaceSet.cpp index 45ceb2473a6..0af6ea2abfa 100644 --- a/src/vrml97/IndexedFaceSet.cpp +++ b/src/vrml97/IndexedFaceSet.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; +#include + #ifdef HAVE_VRML97 /*! @@ -231,8 +234,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -245,12 +252,19 @@ #include #endif // HAVE_THREADS +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVertexArrayIndexer.h" +#endif #include "glue/glp.h" #include "rendering/SoGL.h" #include "nodes/SoSubNodeP.h" +#include "coindefs.h" +class SoVertexArrayIndexer; + // ************************************************************************* // for concavestatus @@ -330,7 +344,9 @@ SoVRMLIndexedFaceSet::SoVRMLIndexedFaceSet(void) SoVRMLIndexedFaceSet::~SoVRMLIndexedFaceSet() // virtual, protected { if (PRIVATE(this)->convexCache) PRIVATE(this)->convexCache->unref(); +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->vaindexer; +#endif delete PRIVATE(this); } @@ -439,6 +455,7 @@ SoVRMLIndexedFaceSet::findNormalBinding(SoState * state) const // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLIndexedFaceSet::GLRender(SoGLRenderAction * action) { @@ -663,6 +680,7 @@ SoVRMLIndexedFaceSet::GLRender(SoGLRenderAction * action) state->pop(); } +#endif // Doc in parent void @@ -974,7 +992,9 @@ SoVRMLIndexedFaceSet::notify(SoNotList * list) if (f == &this->coordIndex) { PRIVATE(this)->concavestatus = STATUS_UNKNOWN; LOCK_VAINDEXER(this); +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->vaindexer; +#endif PRIVATE(this)->vaindexer = NULL; UNLOCK_VAINDEXER(this); } diff --git a/src/vrml97/IndexedLineSet.cpp b/src/vrml97/IndexedLineSet.cpp index b08a3d3da41..7123a218845 100644 --- a/src/vrml97/IndexedLineSet.cpp +++ b/src/vrml97/IndexedLineSet.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; +#include + #ifdef HAVE_VRML97 /*! @@ -133,12 +136,18 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -149,15 +158,26 @@ #endif // COIN_DEBUG #include "nodes/SoSubNodeP.h" + +#include "coindefs.h" +class SoVertexArrayIndexer; #include "rendering/SoGL.h" #include "glue/glp.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVertexArrayIndexer.h" +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif class SoVRMLIndexedLineSetP { public: SoVRMLIndexedLineSetP() : vaindexer(NULL) { } - ~SoVRMLIndexedLineSetP() { delete this->vaindexer; } + ~SoVRMLIndexedLineSetP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vaindexer; +#endif + } enum Binding { // Needs to be these specific values to match the rendering code @@ -249,6 +269,7 @@ SoVRMLIndexedLineSetP::findMaterialBinding(SoVRMLIndexedLineSet * node, return binding; } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLIndexedLineSet::GLRender(SoGLRenderAction * action) { @@ -415,6 +436,7 @@ SoVRMLIndexedLineSet::GLRender(SoGLRenderAction * action) sogl_autocache_update(state, this->coordIndex.getNum() / 2, didrenderasvbo); state->pop(); } +#endif void SoVRMLIndexedLineSet::getPrimitiveCount(SoGetPrimitiveCountAction * action) @@ -547,7 +569,9 @@ SoVRMLIndexedLineSet::notify(SoNotList * list) SoField *f = list->getLastField(); if (f == &this->coordIndex) { LOCK_VAINDEXER(this); +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->vaindexer; +#endif PRIVATE(this)->vaindexer = NULL; UNLOCK_VAINDEXER(this); } diff --git a/src/vrml97/Inline.cpp b/src/vrml97/Inline.cpp index ab56044c76a..e5d2b385092 100644 --- a/src/vrml97/Inline.cpp +++ b/src/vrml97/Inline.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +#include +#include + #ifdef HAVE_VRML97 /*! @@ -142,8 +145,12 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -413,6 +420,7 @@ SoVRMLInline::callback(SoCallbackAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLInline::GLRender(SoGLRenderAction * action) { @@ -475,6 +483,7 @@ SoVRMLInline::GLRender(SoGLRenderAction * action) } SoVRMLInline::doAction(action); } +#endif // Doc in parent void diff --git a/src/vrml97/LOD.cpp b/src/vrml97/LOD.cpp index 81f6946f20b..13f0b547206 100644 --- a/src/vrml97/LOD.cpp +++ b/src/vrml97/LOD.cpp @@ -348,6 +348,7 @@ SoVRMLLOD::callback(SoCallbackAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLLOD::GLRender(SoGLRenderAction * action) { @@ -367,6 +368,7 @@ SoVRMLLOD::GLRender(SoGLRenderAction * action) break; } } +#endif // Doc in parent void @@ -418,6 +420,7 @@ SoVRMLLOD::audioRender(SoAudioRenderAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLLOD::GLRenderBelowPath(SoGLRenderAction * action) { @@ -457,8 +460,10 @@ SoVRMLLOD::GLRenderBelowPath(SoGLRenderAction * action) SoGLCacheContextElement::shouldAutoCache(action->getState(), SoGLCacheContextElement::DONT_AUTO_CACHE); } +#endif // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLLOD::GLRenderInPath(SoGLRenderAction * action) { @@ -485,8 +490,10 @@ SoVRMLLOD::GLRenderInPath(SoGLRenderAction * action) SoVRMLLOD::GLRenderBelowPath(action); } } +#endif // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLLOD::GLRenderOffPath(SoGLRenderAction * action) { @@ -505,6 +512,7 @@ SoVRMLLOD::GLRenderOffPath(SoGLRenderAction * action) } } } +#endif // Doc in parent void diff --git a/src/vrml97/Light.cpp b/src/vrml97/Light.cpp index e6675f9ba24..aab298d31af 100644 --- a/src/vrml97/Light.cpp +++ b/src/vrml97/Light.cpp @@ -100,9 +100,11 @@ SoVRMLLight::~SoVRMLLight() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLLight::GLRender(SoGLRenderAction * COIN_UNUSED_ARG(action)) { } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/Material.cpp b/src/vrml97/Material.cpp index 74bc8ff7859..1f94e45d086 100644 --- a/src/vrml97/Material.cpp +++ b/src/vrml97/Material.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include + #ifdef HAVE_VRML97 /*! @@ -136,7 +138,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #ifdef COIN_THREADSAFE #include @@ -323,11 +327,13 @@ SoVRMLMaterial::doAction(SoAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLMaterial::GLRender(SoGLRenderAction * action) { SoVRMLMaterial::doAction(action); } +#endif // Doc in parent void diff --git a/src/vrml97/MovieTexture.cpp b/src/vrml97/MovieTexture.cpp index 84ee814b037..a3cc917cbed 100644 --- a/src/vrml97/MovieTexture.cpp +++ b/src/vrml97/MovieTexture.cpp @@ -214,9 +214,11 @@ SoVRMLMovieTexture::~SoVRMLMovieTexture() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLMovieTexture::GLRender(SoGLRenderAction * COIN_UNUSED_ARG(action)) { } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/NavigationInfo.cpp b/src/vrml97/NavigationInfo.cpp index b5c0c53e7b3..de31e868104 100644 --- a/src/vrml97/NavigationInfo.cpp +++ b/src/vrml97/NavigationInfo.cpp @@ -305,9 +305,11 @@ SoVRMLNavigationInfo::~SoVRMLNavigationInfo() // virtual, protected } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLNavigationInfo::GLRender(SoGLRenderAction * COIN_UNUSED_ARG(action)) { } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/Normal.cpp b/src/vrml97/Normal.cpp index f0c14d8b0be..8932a33ed7d 100644 --- a/src/vrml97/Normal.cpp +++ b/src/vrml97/Normal.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; + #ifdef HAVE_VRML97 /*! @@ -67,17 +69,25 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif SO_NODE_SOURCE(SoVRMLNormal); class SoVRMLNormalP { public: SoVRMLNormalP() : vbo(NULL) { } - ~SoVRMLNormalP() { delete this->vbo; } + ~SoVRMLNormalP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -121,6 +131,7 @@ SoVRMLNormal::doAction(SoAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLNormal::GLRender(SoGLRenderAction * action) { @@ -161,6 +172,7 @@ SoVRMLNormal::GLRender(SoGLRenderAction * action) } } +#endif // Doc in parent void diff --git a/src/vrml97/PixelTexture.cpp b/src/vrml97/PixelTexture.cpp index 30deb868122..73db2299c9b 100644 --- a/src/vrml97/PixelTexture.cpp +++ b/src/vrml97/PixelTexture.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +#include +#include + #ifdef HAVE_VRML97 /*! @@ -100,14 +103,20 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -118,6 +127,8 @@ #include "nodes/SoSubNodeP.h" #include "elements/SoTextureScalePolicyElement.h" +class SoGLImage; + // ************************************************************************* class SoVRMLPixelTextureP { @@ -177,16 +188,20 @@ SoVRMLPixelTexture::SoVRMLPixelTexture(void) */ SoVRMLPixelTexture::~SoVRMLPixelTexture() { +#if COIN_BUILD_LEGACY_GL_RENDERER if (PRIVATE(this)->glimage) PRIVATE(this)->glimage->unref(NULL); +#endif delete PRIVATE(this); } +#if COIN_BUILD_LEGACY_GL_RENDERER static SoGLImage::Wrap pixeltexture_translate_wrap(const SbBool repeat) { if (repeat) return SoGLImage::REPEAT; return SoGLImage::CLAMP_TO_EDGE; } +#endif // Doc in parent void @@ -230,6 +245,7 @@ SoVRMLPixelTexture::rayPick(SoRayPickAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLPixelTexture::GLRender(SoGLRenderAction * action) { @@ -298,6 +314,7 @@ SoVRMLPixelTexture::GLRender(SoGLRenderAction * action) SoTextureOverrideElement::setImageOverride(state, TRUE); } } +#endif // doc in parent void diff --git a/src/vrml97/PointLight.cpp b/src/vrml97/PointLight.cpp index 6f72f9aba9e..4cb5aabd24b 100644 --- a/src/vrml97/PointLight.cpp +++ b/src/vrml97/PointLight.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include "rendering/SoGL.h" + #ifdef HAVE_VRML97 /*! @@ -105,7 +107,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #if COIN_DEBUG #include #endif // COIN_DEBUG @@ -144,6 +148,7 @@ SoVRMLPointLight::~SoVRMLPointLight() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLPointLight::GLRender(SoGLRenderAction * action) { @@ -189,5 +194,6 @@ SoVRMLPointLight::GLRender(SoGLRenderAction * action) // FIXME: consider radius } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/PointSet.cpp b/src/vrml97/PointSet.cpp index 17c10de8d85..a45028404c5 100644 --- a/src/vrml97/PointSet.cpp +++ b/src/vrml97/PointSet.cpp @@ -34,6 +34,10 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; +#include +#include + #ifdef HAVE_VRML97 /*! @@ -89,11 +93,15 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -102,15 +110,21 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #if COIN_DEBUG #include #endif // COIN_DEBUG #include "nodes/SoSubNodeP.h" #include "rendering/SoGL.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif static SbBool is_material_per_vertex(SoVRMLPointSet * ps, SoState * state) @@ -150,6 +164,7 @@ SoVRMLPointSet::~SoVRMLPointSet() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLPointSet::GLRender(SoGLRenderAction * action) { @@ -224,6 +239,7 @@ SoVRMLPointSet::GLRender(SoGLRenderAction * action) // send approx number of points for autocache handling sogl_autocache_update(state, numpts, didrenderasvbo); } +#endif // Doc in parent void diff --git a/src/vrml97/ProximitySensor.cpp b/src/vrml97/ProximitySensor.cpp index 2314e13aa00..40e01f736f0 100644 --- a/src/vrml97/ProximitySensor.cpp +++ b/src/vrml97/ProximitySensor.cpp @@ -314,11 +314,13 @@ SoVRMLProximitySensor::doAction(SoAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLProximitySensor::GLRender(SoGLRenderAction * action) { SoVRMLProximitySensor::doAction((SoAction*) action); } +#endif // Doc in parent void diff --git a/src/vrml97/Script.cpp b/src/vrml97/Script.cpp index e310f39c861..bfcdc1c9c03 100644 --- a/src/vrml97/Script.cpp +++ b/src/vrml97/Script.cpp @@ -432,11 +432,13 @@ SoVRMLScript::callback(SoCallbackAction * action) } // Doc in superclass +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLScript::GLRender(SoGLRenderAction * action) { SoVRMLScript::doAction((SoAction*) action); } +#endif // Doc in superclass void diff --git a/src/vrml97/Shape.cpp b/src/vrml97/Shape.cpp index cbe08eede53..88e3f4e6350 100644 --- a/src/vrml97/Shape.cpp +++ b/src/vrml97/Shape.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +#include +#include + #ifdef HAVE_VRML97 /*! @@ -129,10 +132,18 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #ifdef HAVE_THREADS #include @@ -143,6 +154,8 @@ #include "tidbitsp.h" #include "profiler/SoNodeProfiling.h" +class SoGLCacheList; + // ************************************************************************* class SoVRMLShapeP { @@ -219,7 +232,9 @@ SoVRMLShape::SoVRMLShape(void) SoVRMLShape::~SoVRMLShape() { delete PRIVATE(this)->childlist; +#if COIN_BUILD_LEGACY_GL_RENDERER delete PRIVATE(this)->cachelist; +#endif delete PRIVATE(this); } @@ -271,6 +286,7 @@ SoVRMLShape::callback(SoCallbackAction * action) SoVRMLShape::doAction((SoAction*) action); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLShape::GLRender(SoGLRenderAction * action) { @@ -327,6 +343,7 @@ SoVRMLShape::GLRender(SoGLRenderAction * action) } state->pop(); } +#endif void SoVRMLShape::getBoundingBox(SoGetBoundingBoxAction * action) diff --git a/src/vrml97/Sphere.cpp b/src/vrml97/Sphere.cpp index 1ea47e1c971..a83c9cc92d2 100644 --- a/src/vrml97/Sphere.cpp +++ b/src/vrml97/Sphere.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +#include +#include + #ifdef HAVE_VRML97 /*! @@ -82,13 +85,17 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include "nodes/SoSubNodeP.h" @@ -128,6 +135,7 @@ SoVRMLSphere::~SoVRMLSphere() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLSphere::GLRender(SoGLRenderAction * action) { @@ -158,6 +166,7 @@ SoVRMLSphere::GLRender(SoGLRenderAction * action) &mb, flags, state); } +#endif // Doc in parent void diff --git a/src/vrml97/SpotLight.cpp b/src/vrml97/SpotLight.cpp index 4ca0c72af89..ff82308b36e 100644 --- a/src/vrml97/SpotLight.cpp +++ b/src/vrml97/SpotLight.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include "rendering/SoGL.h" + #ifdef HAVE_VRML97 /*! @@ -194,7 +196,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #if COIN_DEBUG #include @@ -236,6 +240,7 @@ SoVRMLSpotLight::~SoVRMLSpotLight() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLSpotLight::GLRender(SoGLRenderAction * action) { @@ -284,5 +289,6 @@ SoVRMLSpotLight::GLRender(SoGLRenderAction * action) // FIXME: consider radius and beamWidth } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/Switch.cpp b/src/vrml97/Switch.cpp index 93f10aebb04..9321f2b0a7b 100644 --- a/src/vrml97/Switch.cpp +++ b/src/vrml97/Switch.cpp @@ -390,11 +390,13 @@ SoVRMLSwitch::callback(SoCallbackAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLSwitch::GLRender(SoGLRenderAction * action) { SoVRMLSwitch::doAction(action); } +#endif // Doc in parent void diff --git a/src/vrml97/Text.cpp b/src/vrml97/Text.cpp index 960a58f6e06..e0a377b88ae 100644 --- a/src/vrml97/Text.cpp +++ b/src/vrml97/Text.cpp @@ -34,6 +34,8 @@ #include #endif // HAVE_CONFIG_H +#include + #ifdef HAVE_VRML97 /*! @@ -138,7 +140,9 @@ #include #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include #include #include @@ -275,6 +279,7 @@ SoVRMLText::~SoVRMLText() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLText::GLRender(SoGLRenderAction * action) { @@ -519,6 +524,7 @@ SoVRMLText::GLRender(SoGLRenderAction * action) SoGLCacheContextElement::incNumShapes(state); } } +#endif // Doc in parent diff --git a/src/vrml97/Texture.cpp b/src/vrml97/Texture.cpp index 94651910f87..c8d8166917c 100644 --- a/src/vrml97/Texture.cpp +++ b/src/vrml97/Texture.cpp @@ -88,9 +88,11 @@ SoVRMLTexture::~SoVRMLTexture() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLTexture::GLRender(SoGLRenderAction * COIN_UNUSED_ARG(action)) { } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/TextureCoordinate.cpp b/src/vrml97/TextureCoordinate.cpp index bdc5f8bbf45..5e06800d747 100644 --- a/src/vrml97/TextureCoordinate.cpp +++ b/src/vrml97/TextureCoordinate.cpp @@ -34,6 +34,9 @@ #include #endif // HAVE_CONFIG_H +class SoVBO; +#include + #ifdef HAVE_VRML97 /*! @@ -94,16 +97,26 @@ #include #include +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif +#if COIN_BUILD_LEGACY_GL_RENDERER #include +#endif #include "nodes/SoSubNodeP.h" +#if COIN_BUILD_LEGACY_GL_RENDERER #include "rendering/SoVBO.h" +#endif class SoVRMLTextureCoordinateP { public: SoVRMLTextureCoordinateP() : vbo(NULL) { } - ~SoVRMLTextureCoordinateP() { delete this->vbo; } + ~SoVRMLTextureCoordinateP() { +#if COIN_BUILD_LEGACY_GL_RENDERER + delete this->vbo; +#endif + } SoVBO * vbo; }; @@ -156,6 +169,7 @@ SoVRMLTextureCoordinate::callback(SoCallbackAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLTextureCoordinate::GLRender(SoGLRenderAction * action) { @@ -192,6 +206,7 @@ SoVRMLTextureCoordinate::GLRender(SoGLRenderAction * action) SoGLVBOElement::setTexCoordVBO(state, 0, PRIVATE(this)->vbo); } } +#endif // Doc in parent void diff --git a/src/vrml97/TextureTransform.cpp b/src/vrml97/TextureTransform.cpp index 3c16baf1372..698b787ea3b 100644 --- a/src/vrml97/TextureTransform.cpp +++ b/src/vrml97/TextureTransform.cpp @@ -184,11 +184,13 @@ SoVRMLTextureTransform::callback(SoCallbackAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLTextureTransform::GLRender(SoGLRenderAction * action) { SoVRMLTextureTransform::doAction((SoAction*)action); } +#endif // Doc in parent void diff --git a/src/vrml97/Transform.cpp b/src/vrml97/Transform.cpp index d73bba01489..e9fe4e3e14e 100644 --- a/src/vrml97/Transform.cpp +++ b/src/vrml97/Transform.cpp @@ -501,6 +501,7 @@ SoVRMLTransform::getPrimitiveCount(SoGetPrimitiveCountAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLTransform::GLRenderBelowPath(SoGLRenderAction * action) { @@ -510,8 +511,10 @@ SoVRMLTransform::GLRenderBelowPath(SoGLRenderAction * action) inherited::GLRenderBelowPath(action); state->pop(); } +#endif // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLTransform::GLRenderInPath(SoGLRenderAction * action) { @@ -527,6 +530,7 @@ SoVRMLTransform::GLRenderInPath(SoGLRenderAction * action) this->GLRenderBelowPath(action); } } +#endif // Doc in parent void diff --git a/src/vrml97/VertexLine.cpp b/src/vrml97/VertexLine.cpp index bded04007aa..fdbd01954e3 100644 --- a/src/vrml97/VertexLine.cpp +++ b/src/vrml97/VertexLine.cpp @@ -112,6 +112,7 @@ SoVRMLVertexLine::doAction(SoAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLVertexLine::GLRender(SoGLRenderAction * action) { @@ -123,6 +124,7 @@ SoVRMLVertexLine::GLRender(SoGLRenderAction * action) node = this->color.getValue(); if (node) node->GLRender(action); } +#endif // Doc in parent void @@ -153,11 +155,13 @@ SoVRMLVertexLine::notify(SoNotList * list) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoVRMLVertexLine::shouldGLRender(SoGLRenderAction * action) { if (this->coord.getValue() == NULL) return FALSE; return inherited::shouldGLRender(action); } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/VertexPoint.cpp b/src/vrml97/VertexPoint.cpp index 108a6d1c17b..6cd7ad4660f 100644 --- a/src/vrml97/VertexPoint.cpp +++ b/src/vrml97/VertexPoint.cpp @@ -105,6 +105,7 @@ SoVRMLVertexPoint::doAction(SoAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLVertexPoint::GLRender(SoGLRenderAction * action) { @@ -116,6 +117,7 @@ SoVRMLVertexPoint::GLRender(SoGLRenderAction * action) node = this->color.getValue(); if (node) node->GLRender(action); } +#endif // Doc in parent void @@ -176,11 +178,13 @@ SoVRMLVertexPoint::getPrimitiveCount(SoGetPrimitiveCountAction * action) } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoVRMLVertexPoint::shouldGLRender(SoGLRenderAction * action) { if (this->coord.getValue() == NULL) return FALSE; return inherited::shouldGLRender(action); } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/VertexShape.cpp b/src/vrml97/VertexShape.cpp index 9032fb12c7a..11a11acccdb 100644 --- a/src/vrml97/VertexShape.cpp +++ b/src/vrml97/VertexShape.cpp @@ -208,6 +208,7 @@ SoVRMLVertexShape::doAction(SoAction * action) if (node) node->doAction(action); } +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLVertexShape::GLRender(SoGLRenderAction * action) { @@ -225,6 +226,7 @@ SoVRMLVertexShape::GLRender(SoGLRenderAction * action) node = this->color.getValue(); if (node) node->GLRender(action); } +#endif void SoVRMLVertexShape::getBoundingBox(SoGetBoundingBoxAction * action) @@ -259,11 +261,13 @@ SoVRMLVertexShape::notify(SoNotList * list) inherited::notify(list); } +#if COIN_BUILD_LEGACY_GL_RENDERER SbBool SoVRMLVertexShape::shouldGLRender(SoGLRenderAction * action) { return SoShape::shouldGLRender(action); } +#endif void SoVRMLVertexShape::setNormalCache(SoState * state, diff --git a/src/vrml97/Viewpoint.cpp b/src/vrml97/Viewpoint.cpp index 595dfec4f24..6eb15efdac9 100644 --- a/src/vrml97/Viewpoint.cpp +++ b/src/vrml97/Viewpoint.cpp @@ -348,9 +348,11 @@ SoVRMLViewpoint::~SoVRMLViewpoint() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLViewpoint::GLRender(SoGLRenderAction * COIN_UNUSED_ARG(action)) { } +#endif #endif // HAVE_VRML97 diff --git a/src/vrml97/VisibilitySensor.cpp b/src/vrml97/VisibilitySensor.cpp index 99ba24feb58..ea64385db3e 100644 --- a/src/vrml97/VisibilitySensor.cpp +++ b/src/vrml97/VisibilitySensor.cpp @@ -194,6 +194,7 @@ SoVRMLVisibilitySensor::~SoVRMLVisibilitySensor() } // Doc in parent +#if COIN_BUILD_LEGACY_GL_RENDERER void SoVRMLVisibilitySensor::GLRender(SoGLRenderAction * action) { @@ -222,5 +223,6 @@ SoVRMLVisibilitySensor::GLRender(SoGLRenderAction * action) this->isActive = FALSE; } } +#endif #endif // HAVE_VRML97 diff --git a/testsuite/CMakeLists.txt b/testsuite/CMakeLists.txt index 2bc73bc2789..70f0cfd60a1 100644 --- a/testsuite/CMakeLists.txt +++ b/testsuite/CMakeLists.txt @@ -158,6 +158,14 @@ if(_coin_glfw_target) endfunction() endif() +add_executable(CoreTraversalTest CoreTraversalTest.cpp) +target_link_libraries(CoreTraversalTest Coin ${COIN_TARGET_LINK_LIBRARIES}) +target_include_directories(CoreTraversalTest PRIVATE + ${PROJECT_SOURCE_DIR}/include + ${PROJECT_BINARY_DIR}/include + ${COIN_TARGET_INCLUDE_DIRECTORIES} +) +add_test(NAME CoreTraversalTest COMMAND CoreTraversalTest) if(COIN_BUILD_GL_TESTS_EFFECTIVE) coin_add_gl_test(GLSLRuntimeTest GLSLRuntimeTest.cpp) coin_add_gl_test(GLSLDiagnosticsTest GLSLDiagnosticsTest.cpp) diff --git a/testsuite/CoreTraversalTest.cpp b/testsuite/CoreTraversalTest.cpp new file mode 100644 index 00000000000..4c206ae3300 --- /dev/null +++ b/testsuite/CoreTraversalTest.cpp @@ -0,0 +1,101 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { + +struct CallbackCounts { + int triangles = 0; + int lines = 0; + int points = 0; +}; + +void +triangle_callback(void * userdata, SoCallbackAction *, + const SoPrimitiveVertex *, const SoPrimitiveVertex *, + const SoPrimitiveVertex *) +{ + static_cast(userdata)->triangles++; +} + +void +line_callback(void * userdata, SoCallbackAction *, + const SoPrimitiveVertex *, const SoPrimitiveVertex *) +{ + static_cast(userdata)->lines++; +} + +void +point_callback(void * userdata, SoCallbackAction *, const SoPrimitiveVertex *) +{ + static_cast(userdata)->points++; +} + +} + +int +main() +{ + SoDB::init(); + + SoSeparator * root = new SoSeparator; + SoCube * cube = new SoCube; + root->addChild(cube); + + SoCoordinate3 * coordinates = new SoCoordinate3; + coordinates->point.set1Value(0, SbVec3f(-2.0f, 0.0f, 0.0f)); + coordinates->point.set1Value(1, SbVec3f(-1.0f, 0.0f, 0.0f)); + coordinates->point.set1Value(2, SbVec3f(2.0f, 0.0f, 0.0f)); + root->addChild(coordinates); + + SoLineSet * lines = new SoLineSet; + lines->numVertices.set1Value(0, 2); + root->addChild(lines); + + SoPointSet * points = new SoPointSet; + points->numPoints = 1; + root->addChild(points); + root->ref(); + + { + CallbackCounts callbacks; + SoCallbackAction callback_action; + callback_action.addTriangleCallback(SoShape::getClassTypeId(), + triangle_callback, &callbacks); + callback_action.addLineSegmentCallback(SoShape::getClassTypeId(), + line_callback, &callbacks); + callback_action.addPointCallback(SoShape::getClassTypeId(), + point_callback, &callbacks); + callback_action.apply(root); + assert(callbacks.triangles > 0); + assert(callbacks.lines > 0); + assert(callbacks.points > 0); + + SoGetPrimitiveCountAction count_action; + count_action.apply(root); + assert(count_action.getTriangleCount() > 0); + assert(count_action.getLineCount() > 0); + assert(count_action.getPointCount() > 0); + + SoRayPickAction pick_action(SbViewportRegion(100, 100)); + pick_action.setRay(SbVec3f(0.0f, 0.0f, 5.0f), + SbVec3f(0.0f, 0.0f, -1.0f)); + pick_action.apply(root); + assert(pick_action.getPickedPoint() != NULL); + } + + root->unref(); + SoDB::finish(); + return 0; +}