@@ -412,9 +412,10 @@ static int GLW_SetMode( int mode, const char *modeFS, qboolean fullscreen, qbool
412412 else
413413 perChannelColorBits = 4 ;
414414
415- #ifdef USE_VULKAN_API
415+ #if defined(USE_OPENGL_API )
416+ # ifdef USE_VULKAN_API
416417 if ( !vulkan )
417- #endif
418+ # endif
418419 {
419420
420421#ifdef __sgi /* Fix for SGIs grabbing too many bits of color */
@@ -450,6 +451,7 @@ static int GLW_SetMode( int mode, const char *modeFS, qboolean fullscreen, qbool
450451 if ( !r_allowSoftwareGL -> integer )
451452 SDL_GL_SetAttribute ( SDL_GL_ACCELERATED_VISUAL , 1 );
452453 }
454+ #endif /* USE_OPENGL_API */
453455
454456 if ( ( SDL_window = SDL_CreateWindow ( cl_title , x , y , config -> vidWidth , config -> vidHeight , flags ) ) == NULL )
455457 {
@@ -559,7 +561,7 @@ static int GLW_SetMode( int mode, const char *modeFS, qboolean fullscreen, qbool
559561 Com_Printf ( "[VK] Couldn't get a visual: %s\n" , ( sdl_err && sdl_err [0 ] ) ? sdl_err : "(no SDL error string)" );
560562 Com_Printf ( "[VK] SDL video driver: %s\n" , SDL_GetCurrentVideoDriver () ? SDL_GetCurrentVideoDriver () : "(none)" );
561563#if defined(__arm__ ) || defined(__aarch64__ )
562- Com_Printf ( S_COLOR_YELLOW "[VK] On ARM, Vulkan may be unavailable. Try: ./idtech3.aarch64 +set cl_renderer opengl \n" );
564+ Com_Printf ( S_COLOR_YELLOW "[VK] On ARM, Vulkan may be unavailable. Ensure SDL was built with Vulkan support (see docs/ARM_RASPBERRY_PI.md). \n" );
563565#endif
564566 /* SDL built without Vulkan: no point retrying modes/drivers */
565567 if ( vulkan && sdl_err && strstr ( sdl_err , "Vulkan support" ) != NULL )
@@ -692,7 +694,9 @@ void GLimp_Init( glconfig_t *config )
692694 in_nograb = Cvar_Get ( "in_nograb" , "0" , 0 );
693695 Cvar_SetDescription ( in_nograb , "Do not capture mouse in game, may be useful during online streaming." );
694696
697+ #ifdef USE_OPENGL_API
695698 r_allowSoftwareGL = Cvar_Get ( "r_allowSoftwareGL" , "0" , CVAR_LATCH );
699+ #endif
696700
697701 r_swapInterval = Cvar_Get ( "r_swapInterval" , "0" , CVAR_ARCHIVE | CVAR_LATCH );
698702 r_stereoEnabled = Cvar_Get ( "r_stereoEnabled" , "0" , CVAR_ARCHIVE | CVAR_LATCH );
@@ -976,7 +980,7 @@ void VKimp_Init( glconfig_t *config )
976980#if defined(__arm__ ) || defined(__aarch64__ )
977981 Com_Printf ( S_COLOR_YELLOW "Vulkan failed on ARM. SDL needs Vulkan support.\n" );
978982 Com_Printf ( " Build SDL with Vulkan: ./scripts/build_sdl_vulkan_rpi.sh\n" );
979- Com_Printf ( " Or use OpenGL: +set cl_renderer opengl \n" );
983+ Com_Printf ( " Vulkan is required; rebuild SDL with Vulkan enabled. \n" );
980984#endif
981985 Com_Error ( ERR_FATAL , "VKimp_Init() - could not load Vulkan subsystem: %s" , SDL_GetError () );
982986 return ;
@@ -986,7 +990,7 @@ void VKimp_Init( glconfig_t *config )
986990#if defined(__arm__ ) || defined(__aarch64__ )
987991 Com_Printf ( S_COLOR_YELLOW "Vulkan failed on ARM. SDL may lack Vulkan support.\n" );
988992 Com_Printf ( " Build SDL with Vulkan: ./scripts/build_sdl_vulkan_rpi.sh\n" );
989- Com_Printf ( " Or use OpenGL: +set cl_renderer opengl \n" );
993+ Com_Printf ( " Vulkan is required; rebuild SDL with Vulkan enabled. \n" );
990994#endif
991995 Com_Error ( ERR_FATAL , "VKimp_Init() - could not load Vulkan subsystem: %s" , SDL_GetError () );
992996 return ;
0 commit comments