|
7 | 7 | /// |
8 | 8 | /// @brief GR Render Hook and Primitive for VDB PointDataGrid |
9 | 9 |
|
10 | | -#include <UT/UT_Version.h> |
11 | | - |
12 | 10 | #include <openvdb/Grid.h> |
13 | 11 | #include <openvdb/Platform.h> |
14 | 12 | #include <openvdb/Types.h> |
|
39 | 37 | #include <utility> |
40 | 38 | #include <vector> |
41 | 39 |
|
42 | | -#if UT_VERSION_INT < 0x14000000 // Below 20.0, there is no RE_RenderContext |
43 | | -#define RE_RenderContext RE_Render * |
44 | | -#endif |
45 | | - |
46 | 40 | //////////////////////////////////////// |
47 | 41 |
|
48 | 42 | static RE_ShaderHandle theMarkerDecorShader("decor/GL32/point_marker.prog"); |
@@ -119,11 +113,8 @@ class GR_PrimVDBPoints : public GR_Primitive |
119 | 113 |
|
120 | 114 | /// return true if the primitive is in or overlaps the view frustum. |
121 | 115 | /// always returning true will effectively disable frustum culling. |
122 | | - bool inViewFrustum(const UT_Matrix4D &objviewproj |
123 | | -#if (UT_VERSION_INT >= 0x1105014e) // 17.5.334 or later |
124 | | - , const UT_BoundingBoxD *bbox |
125 | | -#endif |
126 | | - ) override; |
| 116 | + bool inViewFrustum(const UT_Matrix4D &objviewproj, |
| 117 | + const UT_BoundingBoxD *bbox) override; |
127 | 118 |
|
128 | 119 | /// Called whenever the primitive is required to render, which may be more |
129 | 120 | /// than one time per viewport redraw (beauty, shadow passes, wireframe-over) |
@@ -589,20 +580,13 @@ GR_PrimVDBPoints::update(RE_RenderContext r, |
589 | 580 | } |
590 | 581 |
|
591 | 582 | bool |
592 | | -GR_PrimVDBPoints::inViewFrustum(const UT_Matrix4D& objviewproj |
593 | | -#if (UT_VERSION_INT >= 0x1105014e) // 17.5.334 or later |
594 | | - , const UT_BoundingBoxD *passed_bbox |
595 | | -#endif |
596 | | - ) |
| 583 | +GR_PrimVDBPoints::inViewFrustum(const UT_Matrix4D& objviewproj, |
| 584 | + const UT_BoundingBoxD *passed_bbox) |
597 | 585 | { |
598 | 586 | const UT_BoundingBoxD bbox( mBbox.min().x(), mBbox.min().y(), mBbox.min().z(), |
599 | 587 | mBbox.max().x(), mBbox.max().y(), mBbox.max().z()); |
600 | | -#if (UT_VERSION_INT >= 0x1105014e) // 17.5.334 or later |
601 | | - return GR_Utils::inViewFrustum(passed_bbox ? *passed_bbox :bbox, |
| 588 | + return GR_Utils::inViewFrustum(passed_bbox ? *passed_bbox : bbox, |
602 | 589 | objviewproj); |
603 | | -#else |
604 | | - return GR_Utils::inViewFrustum(bbox, objviewproj); |
605 | | -#endif |
606 | 590 | } |
607 | 591 |
|
608 | 592 | bool |
|
0 commit comments