Skip to content

Commit

Permalink
quick fix for native stream error
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzeng committed Apr 21, 2017
1 parent b47bd3d commit c9e94a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions realsense-standalone/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ int main(int argc, char * argv[]) try {
glOrtho(0, win_width, win_height, 0, -1, +1);
int s = win_width / (rs_dev.is_stream_enabled(rs::stream::infrared2) ? 3 : 2);
texture_buffers[0].show(rs_dev, rs::stream::color, 0, 0, s, win_height - win_height / 2);
texture_buffers[1].show(rs_dev, rs::stream::color, s, 0, s, win_height - win_height / 2);
texture_buffers[2].show(rs_dev, rs::stream::depth, 0, win_height / 2, s, win_height - win_height / 2);
texture_buffers[1].show(rs_dev, rs::stream::color_aligned_to_depth, s, 0, s, win_height - win_height / 2);
texture_buffers[2].show(rs_dev, rs::stream::depth_aligned_to_color, 0, win_height / 2, s, win_height - win_height / 2);
texture_buffers[3].show(rs_dev, rs::stream::depth, s, win_height / 2, s, win_height - win_height / 2);
if (rs_dev.is_stream_enabled(rs::stream::infrared2)) {
texture_buffers[4].show(rs_dev, rs::stream::infrared2, 2 * s, 0, s, win_height - win_height / 2);
texture_buffers[5].show(rs_dev, rs::stream::infrared2, 2 * s, win_height / 2, s, win_height - win_height / 2);
texture_buffers[4].show(rs_dev, rs::stream::infrared2_aligned_to_depth, 2 * s, 0, s, win_height - win_height / 2);
texture_buffers[5].show(rs_dev, rs::stream::depth_aligned_to_infrared2, 2 * s, win_height / 2, s, win_height - win_height / 2);
}
glPopMatrix();
glfwSwapBuffers(win);
Expand Down
4 changes: 2 additions & 2 deletions realsense-standalone/third_party/display.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class texture_buffer

void upload(rs::device & dev, rs::stream stream)
{
assert(dev.is_stream_enabled(stream));
// assert(dev.is_stream_enabled(stream));

const int timestamp = dev.get_frame_timestamp(stream);
if(timestamp != last_timestamp)
Expand Down Expand Up @@ -158,7 +158,7 @@ class texture_buffer

void show(rs::device & dev, rs::stream stream, int rx, int ry, int rw, int rh)
{
if(!dev.is_stream_enabled(stream)) return;
// if(!dev.is_stream_enabled(stream)) return;

upload(dev, stream);

Expand Down

0 comments on commit c9e94a8

Please sign in to comment.