File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1267,7 +1267,7 @@ bool create_graphics_pipeline(struct vulkan_demo *demo) {
12671267 VkGraphicsPipelineCreateInfo pipeline_info ;
12681268 size_t read_result ;
12691269
1270- fp = fopen ("shaders/demo.vert.spv" , "r " );
1270+ fp = fopen ("shaders/demo.vert.spv" , "rb " );
12711271 if (!fp ) {
12721272 fprintf (stderr , "Couldn't open shaders/demo.vert.spv\n" );
12731273 return false;
@@ -1288,7 +1288,7 @@ bool create_graphics_pipeline(struct vulkan_demo *demo) {
12881288 goto cleanup ;
12891289 }
12901290
1291- fp = fopen ("shaders/demo.frag.spv" , "r " );
1291+ fp = fopen ("shaders/demo.frag.spv" , "rb " );
12921292 if (!fp ) {
12931293 fprintf (stderr , "Couldn't open shaders/demo.frag.spv\n" );
12941294 return false;
@@ -2141,6 +2141,11 @@ int main(void) {
21412141 WINDOW_HEIGHT ,
21422142 SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI );
21432143
2144+ if (!demo .win ) {
2145+ SDL_Log ("Error SDL_CreateWindow %s" , SDL_GetError ());
2146+ exit (1 );
2147+ }
2148+
21442149 if (!create_vulkan_demo (& demo )) {
21452150 fprintf (stderr , "failed to create vulkan demo!\n" );
21462151 exit (1 );
You can’t perform that action at this time.
0 commit comments