summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/dw.rs2
-rw-r--r--source/dw/app/inigfx.rs11
-rw-r--r--source/dw/app/lop.rs2
-rw-r--r--source/dw/app/shader/main.frag.glsl2
4 files changed, 8 insertions, 9 deletions
diff --git a/source/dw.rs b/source/dw.rs
index 3905727..b09c2e6 100644
--- a/source/dw.rs
+++ b/source/dw.rs
@@ -8,7 +8,7 @@ pub struct VerTyp {
pub const VER: VerTyp = VerTyp {
maj: 0x0,
- min: 0x2,
+ min: 0x3,
pat: 0x0,
};
diff --git a/source/dw/app/inigfx.rs b/source/dw/app/inigfx.rs
index 5444b10..ec8e0a0 100644
--- a/source/dw/app/inigfx.rs
+++ b/source/dw/app/inigfx.rs
@@ -7,20 +7,19 @@ extern crate gl;
extern crate glfw;
use gl::load_with;
-use glfw::{Context, SwapInterval};
+use glfw::{Context, FAIL_ON_ERRORS, init, SwapInterval, WindowHint};
use std::ffi::c_void;
impl App {
pub fn inigfx(&mut self) -> Gfx {
eprintln!("initialising glfw");
- let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap();
+ let mut glfw = init(FAIL_ON_ERRORS).unwrap();
eprintln!("creating window");
- glfw.window_hint(glfw::WindowHint::ContextVersion(0x3, 0x2));
- glfw.window_hint(glfw::WindowHint::OpenGlProfile(glfw::OpenGlProfileHint::Core));
- glfw.window_hint(glfw::WindowHint::Samples(Some(0x8)));
+ glfw.window_hint(WindowHint::ContextVersion(0x3, 0x2));
+ glfw.window_hint(WindowHint::OpenGlProfile(glfw::OpenGlProfileHint::Core));
+ glfw.window_hint(WindowHint::Samples(Some(0x8)));
-
let (mut win, evt) = glfw.create_window(0x400, 0x300, format!("DeltaWorld {}.{}.{}", VER.maj, VER.min, VER.pat).as_str(), glfw::WindowMode::Windowed).expect("unable to create window");
win.set_key_polling(true);
win.make_current();
diff --git a/source/dw/app/lop.rs b/source/dw/app/lop.rs
index 16f6e5a..d18415f 100644
--- a/source/dw/app/lop.rs
+++ b/source/dw/app/lop.rs
@@ -51,7 +51,7 @@ impl App {
gfx.glfw.poll_events();
unsafe {
- ClearColor(0.25, 0.0, 0.0, 1.0);
+ ClearColor(0.107, 0.690, 0.939, 1.0);
Clear(COLOR_BUFFER_BIT);
BindBuffer(ARRAY_BUFFER, vbo);
diff --git a/source/dw/app/shader/main.frag.glsl b/source/dw/app/shader/main.frag.glsl
index 410b362..b3da28d 100644
--- a/source/dw/app/shader/main.frag.glsl
+++ b/source/dw/app/shader/main.frag.glsl
@@ -3,5 +3,5 @@
out vec4 col;
void main() {
- col = vec4(0.7137f, 0.0941f, 0.2000f, 1.0f);
+ col = vec4(0.409f, 0.805f, 0.210f, 1.0f);
}