File tree Expand file tree Collapse file tree 8 files changed +10
-9
lines changed Expand file tree Collapse file tree 8 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ gl_generator = "0.14"
53
53
rental = " 0.5.4"
54
54
cgmath = " 0.17"
55
55
genmesh = " 0.6"
56
- image = " 0.22 "
56
+ image = " 0.23 "
57
57
obj = { version = " 0.9" , features = [" genmesh" ] }
58
58
rand = " 0.7"
59
59
libc = " 0.2.62"
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ fn main() {
19
19
20
20
// building a texture with "OpenGL" drawn on it
21
21
let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../tests/fixture/opengl.png" ) [ ..] ) ,
22
- image:: PNG ) . unwrap ( ) . to_rgba ( ) ;
22
+ image:: ImageFormat :: Png ) . unwrap ( ) . to_rgba ( ) ;
23
23
let image_dimensions = image. dimensions ( ) ;
24
24
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
25
25
let opengl_texture = glium:: Texture2d :: new ( & display, image) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ fn main() {
40
40
let cb = glutin:: ContextBuilder :: new ( ) ;
41
41
let display = glium:: Display :: new ( wb, cb, & event_loop) . unwrap ( ) ;
42
42
43
- let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../tests/fixture/opengl.png" ) [ ..] ) , image:: PNG ) . unwrap ( ) . to_rgba ( ) ;
43
+ let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../tests/fixture/opengl.png" ) [ ..] ) ,
44
+ image:: ImageFormat :: Png ) . unwrap ( ) . to_rgba ( ) ;
44
45
let image_dimensions = image. dimensions ( ) ;
45
46
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
46
47
let opengl_texture = glium:: texture:: Texture2d :: new ( & display, image) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn main() {
16
16
let display = glium:: Display :: new ( wb, cb, & event_loop) . unwrap ( ) ;
17
17
18
18
let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../tests/fixture/opengl.png" ) [ ..] ) ,
19
- image:: PNG ) . unwrap ( ) . to_rgba ( ) ;
19
+ image:: ImageFormat :: Png ) . unwrap ( ) . to_rgba ( ) ;
20
20
let image_dimensions = image. dimensions ( ) ;
21
21
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
22
22
let opengl_texture = glium:: texture:: CompressedSrgbTexture2d :: new ( & display, image) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ fn main() {
22
22
23
23
// building a texture with "OpenGL" drawn on it
24
24
let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../tests/fixture/opengl.png" ) [ ..] ) ,
25
- image:: PNG ) . unwrap ( ) . to_rgba ( ) ;
25
+ image:: ImageFormat :: Png ) . unwrap ( ) . to_rgba ( ) ;
26
26
let image_dimensions = image. dimensions ( ) ;
27
27
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
28
28
let opengl_texture = glium:: texture:: CompressedTexture2d :: new ( & display, image) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ fn main() {
19
19
20
20
// building a texture with "OpenGL" drawn on it
21
21
let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../tests/fixture/opengl.png" ) [ ..] ) ,
22
- image:: PNG ) . unwrap ( ) . to_rgba ( ) ;
22
+ image:: ImageFormat :: Png ) . unwrap ( ) . to_rgba ( ) ;
23
23
let image_dimensions = image. dimensions ( ) ;
24
24
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
25
25
let opengl_texture = glium:: texture:: CompressedSrgbTexture2d :: new ( & display, image) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ fn main() {
14
14
let display = glium:: Display :: new ( wb, cb, & event_loop) . unwrap ( ) ;
15
15
16
16
let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../tests/fixture/opengl.png" ) [ ..] ) ,
17
- image:: PNG ) . unwrap ( ) . to_rgba ( ) ;
17
+ image:: ImageFormat :: Png ) . unwrap ( ) . to_rgba ( ) ;
18
18
let image_dimensions = image. dimensions ( ) ;
19
19
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
20
20
let texture = glium:: texture:: Texture2d :: new ( & display, image) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ fn main() {
31
31
32
32
33
33
let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../book/tuto-14-diffuse.jpg" ) [ ..] ) ,
34
- image:: JPEG ) . unwrap ( ) . to_rgba ( ) ;
34
+ image:: ImageFormat :: Jpeg ) . unwrap ( ) . to_rgba ( ) ;
35
35
let image_dimensions = image. dimensions ( ) ;
36
36
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
37
37
let diffuse_texture = glium:: texture:: SrgbTexture2d :: new ( & display, image) . unwrap ( ) ;
38
38
39
39
let image = image:: load ( Cursor :: new ( & include_bytes ! ( "../book/tuto-14-normal.png" ) [ ..] ) ,
40
- image:: PNG ) . unwrap ( ) . to_rgba ( ) ;
40
+ image:: ImageFormat :: Png ) . unwrap ( ) . to_rgba ( ) ;
41
41
let image_dimensions = image. dimensions ( ) ;
42
42
let image = glium:: texture:: RawImage2d :: from_raw_rgba_reversed ( & image. into_raw ( ) , image_dimensions) ;
43
43
let normal_map = glium:: texture:: Texture2d :: new ( & display, image) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments