Implement Viewport render with material preview #56

Merged
Bogdan Nagirniak merged 22 commits from BLEN-421 into hydra-render 2023-06-30 09:03:28 +02:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 8ad1e29adb - Show all commits

View File

@ -39,7 +39,9 @@ void PreviewEngine::update_render_result(std::vector<float> &pixels)
RenderLayer *layer = (RenderLayer *)result->layers.first; RenderLayer *layer = (RenderLayer *)result->layers.first;
RenderPass *pass = (RenderPass *)layer->passes.first; RenderPass *pass = (RenderPass *)layer->passes.first;
memcpy(pass->buffer.data, pixels.data(), sizeof(float) * pass->rectx * pass->recty * pass->channels); memcpy(pass->buffer.data,
pixels.data(),
sizeof(float) * pass->rectx * pass->recty * pass->channels);
RE_engine_end_result(bl_engine_, result, false, false, false); RE_engine_end_result(bl_engine_, result, false, false, false);
} }

View File

@ -15,8 +15,8 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
BogdanNagirniak marked this conversation as resolved Outdated

shouldn't be needed

shouldn't be needed
#include "BKE_node.h" #include "BKE_node.h"
#include "BKE_studiolight.h"
#include "BKE_node_runtime.hh" #include "BKE_node_runtime.hh"
#include "BKE_studiolight.h"
#include "BLI_math_rotation.h" #include "BLI_math_rotation.h"
#include "BLI_path_util.h" #include "BLI_path_util.h"
#include "NOD_shader.h" #include "NOD_shader.h"