forked from blender/blender
Hydra code cleanup #81
@ -15,13 +15,13 @@ LightTasksDelegate::LightTasksDelegate(pxr::HdRenderIndex *parent_index,
|
||||
skydome_task_id_ = GetDelegateID().AppendElementString("skydomeTask");
|
||||
GetRenderIndex().InsertTask<pxr::HdxSkydomeTask>(this, skydome_task_id_);
|
||||
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 1, "%s", simple_task_id_.GetText());
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 1, "%s", skydome_task_id_.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 1, "%s", simple_task_id_.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 1, "%s", skydome_task_id_.GetText());
|
||||
}
|
||||
|
||||
pxr::VtValue LightTasksDelegate::Get(pxr::SdfPath const &id, pxr::TfToken const &key)
|
||||
{
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 3, "%s, %s", id.GetText(), key.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 3, "%s, %s", id.GetText(), key.GetText());
|
||||
|
||||
if (key == pxr::HdTokens->params) {
|
||||
if (id == simple_task_id_) {
|
||||
|
@ -28,12 +28,12 @@ RenderTaskDelegate::RenderTaskDelegate(pxr::HdRenderIndex *parent_index,
|
||||
task_params_.enableLighting = true;
|
||||
task_params_.alphaThreshold = 0.1f;
|
||||
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 1, "%s", task_id_.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 1, "%s", task_id_.GetText());
|
||||
}
|
||||
|
||||
pxr::VtValue RenderTaskDelegate::Get(pxr::SdfPath const &id, pxr::TfToken const &key)
|
||||
{
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 3, "%s, %s", id.GetText(), key.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 3, "%s, %s", id.GetText(), key.GetText());
|
||||
|
||||
if (key == pxr::HdTokens->params) {
|
||||
return pxr::VtValue(task_params_);
|
||||
@ -47,14 +47,14 @@ pxr::VtValue RenderTaskDelegate::Get(pxr::SdfPath const &id, pxr::TfToken const
|
||||
|
||||
pxr::TfTokenVector RenderTaskDelegate::GetTaskRenderTags(pxr::SdfPath const &id)
|
||||
{
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 3, "%s", id.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 3, "%s", id.GetText());
|
||||
|
||||
return {pxr::HdRenderTagTokens->geometry};
|
||||
}
|
||||
|
||||
pxr::HdRenderBufferDescriptor RenderTaskDelegate::GetRenderBufferDescriptor(pxr::SdfPath const &id)
|
||||
{
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 3, "%s", id.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 3, "%s", id.GetText());
|
||||
|
||||
return buffer_descriptors_[id];
|
||||
}
|
||||
@ -124,7 +124,7 @@ void RenderTaskDelegate::add_aov(pxr::TfToken const &aov_key)
|
||||
task_params_.aovBindings.push_back(binding);
|
||||
render_index.GetChangeTracker().MarkTaskDirty(task_id_, pxr::HdChangeTracker::DirtyParams);
|
||||
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 1, "%s", aov_key.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 1, "%s", aov_key.GetText());
|
||||
}
|
||||
|
||||
void RenderTaskDelegate::read_aov(pxr::TfToken const &aov_key, void *data)
|
||||
@ -225,7 +225,7 @@ void GPURenderTaskDelegate::add_aov(pxr::TfToken const &aov_key)
|
||||
GPU_TEXTURE_USAGE_GENERAL,
|
||||
nullptr);
|
||||
|
||||
CLOG_INFO(LOG_RENDER_HYDRA, 1, "%s", aov_key.GetText());
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 1, "%s", aov_key.GetText());
|
||||
}
|
||||
|
||||
void GPURenderTaskDelegate::read_aov(pxr::TfToken const &aov_key, void *data)
|
||||
@ -289,6 +289,7 @@ void GPURenderTaskDelegate::bind()
|
||||
glGenVertexArrays(1, &VAO_);
|
||||
glBindVertexArray(VAO_);
|
||||
}
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 3, "");
|
||||
}
|
||||
|
||||
void GPURenderTaskDelegate::unbind()
|
||||
@ -301,6 +302,7 @@ void GPURenderTaskDelegate::unbind()
|
||||
GPU_framebuffer_free(framebuffer_);
|
||||
framebuffer_ = nullptr;
|
||||
}
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 3, "");
|
||||
}
|
||||
|
||||
GPUTexture *GPURenderTaskDelegate::aov_texture(pxr::TfToken const &aov_key)
|
||||
|
Loading…
Reference in New Issue
Block a user