Get into a runnable state
This commit is contained in:
parent
e9631f044d
commit
479ba4f03e
File diff suppressed because it is too large
Load Diff
26
Cargo.toml
26
Cargo.toml
|
@ -5,19 +5,19 @@ authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>" ]
|
|||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
glutin = "0.3.7"
|
||||
byteorder = "0.3.13"
|
||||
hyper = "0.6.13"
|
||||
serde = "0.6.0"
|
||||
serde_json = "0.6.0"
|
||||
flate2 = "0.2.9"
|
||||
zip = "0.1.12"
|
||||
image = "0.3.12"
|
||||
time = "0.1.32"
|
||||
rand = "0.3.11"
|
||||
rustc-serialize = "0.3"
|
||||
log = "0.3.2"
|
||||
cgmath = "0.3.1"
|
||||
glutin = "0.4.9"
|
||||
byteorder = "0.5.0"
|
||||
hyper = "0.8.0"
|
||||
serde = "0.7.0"
|
||||
serde_json = "0.7.0"
|
||||
flate2 = "0.2.13"
|
||||
zip = "0.1.16"
|
||||
image = "0.7.0"
|
||||
time = "0.1.34"
|
||||
rand = "0.3.14"
|
||||
rustc-serialize = "0.3.18"
|
||||
log = "0.3.5"
|
||||
cgmath = "0.7.0"
|
||||
|
||||
[dependencies.steven_gl]
|
||||
path = "./gl"
|
||||
|
|
|
@ -2,58 +2,49 @@
|
|||
name = "steven_gl"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "gl_common"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gl_generator"
|
||||
version = "0.1.0"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xml-rs 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "khronos_api"
|
||||
version = "0.0.8"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.1.10"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.3.2"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
version = "0.1.26"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
|
@ -5,9 +5,8 @@ authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>" ]
|
|||
build = "build.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gl_generator = "0.1.0"
|
||||
khronos_api = "0.0.8"
|
||||
gl_generator = "0.4.2"
|
||||
khronos_api = "1.0.0"
|
||||
|
||||
[dependencies]
|
||||
gl_common = "0.1.0"
|
||||
libc = "*"
|
||||
libc = "0.2"
|
||||
|
|
|
@ -4,5 +4,5 @@ version = "0.0.1"
|
|||
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>" ]
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
openssl-sys = "0.6.5"
|
||||
libc = "0.2"
|
||||
openssl-sys = "0.7.6"
|
||||
|
|
|
@ -23,7 +23,7 @@ use std::ops::{Deref, DerefMut};
|
|||
|
||||
/// Inits the gl library. This should be called once a context is ready.
|
||||
pub fn init(window: &mut glutin::Window) {
|
||||
gl::load_with(|s| window.get_proc_address(s));
|
||||
gl::load_with(|s| window.get_proc_address(s) as *const _);
|
||||
}
|
||||
|
||||
/// Dsed to specify how the vertices will be handled
|
||||
|
@ -594,7 +594,7 @@ impl Buffer {
|
|||
pub fn set_data(&self, target: BufferTarget, data: &[u8], usage: BufferUsage) {
|
||||
unsafe {
|
||||
gl::BufferData(target,
|
||||
data.len() as i64,
|
||||
data.len() as isize,
|
||||
data.as_ptr() as *const gl::types::GLvoid,
|
||||
usage);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ init_shader! {
|
|||
|
||||
impl Renderer {
|
||||
pub fn new(res: Arc<RwLock<resources::Manager>>) -> Renderer {
|
||||
use cgmath::Matrix;
|
||||
let version = {
|
||||
res.read().unwrap().version()
|
||||
};
|
||||
|
@ -175,7 +176,7 @@ impl Renderer {
|
|||
|
||||
self.perspective_matrix = cgmath::Matrix4::from(
|
||||
cgmath::PerspectiveFov {
|
||||
fovy: cgmath::Deg{s: 90f32},
|
||||
fovy: cgmath::Rad::from(cgmath::Deg{s: 90f32}),
|
||||
aspect: (width / height) as f32,
|
||||
near: 0.1f32,
|
||||
far: 500.0f32,
|
||||
|
@ -277,7 +278,7 @@ impl Renderer {
|
|||
|
||||
fn init_trans(&mut self, width: u32, height: u32) {
|
||||
self.trans = None;
|
||||
self.trans = Some(TransInfo::new(width, height));
|
||||
// self.trans = Some(TransInfo::new(width, height));
|
||||
}
|
||||
|
||||
pub fn get_textures(&self) -> Arc<RwLock<TextureManager>> {
|
||||
|
|
Loading…
Reference in New Issue