- About 70% of materials covered after 2nd midterm
- About 30% of materials covered before 2nd midterm
- Exact execution steps
- Worst-case time complexities
- Graphs and graph traversal
| #[cfg(test)] | |
| mod tests { | |
| use super::*; | |
| use data_encoding::HEXUPPER; | |
| #[test] | |
| fn properly_deserializes_message() { | |
| let message_raw = Bytes::from(HEXUPPER.decode(b"5243050501020000FF").unwrap()); | |
| let mut buf = BytesMut::from(message_raw.clone()); | |
| let header_bytes = buf.split_to(8); |
| extern crate ggez; | |
| use ggez::*; | |
| use ggez::graphics::{DrawMode, Point}; | |
| use std::time::Duration; | |
| struct MainState { | |
| imagebuffer: Vec<u8>, // represents an image, groupings of 4 values (R,G,B,A) representing one pixel. | |
| width: usize, | |
| height: usize, | |
| i: u8, |
| Finished dev [unoptimized + debuginfo] target(s) in 0.76s | |
| Running target/debug/deps/amethyst_gl_segfault-2eaa6ccbeb2b8746 | |
| running 1 test | |
| test tests::segfault ... FAILED | |
| failures: | |
| ---- tests::segfault stdout ---- | |
| thread 'tests::segfault' panicked at 'Windows can only be created on the main thread on macOS', /Users/gray/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.15.1/src/platform/macos/window.rs:576:17 |
| enum Format { | |
| Float32, | |
| Float32x2, | |
| Float32x3, | |
| Float32x4, | |
| Uint16, | |
| Uint32, | |
| } | |
| struct VertexAttribDesc { |
| enum BufferUsage { | |
| Uniform, | |
| Vertex, | |
| Index, | |
| } | |
| enum Format { | |
| R64Float, | |
| Rg64Float, | |
| Rgb64Float, |
| float f0 = f0_from_ref_idx(ref_idx); | |
| float fresnel = schlick(saturate(cosine), f0); | |
| if(refract(r_in.direction(), outward_normal, ni_over_nt, refracted)) { | |
| reflect_prob = fresnel; | |
| } | |
| else { | |
| reflect_prob = 1.0; | |
| } |
| Finished dev [unoptimized + debuginfo] target(s) in 0.30s | |
| Running `C:\Users\Gray\Code\rendy\target\debug\examples\quads.exe` | |
| WARN 2018-12-05T08:27:25Z: gfx_backend_vulkan: Unable to find extension: VK_KHR_xlib_surface | |
| WARN 2018-12-05T08:27:25Z: gfx_backend_vulkan: Unable to find extension: VK_KHR_xcb_surface | |
| WARN 2018-12-05T08:27:25Z: gfx_backend_vulkan: Unable to find extension: VK_KHR_wayland_surface | |
| WARN 2018-12-05T08:27:25Z: gfx_backend_vulkan: Unable to find extension: VK_KHR_mir_surface | |
| WARN 2018-12-05T08:27:25Z: gfx_backend_vulkan: Unable to find extension: VK_KHR_android_surface | |
| INFO 2018-12-05T08:27:25Z: rendy_factory::factory: Physical devices: | |
| [ | |
| AdapterInfo { |
| warning: failed to automatically apply fixes suggested by rustc to crate `rendy_wsi` | |
| after fixes were automatically applied the compiler reported errors within these files: | |
| * wsi\src\lib.rs | |
| This likely indicates a bug in either rustc or cargo itself, | |
| and we would appreciate a bug report! You're likely to see | |
| a number of compiler warnings after this message which cargo | |
| attempted to fix but failed. If you could open an issue at |