Updated Makefile, disabled opengl2 renderer module by default
This commit is contained in:
parent
7a35b5fbe2
commit
895dff97e6
|
@ -167,9 +167,9 @@ jobs:
|
|||
|
||||
- name: Build
|
||||
run: |
|
||||
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 ${{ matrix.use_sdl }} USE_VULKAN=1 CNAME=quake3e-vulkan BUILD_SERVER=0
|
||||
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 ${{ matrix.use_sdl }} RENDERER_DEFAULT=vulkan CNAME=quake3e-vulkan BUILD_SERVER=0
|
||||
make clean ARCH=${{ matrix.arch }}
|
||||
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 ${{ matrix.use_sdl }} USE_VULKAN_API=0
|
||||
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 ${{ matrix.use_sdl }} RENDERER_DEFAULT=opengl
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: matrix.cc == 'gcc' && matrix.config == 'Release'
|
||||
|
@ -210,9 +210,9 @@ jobs:
|
|||
apt-get -qq update
|
||||
apt-get install -y make gcc g++
|
||||
apt-get -y install libcurl4-openssl-dev mesa-common-dev libxxf86dga-dev libxrandr-dev libxxf86vm-dev libasound-dev
|
||||
make ${{ matrix.rule }} -j 4 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 USE_SDL=0 USE_VULKAN=1 CNAME=quake3e-vulkan BUILD_SERVER=0
|
||||
make ${{ matrix.rule }} -j 4 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 USE_SDL=0 RENDERER_DEFAULT=vulkan CNAME=quake3e-vulkan BUILD_SERVER=0
|
||||
make clean ARCH=${{ matrix.arch }}
|
||||
make ${{ matrix.rule }} -j 4 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 USE_SDL=0 USE_VULKAN_API=0
|
||||
make ${{ matrix.rule }} -j 4 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_RENDERER_DLOPEN=0 USE_SDL=0 RENDERER_DEFAULT=opengl
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: false
|
||||
|
@ -246,9 +246,9 @@ jobs:
|
|||
|
||||
- name: Build
|
||||
run: |
|
||||
make ${{ matrix.rule }} -j 4 CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=0 USE_VULKAN=1 CNAME=quake3e-vulkan BUILD_SERVER=0
|
||||
make ${{ matrix.rule }} -j 4 CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan CNAME=quake3e-vulkan BUILD_SERVER=0
|
||||
make clean ARCH=${{ matrix.arch }}
|
||||
make ${{ matrix.rule }} -j 4 CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=0 USE_VULKAN_API=0
|
||||
make ${{ matrix.rule }} -j 4 CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=opengl
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: matrix.cc == 'clang' && matrix.config == 'Release'
|
||||
|
|
42
Makefile
42
Makefile
|
@ -29,7 +29,8 @@ BUILD_SERVER = 1
|
|||
USE_SDL = 1
|
||||
USE_CURL = 1
|
||||
USE_LOCAL_HEADERS= 0
|
||||
USE_VULKAN = 0
|
||||
USE_VULKAN = 1
|
||||
USE_OPENGL = 1
|
||||
USE_OPENGL2 = 0
|
||||
USE_SYSTEM_JPEG = 0
|
||||
USE_VULKAN_API = 1
|
||||
|
@ -41,6 +42,10 @@ DNAME = quake3e.ded
|
|||
|
||||
RENDERER_PREFIX = $(CNAME)
|
||||
|
||||
# valid options: opengl, vulkan, opengl2
|
||||
RENDERER_DEFAULT = opengl
|
||||
|
||||
|
||||
ifeq ($(V),1)
|
||||
echo_cmd=@:
|
||||
Q=
|
||||
|
@ -143,12 +148,28 @@ ifndef USE_CURL_DLOPEN
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(USE_RENDERER_DLOPEN),0)
|
||||
USE_VULKAN=1
|
||||
ifeq ($(USE_RENDERER_DLOPEN),0)
|
||||
ifeq ($(RENDERER_DEFAULT),opengl)
|
||||
USE_OPENGL=1
|
||||
USE_OPENGL2=0
|
||||
USE_VULKAN=0
|
||||
USE_VULKAN_API=0
|
||||
endif
|
||||
ifeq ($(RENDERER_DEFAULT),opengl2)
|
||||
USE_OPENGL=0
|
||||
USE_OPENGL2=1
|
||||
USE_VULKAN=0
|
||||
USE_VULKAN_API=0
|
||||
endif
|
||||
ifeq ($(RENDERER_DEFAULT),vulkan)
|
||||
USE_OPENGL=0
|
||||
USE_OPENGL2=0
|
||||
USE_VULKAN=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(USE_VULKAN),0)
|
||||
USE_VULKAN_API=1
|
||||
USE_VULKAN_API=1
|
||||
endif
|
||||
|
||||
|
||||
|
@ -232,6 +253,7 @@ endif
|
|||
ifneq ($(USE_RENDERER_DLOPEN),0)
|
||||
BASE_CFLAGS += -DUSE_RENDERER_DLOPEN
|
||||
BASE_CFLAGS += -DRENDERER_PREFIX=\\\"$(RENDERER_PREFIX)\\\"
|
||||
BASE_CFLAGS += -DRENDERER_DEFAULT="$(RENDERER_DEFAULT)"
|
||||
endif
|
||||
|
||||
ifdef DEFAULT_BASEDIR
|
||||
|
@ -496,9 +518,15 @@ endif
|
|||
ifneq ($(BUILD_CLIENT),0)
|
||||
TARGETS += $(B)/$(TARGET_CLIENT)
|
||||
ifneq ($(USE_RENDERER_DLOPEN),0)
|
||||
TARGETS += $(B)/$(TARGET_REND1)
|
||||
TARGETS += $(B)/$(TARGET_REND2)
|
||||
TARGETS += $(B)/$(TARGET_RENDV)
|
||||
ifeq ($(USE_OPENGL),1)
|
||||
TARGETS += $(B)/$(TARGET_REND1)
|
||||
endif
|
||||
ifeq ($(USE_OPENGL2),1)
|
||||
TARGETS += $(B)/$(TARGET_REND2)
|
||||
endif
|
||||
ifeq ($(USE_VULKAN),1)
|
||||
TARGETS += $(B)/$(TARGET_RENDV)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
16
README.md
16
README.md
|
@ -137,23 +137,29 @@ Copy the resulting binaries from created `build` directory
|
|||
|
||||
---
|
||||
|
||||
Several make options are available for linux/mingw/macos builds:
|
||||
Several Makefile options are available for linux/mingw/macos builds:
|
||||
|
||||
`BUILD_CLIENT=1` - build unified client/server executable, enabled by default
|
||||
|
||||
`BUILD_SERVER=1` - build dedicated server executable, enabled by default
|
||||
|
||||
`USE_SDL=0`- use SDL2 backend for video, audio, input subsystems, disabled by default, enforced for macos
|
||||
`USE_SDL=0`- use SDL2 backend for video, audio, input subsystems, enabled by default, enforced for macos
|
||||
|
||||
`USE_VULKAN=0` - link client with vulkan renderer instead of OpenGL, disabled by default, works only with single renderer builds
|
||||
`USE_VULKAN=1` - build vulkan modular renderer, enabled by default
|
||||
|
||||
`USE_RENDERER_DLOPEN=1` - do not link single renderer into client binary, compile all renderers (ignoring USE_VULKAN setting) as dynamic libraries and allow to switch them on the fly via `\cl_renderer` cvar, enabled by default
|
||||
`USE_OPENGL=1` - build opengl modular renderer, enabled by default
|
||||
|
||||
`USE_OPENGL2=0` - build opengl2 modular renderer, disabled by default
|
||||
|
||||
`USE_RENDERER_DLOPEN=1` - do not link single renderer into client binary, compile all enabled renderers as dynamic libraries and allow to switch them on the fly via `\cl_renderer` cvar, enabled by default
|
||||
|
||||
`RENDERER_DEFAULT=opengl` - set default value for `\cl_renderer` cvar or use selected renderer for static build for `USE_RENDERER_DLOPEN=0`, valid options are `opengl`, `opengl2`, `vulkan`
|
||||
|
||||
`USE_SYSTEM_JPEG=0` - use current system JPEG library, disabled by default
|
||||
|
||||
Example:
|
||||
|
||||
`make BUILD_SERVER=0 USE_RENDERER_DLOPEN=0 USE_VULKAN=1` - which means do not build dedicated binary, build client with single static vulkan renderer
|
||||
`make BUILD_SERVER=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan` - which means do not build dedicated binary, build client with single static vulkan renderer
|
||||
|
||||
## Contacts
|
||||
|
||||
|
|
|
@ -3775,7 +3775,11 @@ static void CL_InitGLimp_Cvars( void )
|
|||
cl_drawBuffer = Cvar_Get( "r_drawBuffer", "GL_BACK", CVAR_CHEAT );
|
||||
|
||||
#ifdef USE_RENDERER_DLOPEN
|
||||
#ifdef RENDERER_DEFAULT
|
||||
cl_renderer = Cvar_Get( "cl_renderer", XSTRING( RENDERER_DEFAULT ), CVAR_ARCHIVE | CVAR_LATCH );
|
||||
#else
|
||||
cl_renderer = Cvar_Get( "cl_renderer", "opengl", CVAR_ARCHIVE | CVAR_LATCH );
|
||||
#endif
|
||||
if ( !isValidRenderer( cl_renderer->string ) ) {
|
||||
Cvar_ForceReset( "cl_renderer" );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue