diff -r c929e25a7da2 -r ff1432e873bd rust/lib-hedgewars-engine/src/render/map.rs --- a/rust/lib-hedgewars-engine/src/render/map.rs Thu Nov 12 00:24:58 2020 +0300 +++ b/rust/lib-hedgewars-engine/src/render/map.rs Thu Nov 12 23:42:53 2020 +0300 @@ -6,10 +6,12 @@ camera::Camera, gl::{ Buffer, InputElement, InputFormat, InputLayout, PipelineState, Shader, Texture2D, - VariableBinding, + TextureDataType, TextureFilter, TextureFormat, TextureInternalFormat, VariableBinding, }, }; +use std::num::NonZeroU32; + // TODO: temp const VERTEX_SHADER: &'static str = r#" #version 150 @@ -164,7 +166,7 @@ let data = unsafe { &land.as_bytes()[offset..] }; let stride = land.width(); - (data, stride as u32) + (data, NonZeroU32::new(stride as u32)) }; let texture_index = if idx >= self.textures.len() { @@ -172,10 +174,10 @@ data, stride, self.tile_size, - gl::RGBA8, - gl::RGBA, - gl::UNSIGNED_BYTE, - gl::NEAREST, + TextureInternalFormat::Rgba8, + TextureFormat::Rgba, + TextureDataType::UnsignedByte, + TextureFilter::Nearest, ); let texture_index = self.textures.len(); @@ -189,8 +191,8 @@ texture_region, data, stride, - gl::RGBA, - gl::UNSIGNED_BYTE, + TextureFormat::Rgba, + TextureDataType::UnsignedByte, ); idx };