From 7016e82bed7e289b4ecce8dbfe904e7a53f00311 Mon Sep 17 00:00:00 2001 From: Christian Meissl Date: Thu, 13 May 2021 13:20:40 +0200 Subject: [PATCH] replace hardcoded type casts... ...with platform types in the gles2 renderer --- src/backend/renderer/gles2/mod.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/backend/renderer/gles2/mod.rs b/src/backend/renderer/gles2/mod.rs index 9548fa6..0aa3822 100644 --- a/src/backend/renderer/gles2/mod.rs +++ b/src/backend/renderer/gles2/mod.rs @@ -1,6 +1,6 @@ //! Implementation of the rendering traits using OpenGL ES 2 -use std::collections::HashSet; +use std::{collections::HashSet, os::raw::c_char}; use std::fmt; use std::ffi::CStr; use std::ptr; @@ -189,7 +189,7 @@ unsafe fn compile_shader( gl.ShaderSource( shader, 1, - &src.as_ptr() as *const *const u8 as *const *const i8, + &src.as_ptr() as *const *const u8 as *const *const ffi::types::GLchar, &(src.len() as i32) as *const _, ); gl.CompileShader(shader); @@ -242,12 +242,12 @@ unsafe fn texture_program(gl: &ffi::Gles2, frag: &'static str) -> Result