This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
renderParam.h
1//
2// Copyright 2017 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_PARAM_H
8#define PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_PARAM_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/renderDelegate.h"
12#include "pxr/imaging/hd/renderThread.h"
13
14#include <embree3/rtcore.h>
15
16PXR_NAMESPACE_OPEN_SCOPE
17
26{
27public:
28 HdEmbreeRenderParam(RTCDevice device, RTCScene scene,
29 HdRenderThread *renderThread,
30 std::atomic<int> *sceneVersion)
31 : _scene(scene), _device(device)
32 , _renderThread(renderThread), _sceneVersion(sceneVersion)
33 {}
34
37 _renderThread->StopRender();
38 (*_sceneVersion)++;
39 return _scene;
40 }
42 RTCDevice GetEmbreeDevice() { return _device; }
43
44private:
46 RTCScene _scene;
48 RTCDevice _device;
50 HdRenderThread *_renderThread;
52 std::atomic<int> *_sceneVersion;
53};
54
55PXR_NAMESPACE_CLOSE_SCOPE
56
57#endif // PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_PARAM_H
The render delegate can create an object of type HdRenderParam, to pass to each prim during Sync().
Definition: renderParam.h:26
RTCDevice GetEmbreeDevice()
Accessor for the top-level embree device (library handle).
Definition: renderParam.h:42
RTCScene AcquireSceneForEdit()
Accessor for the top-level embree scene.
Definition: renderParam.h:36
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
HdRenderThread is a utility that specific render delegates can choose to use depending on their needs...
Definition: renderThread.h:129
HD_API void StopRender()
Ask the render thread to stop rendering, and block until the render thread is idle.