-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup basic window functionality #7
Conversation
* Initial Cleanup, extract instance creating * fixup im.rs * 🧹 Just sweeping up some unclean code 🧹 * 🧹 Just sweeping some stuff under the rug 🧹 * Oh damn i lost my broom * 🧹 Found it! 🧹 * 📦 Moving stuff around 📦 * Give control flow back to `main` function * Fix error handling * Fix aspect ratio * Remove (not) ppm image generator Co-authored-by: mathiasmagnusson <mathiasmagnussons@gmail.com>
I'll write it here as well: I was not quite happy with the current state of I moved some stuff (math redefinitions (so |
} | ||
|
||
#[derive(Error, Debug)] | ||
pub enum WindowError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we wanna use thiserror here, instead of just anyhow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, thiserror is probably overkill
This reverts commit 902e4db. Commit to wrong branch
|
||
use common::{Mat4, Vec3}; | ||
|
||
pub struct Camera { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly put this in common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitly think that we should have some kind of CameraComponent that can be added to an entity (or possibly multiple?) and then the renderer would query for those to know where to render from.
Then the CameraComponent would probably be in common i guess
But of course the renderer would have to know about CameraComponents
|
||
#[rustfmt::skip] | ||
pub fn opengl_to_wgpu_matrix() -> Mat4 { | ||
Mat4::new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe comment this? This is black magic, might not be applicable to vek
} | ||
|
||
pub struct Renderer { | ||
pub camera: Camera, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels really scuffed to tie the camera to the renderer, but I don't know how else to do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small change to .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ser bra ut.
Closes #6
Window setup