You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: _6_2_cubemaps_environment_mapping.rs
    path of file: ./repos/learn-opengl-rs/src/_4_advanced_opengl
    
    the code of the file until where you have to start completion: #![allow(non_upper_case_globals)]
#![allow(non_snake_case)]

use std::ptr;
use std::mem;
use std::os::raw::c_void;
use std::path::Path;
use std::ffi::CStr;

extern crate glfw;
use self::glfw::Context;

extern crate gl;
use self::gl::types::*;

use cgmath::{Matrix4,  Deg, perspective, Point3};
use cgmath::pr
    
unsafe fn loadCubemap(faces: &[&str]) -> u32 {
    let mut textureID = 0;
    gl::GenTextures(1, &mut textureID);
    gl::BindTexture(gl::TEXTURE_CUBE_MAP, textureID);

    for (i, face) in faces.iter().enumerate() {
        let img = image::open(&Path::new(face)).expect("Cubemap texture failed to load");

        let data = img.raw_pixels();
        gl::TexImage2D(
            gl::TEXTURE_CUBE_MAP_POSITIVE_X + i as u32,
            0, gl::RGB as i32, img.width() as i32, img.height() as i32,
            0, gl::RGB, gl::UNSIGNED_BYTE,
            &data[0] as *const u8 as *const c_void);
    }

    gl::TexParameteri(gl::TEXTURE_CUBE_MAP, gl::TEXTURE_MIN_FILTER, gl::LINEAR as i32);
    gl::TexParameteri(gl::TEXTURE_CUBE_MAP, gl::TEXTURE_MAG_FILTER, gl::LINEAR as i32);
    gl::TexParameteri(gl::TEXTURE_CUBE_MAP, gl::TEXTURE_WRAP_S, gl::CLAMP_TO_EDGE as i32);
    gl::TexParameteri(gl::TEXTURE_CUBE_MAP, gl::TEXTURE_WRAP_T, gl::CLAMP_TO_EDGE as i32);
    gl::TexParameteri(gl::TEXTURE_CUBE_MAP, gl::TEXTURE_WRAP_R, gl::CLAMP_TO_EDGE as i32);

    textureID
}