new commit for Porting to Glow
parent
72ac25ea9d
commit
93217e1a66
|
@ -11,5 +11,6 @@ image = "0.24.5"
|
|||
gl = "0.14.0"
|
||||
cgmath = "0.18.0"
|
||||
tobj = "2.0.0"
|
||||
glow = "0.12.1"
|
||||
[dependencies.glfw]
|
||||
version = "*"
|
||||
|
|
|
@ -7,6 +7,7 @@ const SCR_WIDTH: u32 = 1600;
|
|||
const SCR_HEIGHT: u32 = 900;
|
||||
const TITLE: &str = "GLFWtest";
|
||||
|
||||
use glow;
|
||||
|
||||
use std::sync::mpsc::Receiver;
|
||||
use std::ptr;
|
||||
|
@ -54,7 +55,9 @@ fn main() {
|
|||
let mut deltaTime: f32; // time between current frame and last frame
|
||||
let mut lastFrame: f32 = 0.0;
|
||||
|
||||
gl::load_with(|ptr| window.get_proc_address(ptr) as *const _);
|
||||
//gl::load_with(|ptr| window.get_proc_address(ptr) as *const _);
|
||||
let gl = unsafe{glow::Context::from_loader_function(|s| window.get_proc_address(s) as *const _);};
|
||||
|
||||
|
||||
let (ourshader, ourModel) = unsafe {
|
||||
gl::Enable(gl::DEPTH_TEST);
|
||||
|
@ -81,8 +84,7 @@ fn main() {
|
|||
|
||||
unsafe {
|
||||
gl::Enable(gl::DEPTH_TEST);
|
||||
gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT | gl::STENCIL_BUFFER_BIT);
|
||||
gl::ClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT);
|
||||
|
||||
// outline
|
||||
|
||||
|
|
Loading…
Reference in New Issue