Skip to content

Remove "not supported for rendering" error - #4907

Merged
dorodnic merged 2 commits into
realsenseai:developmentfrom
AnnaRomanov:unsopported_rendering_error
Oct 23, 2019
Merged

Remove "not supported for rendering" error#4907
dorodnic merged 2 commits into
realsenseai:developmentfrom
AnnaRomanov:unsopported_rendering_error

Conversation

@AnnaRomanov

Copy link
Copy Markdown
Contributor

When streaming a format that is not supported for rendering, instead of throwing error notifications, show message that rendering is not supported in the stream view.

Comment thread common/rendering.h Outdated
// glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width, height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, data);
// break;
//}
// default:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving the switch case without default must be avoided.
There should be some way to report this error without compromising the handling loop.
Is it possible to refactor the report string into the default case ?

Comment thread common/viewer.cpp Outdated
ImGui::SetCursorScreenPos({ min_x + max_x / 2.f - 200, min_y + max_y / 2.f - 20 });

ImGui::PushStyleColor(ImGuiCol_Text, sensor_header_light_blue);
std::string text = to_string() << textual_icons::exclamation_triangle << " The requested format is not supported for rendering ";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add format name to the message

Comment thread common/viewer.cpp Outdated
stream_mv.show_stream_header(font1, stream_rect, *this);
stream_mv.show_stream_footer(font1, stream_rect, mouse, *this);

if (stream_mv.profile.format() == RS2_FORMAT_RAW10 || stream_mv.profile.format() == RS2_FORMAT_RAW16)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be invoked ifrom within ::upload(... call ?

@AnnaRomanov
AnnaRomanov force-pushed the unsopported_rendering_error branch from bef35e1 to 6bb2320 Compare September 24, 2019 14:32
@dorodnic
dorodnic merged commit 4fdc1f2 into realsenseai:development Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants