mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-21 14:28:43 -06:00
wip
This commit is contained in:
parent
7aa91b6414
commit
487cf31843
|
@ -1,59 +1,9 @@
|
|||
// use glam::{Mat4, Vec3, Quat};
|
||||
// use shipyard::{View, IntoIter, NonSendSync, UniqueViewMut, UniqueView};
|
||||
// use glium::{
|
||||
// Surface,
|
||||
// DrawParameters,
|
||||
// BackfaceCullingMode,
|
||||
// Blend, Depth, DepthTest,
|
||||
// uniform,
|
||||
// };
|
||||
// use crate::{
|
||||
// world::raycast::LookingAtBlock,
|
||||
// camera::Camera,
|
||||
// prefabs::ColoredShaderPrefab
|
||||
// };
|
||||
// use super::{
|
||||
// RenderTarget,
|
||||
// primitives::cube::CubePrimitive,
|
||||
// };
|
||||
mod pipeline;
|
||||
|
||||
// const SMOL: f32 = 0.0025;
|
||||
|
||||
// pub fn render_selection_box(
|
||||
// lookat: View<LookingAtBlock>,
|
||||
// camera: View<Camera>,
|
||||
// mut target: NonSendSync<UniqueViewMut<RenderTarget>>,
|
||||
// program: NonSendSync<UniqueView<ColoredShaderPrefab>>,
|
||||
// buffers: NonSendSync<UniqueView<CubePrimitive>>,
|
||||
// ) {
|
||||
// let camera = camera.iter().next().unwrap();
|
||||
// let Some(lookat) = lookat.iter().next() else { return };
|
||||
// let Some(lookat) = lookat.0 else { return };
|
||||
|
||||
// //Darken block
|
||||
// target.0.draw(
|
||||
// &buffers.0,
|
||||
// &buffers.1,
|
||||
// &program.0,
|
||||
// &uniform! {
|
||||
// color: [0., 0., 0., 0.5_f32],
|
||||
// model: Mat4::from_scale_rotation_translation(
|
||||
// Vec3::splat(1. + SMOL * 2.),
|
||||
// Quat::default(),
|
||||
// lookat.block_position.as_vec3() - Vec3::splat(SMOL)
|
||||
// ).to_cols_array_2d(),
|
||||
// perspective: camera.perspective_matrix.to_cols_array_2d(),
|
||||
// view: camera.view_matrix.to_cols_array_2d(),
|
||||
// },
|
||||
// &DrawParameters {
|
||||
// backface_culling: BackfaceCullingMode::CullClockwise,
|
||||
// blend: Blend::alpha_blending(),
|
||||
// depth: Depth {
|
||||
// //this may be unreliable... unless scale is applied! hacky...
|
||||
// test: DepthTest::IfLessOrEqual,
|
||||
// ..Default::default()
|
||||
// },
|
||||
// ..Default::default()
|
||||
// }
|
||||
// ).unwrap();
|
||||
// }
|
||||
pub fn draw_selection_box(
|
||||
ctx: &mut RenderCtx,
|
||||
lookat: View<LookingAtBlock>,
|
||||
camera: View<Camera>,
|
||||
) {
|
||||
//TODO
|
||||
}
|
||||
|
|
0
kubi/src/rendering/selection_box/pipeline.rs
Normal file
0
kubi/src/rendering/selection_box/pipeline.rs
Normal file
Loading…
Reference in a new issue