Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "not supported for rendering" error #4907

Merged

Conversation

AnnaRomanov
Copy link
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.

// glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width, height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, data);
// break;
//}
// default:
Copy link
Collaborator

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 ?

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
Collaborator

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

@@ -1281,6 +1298,11 @@ namespace rs2

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
Collaborator

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 IntelRealSense: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