From eb62a80956b485c780f9028cd08440b4971aecba Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 31 Jul 2019 22:38:33 +0000 Subject: [PATCH] Change references to OpenGL 2.1 to 3.2 --- CMakeLists.txt | 6 +++--- Makefile | 4 ++-- README.md | 4 ++-- src/Backends/Rendering/{OpenGL2.cpp => OpenGL3.cpp} | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename src/Backends/Rendering/{OpenGL2.cpp => OpenGL3.cpp} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb2ff037..609b3a12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ option(JAPANESE "Enable the Japanese-language build" OFF) option(FIX_BUGS "Fix certain bugs (see src/Bug Fixes.txt)" OFF) option(NONPORTABLE "Enable bits of code that aren't portable, but are what the original game used" OFF) option(FORCE_LOCAL_LIBS "Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones" OFF) -set(RENDERER "Texture" CACHE STRING "Which renderer the game should use: 'OpenGL2' for an OpenGL 2.1 renderer, 'Texture' for SDL2's hardware-accelerated Texture API, 'Surface' for SDL2's software-rendered Surface API, and 'Software' for a handwritten software renderer") +set(RENDERER "Texture" CACHE STRING "Which renderer the game should use: 'OpenGL3' for an OpenGL 3.2 renderer, 'Texture' for SDL2's hardware-accelerated Texture API, 'Surface' for SDL2's software-rendered Surface API, and 'Software' for a handwritten software renderer") project(CSE2 LANGUAGES C CXX) @@ -246,8 +246,8 @@ if(NONPORTABLE) target_compile_definitions(CSE2 PRIVATE NONPORTABLE) endif() -if(RENDERER MATCHES "OpenGL2") - target_sources(CSE2 PRIVATE "src/Backends/Rendering/OpenGL2.cpp") +if(RENDERER MATCHES "OpenGL3") + target_sources(CSE2 PRIVATE "src/Backends/Rendering/OpenGL3.cpp") find_package(GLEW REQUIRED) target_link_libraries(CSE2 GLEW::GLEW) find_package(OpenGL REQUIRED) diff --git a/Makefile b/Makefile index e465804c..64acea61 100644 --- a/Makefile +++ b/Makefile @@ -208,8 +208,8 @@ ifneq ($(WINDOWS), 1) RESOURCES += ICON/ICON_MINI.bmp endif -ifeq ($(RENDERER), OpenGL2) - SOURCES += Backends/Rendering/OpenGL2 +ifeq ($(RENDERER), OpenGL3) + SOURCES += Backends/Rendering/OpenGL3 CXXFLAGS += `pkg-config glew --cflags` ifeq ($(STATIC), 1) diff --git a/README.md b/README.md index 2ef20f75..d9198892 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ You can also add the following flags: * `-DFIX_BUGS=ON` - Fix bugs in the game (see [src/Bug Fixes.txt](src/Bug%20Fixes.txt)) * `-DNONPORTABLE=ON` - Enable bits of code that aren't portable, but are what the original game used * `-DFORCE_LOCAL_LIBS=ON` - Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones -* `-DRENDERER=OpenGL2` - Use the hardware-accelerated OpenGL 2.1 renderer +* `-DRENDERER=OpenGL3` - Use the hardware-accelerated OpenGL 3.2 renderer * `-DRENDERER=Texture` - Use the hardware-accelerated SDL2 Texture API renderer (default) * `-DRENDERER=Surface` - Use the software-rendered SDL2 Surface API renderer * `-DRENDERER=Software` - Use a handwritten software renderer @@ -58,7 +58,7 @@ Run 'make' in this folder, preferably with some of the following settings: * `WINDOWS=1` - Enable Windows-only features like a unique file/taskbar icon, and system font loading (needed for the font setting in Config.dat to do anything) * `RASPBERRY_PI=1` - Enable tweaks to improve performance on Raspberry Pis * `NONPORTABLE=1` - Enable bits of code that aren't portable, but are what the original game used -* `RENDERER=OpenGL2` - Use the hardware-accelerated OpenGL 2.1 renderer +* `RENDERER=OpenGL3` - Use the hardware-accelerated OpenGL 3.2 renderer * `RENDERER=Texture` - Use the hardware-accelerated SDL2 Texture API renderer (default) * `RENDERER=Surface` - Use the software-rendered SDL2 Surface API renderer * `RENDERER=Software` - Use a hand-written software renderer diff --git a/src/Backends/Rendering/OpenGL2.cpp b/src/Backends/Rendering/OpenGL3.cpp similarity index 100% rename from src/Backends/Rendering/OpenGL2.cpp rename to src/Backends/Rendering/OpenGL3.cpp