-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Remove "not supported for rendering" error #4907
Conversation
… on the stream display window instead
common/rendering.h
Outdated
// glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width, height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, data); | ||
// break; | ||
//} | ||
// default: |
There was a problem hiding this comment.
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 ?
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 "; |
There was a problem hiding this comment.
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
common/viewer.cpp
Outdated
@@ -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) |
There was a problem hiding this comment.
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 ?
bef35e1
to
6bb2320
Compare
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.