stevenarella/src/render/shaders
iceiix 0471eb3a82 Use web-sys for web backend (#444)
A small step for #446 🕸️ Web support, use web-sys to interface to the web.
Previously, we would try to use glutin on the web, which is not supported;
now glutin is only used on native: fixes #171 could not find Context in platform_impl.

winit is still used on both, but the GL context is created with web-sys and glow
(on the web), and created with glutin and used with glow (on native). stdweb is
no longer used, being replaced by web-sys.

Substantial refactoring to allow reusing the code between web/native:

* settings: use VirtualKeyCode from winit, not reexported from glutin
* std_or_web: remove broken localstoragefs/stdweb, add File placeholder
* render: disable skin_thread on wasm since we don't have threads

* gl: use glow types in gl wrapper (integers in native, but Web*Key in web)
* gl: web-sys WebGlUniformLocation does not implement Copy trait, so glow::UniformLocation doesn't so gl::Uniform can't
* gl: refactor context initialization, pass glow::Context to gl::init for consistency between native/web
* gl: update to glow with panicking tex_image_2d_multisample web-sys wrapper

* glsl: use shader version in GLSL for WebGL 2 and OpenGL 3.2

* shaders: add explicit float/int type conversions, required for WebGL
* shaders: specify mediump precision, required for WebGL
* shaders: specify fragment shader output locations for WebGL

* main: refactor handle_window_event to take a winit window, not glutin context
* main: handle resize outside of handle_window_event since it updates the glutin window (the only event which does this)
* main: use winit events in handle_window_event not reexported glutin events
* main: refactor game loop handling into tick_all()
* main: create winit window for WebGL, and use winit_window from glutin
* main: restore console_error_panic_hook,  mistakingly removed in (#260)
* main: remove force setting env RUST_BACKTRACE=1, no longer can set env on web

* www: index.js: fix wasm import path
* www: npm update, npm audit fix
* www: update readme to link to status on #446 🕸️ Web support
2020-12-26 13:43:21 -08:00
..
chunk_frag.glsl Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
chunk_vertex.glsl Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
clouds_frag.glsl Add fancy clouds 2016-04-01 20:01:10 +01:00
clouds_geo.glsl Fix uninitialized texP and heightP in clouds_geo. Closes https://github.com/iceiix/steven/issues/32 2018-11-28 16:45:25 -08:00
clouds_vertex.glsl Add fancy clouds 2016-04-01 20:01:10 +01:00
get_light.glsl Implement block shading 2016-03-21 19:53:00 +00:00
lookup_texture.glsl Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
model_frag.glsl Implement models and a sun/moon 2016-03-27 23:31:57 +01:00
model_vertex.glsl Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
sun_frag.glsl Implement models and a sun/moon 2016-03-27 23:31:57 +01:00
sun_vertex.glsl Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
trans_frag.glsl Revert "Change multisampling count to 0, improved fix/workaround for AMD GPUs (#26)" 2018-11-19 17:44:06 -08:00
trans_vertex.glsl Add last state before I stopped 2016-03-16 17:33:06 +00:00
ui_frag.glsl Work on login screen, added ui buttons and textboxes (plus tab fixes) 2016-03-20 20:17:21 +00:00
ui_vertex.glsl Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00