Fix rendering of Final render for Storm delegate #61

Merged
Bogdan Nagirniak merged 11 commits from BLEN-437 into hydra-render 2023-07-12 23:18:03 +02:00
3 changed files with 8 additions and 9 deletions
Showing only changes of commit 23b65fa7c9 - Show all commits

View File

@ -39,6 +39,7 @@ set(INC
set(INC_SYS
${PYTHON_INCLUDE_DIRS}
${Epoxy_INCLUDE_DIRS}
${USD_INCLUDE_DIRS}
${BOOST_INCLUDE_DIR}
${TBB_INCLUDE_DIR}

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0
* Copyright 2011-2022 Blender Foundation */
#include <pxr/imaging/garch/glApi.h>
#include <epoxy/gl.h>
#include <pxr/imaging/hd/light.h>
#include "BKE_lib_id.h"
@ -155,7 +156,7 @@ void FinalEngineGPU::render(Depsgraph *depsgraph)
}
GPU_framebuffer_clear_color_depth(framebuffer, clear_color, 1.0f);
/* Important: we have to create and bind at least one Vertex Array Object (VAO) before render
/* Important: we have to create and bind at least one Vertex Array Object (VAO) before render
execution: More info at https://open.gl/drawing */
GLuint VAO;
glGenVertexArrays(1, &VAO);

View File

@ -253,14 +253,11 @@ void ViewportEngine::render(Depsgraph *depsgraph, bContext *context)
}
tasks.push_back(render_task_delegate_->get_task());
{
/* Release the GIL before calling into hydra, in case any hydra plugins call into python. */
engine_->Execute(render_index_.get(), &tasks);
engine_->Execute(render_index_.get(), &tasks);
if ((bl_engine_->type->flag & RE_USE_GPU_CONTEXT) == 0) {
draw_texture_.set_buffer(render_task_delegate_->get_renderer_aov(pxr::HdAovTokens->color));
draw_texture_.draw(shader, view_settings.border[0], view_settings.border[1]);
}
if ((bl_engine_->type->flag & RE_USE_GPU_CONTEXT) == 0) {
draw_texture_.set_buffer(render_task_delegate_->get_renderer_aov(pxr::HdAovTokens->color));
draw_texture_.draw(shader, view_settings.border[0], view_settings.border[1]);
}
GPU_shader_unbind();