Add scene setting to export through either Hydra or USD, for debugging #65

Merged
Brecht Van Lommel merged 7 commits from brecht/blender:hydra-usd-export into hydra-render 2023-07-14 19:41:17 +02:00
Showing only changes of commit cb55530e66 - Show all commits

View File

@ -147,15 +147,7 @@ void FinalEngineGPU::render(Depsgraph *depsgraph)
GPU_framebuffer_bind(framebuffer);
float clear_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
pxr::VtValue world_color = scene_delegate_->GetLightParamValue(
scene_delegate_->GetDelegateID().AppendElementString("World"), pxr::HdLightTokens->color);
if (!world_color.IsEmpty()) {
auto &c = world_color.Get<pxr::GfVec3f>();
clear_color[0] = c[0];
clear_color[1] = c[1];
clear_color[2] = c[2];
}
const 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