Browse Source

pgraph: Mark all sub-classes of RenderAttrib as `final`

rdb 2 years ago
parent
commit
cc49825e00

+ 1 - 1
panda/src/pgraph/alphaTestAttrib.h

@@ -23,7 +23,7 @@ class FactoryParams;
  * Enables or disables writing of pixel to framebuffer based on its alpha
  * value relative to a reference alpha value
  */
-class EXPCL_PANDA_PGRAPH AlphaTestAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH AlphaTestAttrib final : public RenderAttrib {
 private:
   INLINE AlphaTestAttrib(PandaCompareFunc mode = M_always,
                          PN_stdfloat reference_alpha = 1.0f);

+ 1 - 1
panda/src/pgraph/antialiasAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
  * Specifies whether or how to enable antialiasing, if supported by the
  * backend renderer.
  */
-class EXPCL_PANDA_PGRAPH AntialiasAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH AntialiasAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     M_none        = 0x0000,

+ 1 - 1
panda/src/pgraph/audioVolumeAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
 /**
  * Applies a scale to audio volume for positional sounds in the scene graph.
  */
-class EXPCL_PANDA_PGRAPH AudioVolumeAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH AudioVolumeAttrib final : public RenderAttrib {
 protected:
   AudioVolumeAttrib(bool off, PN_stdfloat volume);
   INLINE AudioVolumeAttrib(const AudioVolumeAttrib &copy);

+ 1 - 1
panda/src/pgraph/auxBitplaneAttrib.h

@@ -46,7 +46,7 @@ class FactoryParams;
  * Otherwise, it has no effect.
  *
  */
-class EXPCL_PANDA_PGRAPH AuxBitplaneAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH AuxBitplaneAttrib final : public RenderAttrib {
 private:
   INLINE AuxBitplaneAttrib(int outputs);
 

+ 1 - 1
panda/src/pgraph/clipPlaneAttrib.h

@@ -28,7 +28,7 @@
  * ClipPlaneAttrib can either add planes or remove planes from the total set
  * of clipping planes in effect.
  */
-class EXPCL_PANDA_PGRAPH ClipPlaneAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ClipPlaneAttrib final : public RenderAttrib {
 private:
   INLINE ClipPlaneAttrib();
   INLINE ClipPlaneAttrib(const ClipPlaneAttrib &copy);

+ 1 - 1
panda/src/pgraph/colorAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
 /**
  * Indicates what color should be applied to renderable geometry.
  */
-class EXPCL_PANDA_PGRAPH ColorAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ColorAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Type {
     T_vertex, T_flat, T_off

+ 1 - 1
panda/src/pgraph/colorBlendAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
  * This specifies how colors are blended into the frame buffer, for special
  * effects.  This overrides transparency if transparency is also specified.
  */
-class EXPCL_PANDA_PGRAPH ColorBlendAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ColorBlendAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     M_none,             // Blending is disabled

+ 1 - 1
panda/src/pgraph/colorScaleAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
 /**
  * Applies a scale to colors in the scene graph and on vertices.
  */
-class EXPCL_PANDA_PGRAPH ColorScaleAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ColorScaleAttrib final : public RenderAttrib {
 protected:
   ColorScaleAttrib(bool off, const LVecBase4 &scale);
   INLINE ColorScaleAttrib(const ColorScaleAttrib &copy);

+ 1 - 1
panda/src/pgraph/colorWriteAttrib.h

@@ -25,7 +25,7 @@ class FactoryParams;
  * for certain special effects in which it is important to write to the depth
  * buffer without affecting the color buffer.
  */
-class EXPCL_PANDA_PGRAPH ColorWriteAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ColorWriteAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Channels {
     // By coincidence, these bits are the same as those for

+ 1 - 1
panda/src/pgraph/cullBinAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
  * Assigns geometry to a particular bin by name.  The bins must be created
  * separately via the CullBinManager interface.
  */
-class EXPCL_PANDA_PGRAPH CullBinAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH CullBinAttrib final : public RenderAttrib {
 private:
   INLINE CullBinAttrib();
 

+ 1 - 1
panda/src/pgraph/cullFaceAttrib.h

@@ -23,7 +23,7 @@ class FactoryParams;
 /**
  * Indicates which faces should be culled based on their vertex ordering.
  */
-class EXPCL_PANDA_PGRAPH CullFaceAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH CullFaceAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     M_cull_none,                // Cull no polygons

+ 1 - 1
panda/src/pgraph/depthBiasAttrib.h

@@ -40,7 +40,7 @@ class FactoryParams;
  *
  * @since 1.11.0
  */
-class EXPCL_PANDA_PGRAPH DepthBiasAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH DepthBiasAttrib final : public RenderAttrib {
 private:
   INLINE DepthBiasAttrib(PN_stdfloat slope_factor, PN_stdfloat constant_factor,
                          PN_stdfloat clamp = 0);

+ 1 - 1
panda/src/pgraph/depthOffsetAttrib.h

@@ -49,7 +49,7 @@ class FactoryParams;
  *
  * @deprecated See DepthBiasAttrib and DisplayRegion::set_depth_range() instead.
  */
-class EXPCL_PANDA_PGRAPH DepthOffsetAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH DepthOffsetAttrib final : public RenderAttrib {
 private:
   INLINE DepthOffsetAttrib(int offset, PN_stdfloat min_value, PN_stdfloat max_value);
 

+ 1 - 1
panda/src/pgraph/depthTestAttrib.h

@@ -23,7 +23,7 @@ class FactoryParams;
 /**
  * Enables or disables writing to the depth buffer.
  */
-class EXPCL_PANDA_PGRAPH DepthTestAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH DepthTestAttrib final : public RenderAttrib {
 private:
   INLINE DepthTestAttrib(PandaCompareFunc mode = M_less);
 

+ 1 - 1
panda/src/pgraph/depthWriteAttrib.h

@@ -23,7 +23,7 @@ class FactoryParams;
 /**
  * Enables or disables writing to the depth buffer.
  */
-class EXPCL_PANDA_PGRAPH DepthWriteAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH DepthWriteAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     M_off,

+ 1 - 1
panda/src/pgraph/fogAttrib.h

@@ -22,7 +22,7 @@
 /**
  * Applies a Fog to the geometry at and below this node.
  */
-class EXPCL_PANDA_PGRAPH FogAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH FogAttrib final : public RenderAttrib {
 private:
   INLINE FogAttrib();
 

+ 1 - 1
panda/src/pgraph/lightAttrib.h

@@ -27,7 +27,7 @@
  * geometry at this level and below.  A LightAttrib can either add lights or
  * remove lights from the total set of "on" lights.
  */
-class EXPCL_PANDA_PGRAPH LightAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH LightAttrib final : public RenderAttrib {
 protected:
   INLINE LightAttrib();
   LightAttrib(const LightAttrib &copy);

+ 1 - 1
panda/src/pgraph/lightRampAttrib.h

@@ -25,7 +25,7 @@ class FactoryParams;
  * a kind of light ramp.  So is HDR tone mapping.  So is cartoon shading.  See
  * the constructors for an explanation of each kind of ramp.
  */
-class EXPCL_PANDA_PGRAPH LightRampAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH LightRampAttrib final : public RenderAttrib {
 private:
   INLINE LightRampAttrib();
 

+ 1 - 1
panda/src/pgraph/logicOpAttrib.h

@@ -27,7 +27,7 @@ class FactoryParams;
  *
  * @since 1.10.0
  */
-class EXPCL_PANDA_PGRAPH LogicOpAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH LogicOpAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Operation {
     O_none,  // LogicOp disabled, regular blending occurs.

+ 1 - 1
panda/src/pgraph/materialAttrib.h

@@ -24,7 +24,7 @@
  * material is used primarily to control lighting effects, and isn't necessary
  * (or useful) in the absence of lighting.
  */
-class EXPCL_PANDA_PGRAPH MaterialAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH MaterialAttrib final : public RenderAttrib {
 private:
   INLINE MaterialAttrib();
 

+ 1 - 1
panda/src/pgraph/renderModeAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
 /**
  * Specifies how polygons are to be drawn.
  */
-class EXPCL_PANDA_PGRAPH RenderModeAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH RenderModeAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     M_unchanged,

+ 1 - 1
panda/src/pgraph/rescaleNormalAttrib.h

@@ -23,7 +23,7 @@ class FactoryParams;
 /**
  * Specifies how polygons are to be drawn.
  */
-class EXPCL_PANDA_PGRAPH RescaleNormalAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH RescaleNormalAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     // No adjustments are made to normals.

+ 1 - 1
panda/src/pgraph/scissorAttrib.h

@@ -33,7 +33,7 @@ class FactoryParams;
  * See ScissorEffect if you wish to define a region relative to 2-D or 3-D
  * coordinates in the scene graph, with culling.
  */
-class EXPCL_PANDA_PGRAPH ScissorAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ScissorAttrib final : public RenderAttrib {
 private:
   ScissorAttrib(const LVecBase4 &frame);
 

+ 1 - 1
panda/src/pgraph/shadeModelAttrib.h

@@ -24,7 +24,7 @@ class FactoryParams;
  * Specifies whether flat shading (per-polygon) or smooth shading (per-vertex)
  * is in effect.
  */
-class EXPCL_PANDA_PGRAPH ShadeModelAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ShadeModelAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     M_flat,

+ 1 - 1
panda/src/pgraph/shaderAttrib.h

@@ -36,7 +36,7 @@
 /**
  *
  */
-class EXPCL_PANDA_PGRAPH ShaderAttrib: public RenderAttrib {
+class EXPCL_PANDA_PGRAPH ShaderAttrib final : public RenderAttrib {
 private:
   INLINE ShaderAttrib();
   INLINE ShaderAttrib(const ShaderAttrib &copy);

+ 1 - 1
panda/src/pgraph/stencilAttrib.h

@@ -25,7 +25,7 @@ class FactoryParams;
  * make or make_2_sided.  To determine if two sided stencil is supported, call
  * the function GraphicsStateGuardian:: get_supports_two_sided_stencil.
  */
-class EXPCL_PANDA_PGRAPH StencilAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH StencilAttrib final : public RenderAttrib {
 
 private:
   StencilAttrib();

+ 1 - 1
panda/src/pgraph/texGenAttrib.h

@@ -29,7 +29,7 @@
  * refraction maps, for instance to make shiny surfaces, as well as other
  * special effects such as projective texturing.
  */
-class EXPCL_PANDA_PGRAPH TexGenAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH TexGenAttrib final : public RenderAttrib {
 PUBLISHED:
   // We inherit the definition of our Mode enumerated type from RenderAttrib.
   // Normally, Mode would be defined here, but we define it in the base class

+ 1 - 1
panda/src/pgraph/texMatrixAttrib.h

@@ -27,7 +27,7 @@ class FactoryParams;
 /**
  * Applies a transform matrix to UV's before they are rendered.
  */
-class EXPCL_PANDA_PGRAPH TexMatrixAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH TexMatrixAttrib final : public RenderAttrib {
 protected:
   INLINE TexMatrixAttrib();
   INLINE TexMatrixAttrib(const TexMatrixAttrib &copy);

+ 1 - 1
panda/src/pgraph/textureAttrib.h

@@ -29,7 +29,7 @@
  * Indicates the set of TextureStages and their associated Textures that
  * should be applied to (or removed from) a node.
  */
-class EXPCL_PANDA_PGRAPH TextureAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH TextureAttrib final : public RenderAttrib {
 protected:
   INLINE TextureAttrib();
   INLINE TextureAttrib(const TextureAttrib &copy);

+ 1 - 1
panda/src/pgraph/transparencyAttrib.h

@@ -28,7 +28,7 @@ class FactoryParams;
  * effect unless you actually want it to be at least partially transparent
  * (and it has alpha components less than 1).
  */
-class EXPCL_PANDA_PGRAPH TransparencyAttrib : public RenderAttrib {
+class EXPCL_PANDA_PGRAPH TransparencyAttrib final : public RenderAttrib {
 PUBLISHED:
   enum Mode {
     // The first two should be specifically 0 and 1, for historical reasons