File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ fn main() {
107107 ] ;
108108
109109 // A square is rendered as two triangles (see indices)
110- // SAFETY: core::mem::offset_of makes sure the offsets are right.
110+ // SAFETY: core::mem::offset_of makes sure the offsets are right and alignment is respected .
111111 unsafe {
112112 canvas. render_geometry_raw (
113113 & vertices,
@@ -121,7 +121,7 @@ fn main() {
121121 . expect ( "render_geometry_raw failed (probably unsupported, see error message)" ) ;
122122
123123 // Parameters can be reused, here only the positions are swapped out for new ones.
124- // SAFETY: core::mem::offset_of makes sure the offsets are right.
124+ // SAFETY: core::mem::offset_of makes sure the offsets are right and alignment is respected .
125125 // The offset 0 is correct because the element type of positions is `[f32; 2]`.
126126 unsafe {
127127 canvas. render_geometry_raw (
You can’t perform that action at this time.
0 commit comments