blender/intern/cycles/hydra/pointcloud.h
Brecht Van Lommel 51977de03a Cycles: Hydra: Change render delegate to use Hydra 2.0 API
The 1.0 API is deprecated (though not yet removed) in OpenUSD 26.xx
releases. So it's time to migrate.

Use of the HdSceneDelegate is mostly removed, except for retrieving the
prims. Specific properties of prims are retrieved through schemas rather
than querying the scene delegate.

The full replacement of HdSceneDelegate is still ongoing in USD itself.
In the very latest 26.05 only HdPrman has an experimental option for
using the scene index directly, but for example HdStorm does not use it
yet. So removing it's use with the current 25.08 in Blender is not
expected to be stable enough.

Additionally HdRenderer is supposed to replace HdRenderDelegate and its
handling of tasks. However even in 26.05 that is only a stub
implementation so there is no actual alternative to migrate to.

Note that OpenUSD provides a compatibility layer so 1.0 and 2.0 hosts and
render delegates can work together. Which means ideally everything keeps
working the same, but there are likely some differences anyway. Support for
OpenUSD version 23.xx and older was dropped.

Pull Request: https://projects.blender.org/blender/blender/pulls/158456
2026-05-27 15:56:20 +02:00

35 lines
999 B
C++

/* SPDX-FileCopyrightText: 2022 NVIDIA Corporation
* SPDX-FileCopyrightText: 2022 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#pragma once
#include "hydra/config.h"
#include "hydra/geometry.h"
#include <pxr/imaging/hd/points.h>
HDCYCLES_NAMESPACE_OPEN_SCOPE
class HdCyclesPoints final : public HdCyclesGeometry<PXR_NS::HdPoints, CCL_NS::PointCloud> {
public:
HdCyclesPoints(const PXR_NS::SdfPath &rprimId);
~HdCyclesPoints() override;
PXR_NS::HdDirtyBits GetInitialDirtyBitsMask() const override;
private:
PXR_NS::HdDirtyBits _PropagateDirtyBits(PXR_NS::HdDirtyBits bits) const override;
void Populate(PXR_NS::HdSceneDelegate *sceneDelegate,
PXR_NS::HdDirtyBits dirtyBits,
bool &rebuild) override;
void PopulatePoints(PXR_NS::HdSceneDelegate *sceneDelegate);
void PopulateWidths(PXR_NS::HdSceneDelegate *sceneDelegate);
void PopulatePrimvars(PXR_NS::HdSceneDelegate *sceneDelegate);
};
HDCYCLES_NAMESPACE_CLOSE_SCOPE