forked from blender/blender
Hydra tasks refactor #73
@ -54,7 +54,9 @@ void FinalEngine::render(Depsgraph *depsgraph)
|
||||
|
||||
pxr::HdTaskSharedPtrVector tasks;
|
||||
if (light_tasks_delegate_) {
|
||||
if (scene->r.alphamode != R_ALPHAPREMUL) {
|
||||
tasks.push_back(light_tasks_delegate_->skydome_task());
|
||||
}
|
||||
tasks.push_back(light_tasks_delegate_->simple_task());
|
||||
}
|
||||
tasks.push_back(render_task_delegate_->task());
|
||||
|
@ -244,7 +244,7 @@ void GPURenderTaskDelegate::bind()
|
||||
&framebuffer_, {GPU_ATTACHMENT_TEXTURE(tex_depth_), GPU_ATTACHMENT_TEXTURE(tex_color_)});
|
||||
GPU_framebuffer_bind(framebuffer_);
|
||||
|
||||
float clear_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
float clear_color[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
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
|
||||
|
@ -208,9 +208,10 @@ void ViewportEngine::render(Depsgraph * /* depsgraph */)
|
||||
/* Empty function */
|
||||
}
|
||||
|
||||
void ViewportEngine::render(Depsgraph * /* depsgraph */, bContext *context)
|
||||
void ViewportEngine::render(Depsgraph *depsgraph, bContext *context)
|
||||
{
|
||||
ViewSettings view_settings(context);
|
||||
const Scene *scene = DEG_get_evaluated_scene(depsgraph);
|
||||
if (view_settings.width() * view_settings.height() == 0) {
|
||||
return;
|
||||
};
|
||||
@ -236,7 +237,9 @@ void ViewportEngine::render(Depsgraph * /* depsgraph */, bContext *context)
|
||||
|
||||
pxr::HdTaskSharedPtrVector tasks;
|
||||
if (light_tasks_delegate_) {
|
||||
if (scene->r.alphamode != R_ALPHAPREMUL) {
|
||||
tasks.push_back(light_tasks_delegate_->skydome_task());
|
||||
}
|
||||
tasks.push_back(light_tasks_delegate_->simple_task());
|
||||
}
|
||||
tasks.push_back(render_task_delegate_->task());
|
||||
|
Loading…
Reference in New Issue
Block a user