more ImageProxy usage

This commit is contained in:
Brandon Thomas committed 2020-08-15 23:22:17 -04:00
1 parent 50f5689330
commit 87d4a19aee
3 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -325,7 +325,7 @@ impl GpuPointCloudConverter {
/// Set the XY table that will be used by future calls to Convert(). Get an XY table by calling
/// GenerateXyTable().
pub fn set_active_xy_table(&mut self, xy_table: &k4a_sys_wrapper::Image) -> Result<()> {
pub fn set_active_xy_table(&mut self, xy_table: &ImageProxy) -> Result<()> {
let width = xy_table.get_width_pixels() as i32;
let height = xy_table.get_height_pixels() as i32;
-1
View File
@@ -17,7 +17,6 @@ use gl::types::*;
use gl;
use gui::mouse_camera_arcball::MouseCameraArcball;
use kinect::k4a_sys_wrapper;
use opengl::compile_shader::compile_shader;
use opengl::opengl_wrapper::Texture;
use opengl::opengl_wrapper::{Buffer, gl_get_error, OpenGlError, VertexArray};
+6 -5
View File
@@ -126,8 +126,8 @@ pub struct PointCloudVisualizer {
/// Format is XYZA, where A (the alpha channel) is unused.
pub xyz_textures: Vec<Texture>,
color_xy_tables: Vec<Image>,
depth_xy_tables: Vec<Image>,
color_xy_tables: Vec<ImageProxy>,
depth_xy_tables: Vec<ImageProxy>,
/// Near and far minima/maxima for the current depth sensor mode.
depth_value_range: ValueRange,
@@ -205,8 +205,8 @@ impl PointCloudVisualizer {
k4a_sys::k4a_calibration_type_t_K4A_CALIBRATION_TYPE_DEPTH,
).unwrap();
color_xy_tables.push(color_xy_table);
depth_xy_tables.push(depth_xy_table);
color_xy_tables.push(ImageProxy::consume_k4a_image(color_xy_table));
depth_xy_tables.push(ImageProxy::consume_k4a_image(depth_xy_table));
}
let mut debug_static_color_frames = Vec::new();
@@ -524,7 +524,8 @@ impl PointCloudVisualizer {
}
for point_cloud_converter in self.point_cloud_converters.iter_mut() {
point_cloud_converter.set_active_xy_table(&self.depth_xy_tables.get(camera_index).unwrap())?; // TODO: TEMP MULTI-CAMERA SUPPORT
let xy_table = self.depth_xy_tables.get(camera_index).unwrap();
point_cloud_converter.set_active_xy_table(&xy_table)?;
}
}