Loading...
Searching...
No Matches
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 <embree4/rtcore.h>
15
16PXR_NAMESPACE_OPEN_SCOPE
17
19
28{
29public:
30 HdEmbreeRenderParam(RTCDevice device, RTCScene scene,
31 HdRenderThread *renderThread,
32 HdEmbreeRenderer *renderer,
33 std::atomic<int> *sceneVersion)
34 : _scene(scene), _device(device)
35 , _renderThread(renderThread), _renderer(renderer), _sceneVersion(sceneVersion)
36 {}
37
40 _renderThread->StopRender();
41 (*_sceneVersion)++;
42 return _scene;
43 }
45 RTCDevice GetEmbreeDevice() { return _device; }
46
47 HdEmbreeRenderer* GetRenderer() { return _renderer; }
48
49private:
51 RTCScene _scene;
53 RTCDevice _device;
55 HdRenderThread *_renderThread;
56 HdEmbreeRenderer* _renderer;
58 std::atomic<int> *_sceneVersion;
59};
60
61PXR_NAMESPACE_CLOSE_SCOPE
62
63#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:28
RTCDevice GetEmbreeDevice()
Accessor for the top-level embree device (library handle).
Definition: renderParam.h:45
RTCScene AcquireSceneForEdit()
Accessor for the top-level embree scene.
Definition: renderParam.h:39
HdEmbreeRenderer implements a renderer on top of Embree's raycasting abilities.
Definition: renderer.h:53
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.