forked from StrafesNET/roblox-bot-player
update graphics
This commit is contained in:
@@ -10,7 +10,7 @@ pub struct Graphics{
|
||||
}
|
||||
impl Graphics{
|
||||
pub fn new(device:wgpu::Device,queue:wgpu::Queue,config:wgpu::SurfaceConfiguration)->Self{
|
||||
let graphics=strafesnet_graphics::graphics::GraphicsState::new(&device,&queue,&config);
|
||||
let graphics=strafesnet_graphics::graphics::GraphicsState::new(&device,&queue,glam::uvec2(config.width,config.height),config.view_formats[0]);
|
||||
Self{
|
||||
graphics,
|
||||
device,
|
||||
@@ -31,7 +31,7 @@ impl Graphics{
|
||||
self.config.width=size.x.max(1);
|
||||
self.config.height=size.y.max(1);
|
||||
surface.configure(&self.device,&self.config);
|
||||
self.graphics.resize(&self.device,&self.config,fov);
|
||||
self.graphics.resize(&self.device,size,fov);
|
||||
}
|
||||
pub fn render(&mut self,surface:&wgpu::Surface<'_>,pos:glam::Vec3,angles:glam::Vec2){
|
||||
//this has to go deeper somehow
|
||||
|
||||
Reference in New Issue
Block a user