Browse Source

compile_to_render_packets logs vm.debug_str

Inderjit Gill 2 weeks ago
parent
commit
314b2b5bfb
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      client/sen-client/src/lib.rs

+ 7
- 2
client/sen-client/src/lib.rs View File

@@ -123,11 +123,16 @@ impl Bridge {
123 123
     }
124 124
 
125 125
     pub fn compile_to_render_packets(&mut self) -> i32 {
126
-        if let Ok(res) = sen_core::compile_to_render_packets(&mut self.vm, &self.source_buffer) {
126
+        let num_render_packets = if let Ok(res) = sen_core::compile_to_render_packets(&mut self.vm, &self.source_buffer) {
127 127
             res
128 128
         } else {
129 129
             0
130
-        }
130
+        };
131
+
132
+        log(&self.vm.debug_str);
133
+        self.vm.debug_str_clear();
134
+
135
+        num_render_packets
131 136
     }
132 137
 
133 138
     pub fn get_render_packet_geo_len(&self, packet_number: usize) -> usize {