diff options
Diffstat (limited to 'source/dw/app/inigfx.rs')
-rw-r--r-- | source/dw/app/inigfx.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/dw/app/inigfx.rs b/source/dw/app/inigfx.rs index d137c5a..ab21245 100644 --- a/source/dw/app/inigfx.rs +++ b/source/dw/app/inigfx.rs @@ -6,7 +6,8 @@ use crate::dw::app::{App, Gfx}; extern crate gl; extern crate glfw; -use gl::load_with; +use gl::{GetUniformLocation, load_with}; +use gl::types::{GLchar, GLint}; use glfw::{Context, FAIL_ON_ERRORS, init, SwapInterval, WindowHint}; use std::ffi::c_void; @@ -31,11 +32,16 @@ impl App { let shdprg = self.getshdprg(); + let uni: GLint = unsafe { + GetUniformLocation(shdprg, b"scl\x00".as_ptr() as *const GLchar) + }; + return Gfx { - evt: evt, - glfw: glfw, - shdprg:shdprg, - win: win, + evt: evt, + glfw: glfw, + shdprg: shdprg, + uni: uni, + win: win, }; } } |