[dependencies]
git://onyxlang.io/repo/openal=0.0.2
-git://onyxlang.io/repo/ogre=0.0.11
+git://onyxlang.io/repo/ogre=0.0.15
[dependency_folders]
git://onyxlang.io/repo/openal=openal
layout(location = 0) in vec2 a_pos;
layout(location = 1) in vec4 a_col;
-layout(std140) uniform u_window_matrix_block {
- mat4 u_view;
-};
-
-layout(std140) uniform u_world_matrix_block {
+layout(std140) uniform u_ogre_matrix_block {
+ mat4 u_window;
+ mat4 u_camera;
mat4 u_world;
mat4 u_model;
};
void main() {
- gl_Position = u_view * u_world * u_model * vec4(a_pos, 0, 1);
+ gl_Position = u_window * u_world * u_model * vec4(a_pos, 0, 1);
v_col = a_col;
}
layout(location = 1) in vec2 a_tex;
layout(location = 2) in vec4 a_col;
-layout(std140) uniform u_window_matrix_block {
+layout(std140) uniform u_ogre_matrix_block {
mat4 u_window;
-};
-
-layout(std140) uniform u_world_matrix_block {
+ mat4 u_camera;
mat4 u_world;
mat4 u_model;
};
dest=game.wasm
case "$1" in
- build) shift; onyx -V --tag -I ../src build -o $dest $@; mv tags .. ;;
+ build) shift; onyx -V -I ../src build -o $dest $@ ;;
check) shift; onyx check -V -I ../src build $@ ;;
run) onyx-run $dest ;;
debug) shift; onyx run -V -I ../src build --debug $@ ;;
- *) onyx run -V --tag -I ../src build $@; mv tags .. ;;
+ *) onyx run -V -I ../src build $@ ;;
esac
DEBUG :: true
-#if runtime.arch == .X86_64 { #library_path "./lib" }
-#if runtime.arch == .AARCH64 { #library_path "./lib/aarch64" }
-
-#load "core/std"
-
#load_all "./."
#load_all "./entity"
#load_all "./sfx"
#load_all "./utils"
-#load "./../lib/openal/module"
-#load "./../lib/ogre/module"
+#load "./../lib/packages"
+
+#if runtime.arch == .X86_64 { #library_path "./lib" }
+#if runtime.arch == .AARCH64 { #library_path "./lib/aarch64" }
+
use core
use ogre
-use ogre.ui
Entity_Nothing :: cast(Entity_ID) 0
Entity_ID :: #distinct u32
Audio_Manager.set_volume(0.1);
distortion_shader = shader_make("./assets/shaders/crt.glsl");
+ shader_link_ogre_matrix_block(distortion_shader);
+
scene_canvas = canvas_make(800, 608);
// This process of queueing the asset bucket should
}
game_draw :: () {
- // @REMOVE // @DEBUG
- // Spritesheet', _ := texture_lookup(#cstr "./assets/images/spritesheet.png");
-
canvas_use(^scene_canvas);
immediate_clear(.{0.15, 0.15, 0.2});
scene->draw();
}
glEnable(GL_CULL_FACE);
- update_world_matrix();
+ update_world_matrix(mat4_identity());
update_model_matrix(.{0,0});
if editor_shown() {