forked from blender/blender
Rename some functions #25
@ -274,6 +274,4 @@ pxr::GfCamera CameraData::gf_camera(pxr::GfVec4f tile)
|
||||
return gf_camera;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace blender::render::hydra
|
||||
|
@ -196,13 +196,8 @@ void FinalEngineGL::render(Depsgraph *depsgraph)
|
||||
std::vector<float> &pixels = render_images["Combined"];
|
||||
|
||||
GPUFrameBuffer *framebuffer = GPU_framebuffer_create("fbHydraRenderFinal");
|
||||
GPUTexture *texture = GPU_texture_create_2d("texHydraRenderFinal",
|
||||
res[0],
|
||||
res[1],
|
||||
1,
|
||||
GPU_RGBA32F,
|
||||
GPU_TEXTURE_USAGE_GENERAL,
|
||||
nullptr);
|
||||
GPUTexture *texture = GPU_texture_create_2d(
|
||||
"texHydraRenderFinal", res[0], res[1], 1, GPU_RGBA32F, GPU_TEXTURE_USAGE_GENERAL, nullptr);
|
||||
GPU_texture_filter_mode(texture, true);
|
||||
GPU_texture_mipmap_mode(texture, true, true);
|
||||
GPU_framebuffer_texture_attach(framebuffer, texture, 0, 0);
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
#include "BLI_timer.h"
|
||||
#include "camera.h"
|
||||
#include "preview_engine.h"
|
||||
#include "BLI_timer.h"
|
||||
|
||||
namespace blender::render::hydra {
|
||||
|
||||
@ -13,7 +13,8 @@ const double LIFETIME = 180.0;
|
||||
|
||||
std::unique_ptr<PreviewEngine> PreviewEngine::instance_;
|
||||
|
||||
PreviewEngine *PreviewEngine::get_instance(RenderEngine *bl_engine, const std::string &render_delegate_id)
|
||||
PreviewEngine *PreviewEngine::get_instance(RenderEngine *bl_engine,
|
||||
const std::string &render_delegate_id)
|
||||
{
|
||||
if (!instance_) {
|
||||
instance_ = std::make_unique<PreviewEngine>(bl_engine, render_delegate_id);
|
||||
@ -75,7 +76,8 @@ void PreviewEngine::render(Depsgraph *depsgraph)
|
||||
}
|
||||
tasks.push_back(render_task_delegate_->get_task());
|
||||
|
||||
std::vector<float> pixels = std::vector<float>(res[0] * res[1] * 4); /* 4 - number of channels. */
|
||||
std::vector<float> pixels = std::vector<float>(res[0] * res[1] *
|
||||
4); /* 4 - number of channels. */
|
||||
|
||||
{
|
||||
/* Release the GIL before calling into hydra, in case any hydra plugins call into python. */
|
||||
@ -112,7 +114,6 @@ double PreviewEngine::free_instance(uintptr_t uuid, void *user_data)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void PreviewEngine::update(RenderEngine *bl_engine, const std::string &render_delegate_id)
|
||||
{
|
||||
this->bl_engine_ = bl_engine;
|
||||
|
@ -30,7 +30,6 @@ class PreviewEngine : public FinalEngine {
|
||||
int width,
|
||||
int height,
|
||||
std::vector<float> &pixels);
|
||||
|
||||
};
|
||||
|
||||
} // namespace blender::render::hydra
|
||||
|
@ -172,7 +172,8 @@ bool InstancerData::set_instances()
|
||||
ID *prev_id = id_;
|
||||
id_ = nullptr;
|
||||
transforms_.clear();
|
||||
ListBase *lb = object_duplilist(scene_delegate_->depsgraph_, scene_delegate_->scene_, parent_obj_);
|
||||
ListBase *lb = object_duplilist(
|
||||
scene_delegate_->depsgraph_, scene_delegate_->scene_, parent_obj_);
|
||||
LISTBASE_FOREACH (DupliObject *, dupli, lb) {
|
||||
if (!id_) {
|
||||
/* TODO: We create instances only for object in first dupli.
|
||||
|
@ -27,7 +27,8 @@ class InstancerData : public MeshData {
|
||||
pxr::GfMatrix4d get_transform() override;
|
||||
bool update_visibility(View3D *view3d) override;
|
||||
|
||||
pxr::HdPrimvarDescriptorVector get_instancer_primvar_descriptors(pxr::HdInterpolation interpolation);
|
||||
pxr::HdPrimvarDescriptorVector get_instancer_primvar_descriptors(
|
||||
pxr::HdInterpolation interpolation);
|
||||
pxr::VtIntArray get_instance_indices();
|
||||
bool is_base(Object *object) const;
|
||||
|
||||
|
@ -131,7 +131,8 @@ pxr::VtValue MaterialData::get_material_resource()
|
||||
pxr::TfTokenVector render_contexts = render_delegate->GetMaterialRenderContexts();
|
||||
|
||||
pxr::HdMaterialNetworkMap network_map;
|
||||
hdmtlx_convert_to_materialnetworkmap(path, shader_source_types, render_contexts, &network_map);
|
||||
hdmtlx_convert_to_materialnetworkmap(
|
||||
path, shader_source_types, render_contexts, &network_map);
|
||||
|
||||
material_network_map_ = network_map;
|
||||
}
|
||||
|
@ -134,7 +134,8 @@ pxr::HdMeshTopology MeshData::get_mesh_topology()
|
||||
face_vertex_indices_);
|
||||
}
|
||||
|
||||
pxr::HdPrimvarDescriptorVector MeshData::get_primvar_descriptors(pxr::HdInterpolation interpolation)
|
||||
pxr::HdPrimvarDescriptorVector MeshData::get_primvar_descriptors(
|
||||
pxr::HdInterpolation interpolation)
|
||||
{
|
||||
pxr::HdPrimvarDescriptorVector primvars;
|
||||
if (interpolation == pxr::HdInterpolationVertex) {
|
||||
|
Loading…
Reference in New Issue
Block a user