@@ -2,21 +2,17 @@ use std::{borrow::Cow, path::PathBuf};
22
33use glass:: {
44 utils:: { ShaderModule , WatchedShaderModule } ,
5+ window:: GlassWindow ,
56 Glass , GlassApp , GlassConfig , GlassContext , GlassError , RenderData ,
67} ;
78use wgpu:: {
89 CommandBuffer , MultisampleState , PipelineLayoutDescriptor , PrimitiveState , RenderPipeline ,
9- RenderPipelineDescriptor , ShaderModuleDescriptor , StoreOp , TextureFormat ,
10+ RenderPipelineDescriptor , ShaderModuleDescriptor , StoreOp ,
1011} ;
1112use winit:: event_loop:: ActiveEventLoop ;
1213
13- const WIDTH : u32 = 1920 ;
14- const HEIGHT : u32 = 1080 ;
15-
1614fn main ( ) -> Result < ( ) , GlassError > {
17- Glass :: run ( GlassConfig :: performance ( WIDTH , HEIGHT ) , |_| {
18- Box :: new ( TriangleApp :: default ( ) )
19- } )
15+ Glass :: run ( GlassConfig :: default ( ) , |_| Box :: new ( TriangleApp :: default ( ) ) )
2016}
2117
2218#[ derive( Default ) ]
@@ -135,7 +131,7 @@ fn create_triangle_pipeline(context: &GlassContext, shader_module: ShaderModule)
135131 module : & shader,
136132 entry_point : Some ( "fs_main" ) ,
137133 compilation_options : Default :: default ( ) ,
138- targets : & [ Some ( TextureFormat :: Bgra8UnormSrgb . into ( ) ) ] ,
134+ targets : & [ Some ( GlassWindow :: default_surface_format ( ) . into ( ) ) ] ,
139135 } ) ,
140136 primitive : PrimitiveState :: default ( ) ,
141137 depth_stencil : None ,
0 commit comments