Removed link to desktop OpenGL library for gles1

Done for all platforms, CMakeLists included. Unneeded with glad.
Renderer fallback logic now includes gles1, just before soft:
custom -> gl3 -> gles3 -> gl1 -> gles1 -> soft.
This commit is contained in:
Jaime Moreira 2024-08-03 12:39:23 -04:00
parent f41cc545c6
commit bbdaadb104
3 changed files with 11 additions and 7 deletions

View file

@ -850,10 +850,10 @@ set_target_properties(ref_gles1 PROPERTIES
)
target_include_directories(ref_gles1 PRIVATE ${CMAKE_SOURCE_DIR}/src/client/refresh/gl1/glad-gles1/include)
target_compile_definitions(ref_gles1 PRIVATE YQ2_GL1_GLES=1)
target_link_libraries(ref_gles1 ${yquake2LinkerFlags} ${yquake2OpenGLLinkerFlags}
${yquake2SDLLinkerFlags})
target_link_libraries(ref_gles1 ${yquake2LinkerFlags} ${yquake2SDLLinkerFlags})
if(SDL3_SUPPORT)
target_link_libraries(ref_gles1 SDL3::SDL3)
endif()
endif()
endif()

View file

@ -638,7 +638,6 @@ ref_gles1:
release/ref_gles1.dll : GLAD_INCLUDE = -Isrc/client/refresh/gl1/glad-gles1/include
release/ref_gles1.dll : CFLAGS += -DYQ2_GL1_GLES
release/ref_gles1.dll : LDFLAGS += -shared
release/ref_gles1.dll : LDLIBS += -lGLESv2
else ifeq ($(YQ2_OSTYPE), Darwin)
@ -648,7 +647,7 @@ ref_gles1:
release/ref_gles1.dylib : GLAD_INCLUDE = -Isrc/client/refresh/gl1/glad-gles1/include
release/ref_gles1.dylib : CFLAGS += -DYQ2_GL1_GLES
release/ref_gles1.dylib : LDFLAGS += -shared -framework OpenGL
release/ref_gles1.dylib : LDFLAGS += -shared
else # not Windows or Darwin
@ -659,7 +658,6 @@ ref_gles1:
release/ref_gles1.so : GLAD_INCLUDE = -Isrc/client/refresh/gl1/glad-gles1/include
release/ref_gles1.so : CFLAGS += -DYQ2_GL1_GLES -fPIC
release/ref_gles1.so : LDFLAGS += -shared
release/ref_gles1.so : LDLIBS += -lGL
endif # OS specific ref_gles1 stuff

View file

@ -532,10 +532,11 @@ VID_CheckChanges(void)
// Mkay, let's try our luck.
while (!VID_LoadRenderer())
{
// We try: custom -> gl3 -> gles3 -> gl1 -> soft.
// We try: custom -> gl3 -> gles3 -> gl1 -> gles1 -> soft.
if ((strcmp(vid_renderer->string, "gl3") != 0) &&
(strcmp(vid_renderer->string, "gles3") != 0) &&
(strcmp(vid_renderer->string, "gl1") != 0) &&
(strcmp(vid_renderer->string, "gles1") != 0) &&
(strcmp(vid_renderer->string, "soft") != 0))
{
Com_Printf("Retrying with gl3...\n");
@ -552,6 +553,11 @@ VID_CheckChanges(void)
Cvar_Set("vid_renderer", "gl1");
}
else if (strcmp(vid_renderer->string, "gl1") == 0)
{
Com_Printf("Retrying with gles1...\n");
Cvar_Set("vid_renderer", "gles1");
}
else if (strcmp(vid_renderer->string, "gles1") == 0)
{
Com_Printf("Retrying with soft...\n");
Cvar_Set("vid_renderer", "soft");