mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Link against Vulkan and glslang
This commit is contained in:
parent
13721ec441
commit
a51e3bddfe
2 changed files with 28 additions and 43 deletions
|
@ -25,7 +25,7 @@ option(BINKDEC
|
|||
"Use included libbinkdec to render Bink videos" ON)
|
||||
|
||||
option(USE_VULKAN
|
||||
"Use Vulkan instead of OpenGL" OFF)
|
||||
"Use Vulkan instead of OpenGL" ON)
|
||||
|
||||
option(ONATIVE
|
||||
"Optimize for the host CPU" OFF)
|
||||
|
@ -270,6 +270,9 @@ else (JPEG_FOUND)
|
|||
set(JPEG_LIBRARY "" )
|
||||
endif (JPEG_FOUND)
|
||||
|
||||
|
||||
|
||||
|
||||
if(USE_VULKAN)
|
||||
# Use FindVulkan module added with CMAKE 3.7
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.7.0)
|
||||
|
@ -286,19 +289,21 @@ if(USE_VULKAN)
|
|||
|
||||
add_definitions(-DUSE_VULKAN)
|
||||
|
||||
else()
|
||||
if(USE_SYSTEM_LIBGLEW)
|
||||
find_package(GLEW)
|
||||
endif(USE_SYSTEM_LIBGLEW)
|
||||
set(GLSLANG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/glslang)
|
||||
add_subdirectory(${GLSLANG_DIR})
|
||||
endif()
|
||||
|
||||
if(GLEW_FOUND)
|
||||
include_directories(${GLEW_INCLUDE_DIRS})
|
||||
set(GLEW_LIBRARY ${GLEW_LIBRARIES})
|
||||
else()
|
||||
include_directories("libs/glew/include")
|
||||
set(GLEW_LIBRARY "" )
|
||||
add_definitions(-DGLEW_STATIC)
|
||||
endif()
|
||||
if(USE_SYSTEM_LIBGLEW)
|
||||
find_package(GLEW)
|
||||
endif(USE_SYSTEM_LIBGLEW)
|
||||
|
||||
if(GLEW_FOUND)
|
||||
include_directories(${GLEW_INCLUDE_DIRS})
|
||||
set(GLEW_LIBRARY ${GLEW_LIBRARIES})
|
||||
else()
|
||||
include_directories("libs/glew/include")
|
||||
set(GLEW_LIBRARY "" )
|
||||
add_definitions(-DGLEW_STATIC)
|
||||
endif()
|
||||
|
||||
add_subdirectory(idlib)
|
||||
|
@ -1240,6 +1245,14 @@ if(MSVC)
|
|||
if(USE_VULKAN)
|
||||
list(APPEND RBDOOM3_INCLUDES ${RENDERER_VULKAN_INCLUDES})
|
||||
list(APPEND RBDOOM3_SOURCES ${RENDERER_VULKAN_SOURCES})
|
||||
|
||||
set(Vulkan_LIBRARIES
|
||||
${Vulkan_LIBRARY}
|
||||
glslang
|
||||
#SPIR-V
|
||||
opengl32
|
||||
glu32)
|
||||
|
||||
else()
|
||||
list(APPEND RBDOOM3_INCLUDES ${RENDERER_OPENGL_INCLUDES})
|
||||
list(APPEND RBDOOM3_SOURCES ${RENDERER_OPENGL_SOURCES})
|
||||
|
@ -1398,6 +1411,7 @@ if(MSVC)
|
|||
iphlpapi
|
||||
winmm
|
||||
wsock32.lib
|
||||
${Vulkan_LIBRARIES}
|
||||
${OpenGL_LIBRARIES}
|
||||
${OpenAL_LIBRARIES}
|
||||
${FFmpeg_LIBRARIES}
|
||||
|
|
|
@ -455,7 +455,7 @@ private:
|
|||
// RB end
|
||||
|
||||
private:
|
||||
#if !defined( USE_VULKAN )
|
||||
#if 1 //!defined( USE_VULKAN )
|
||||
int currenttmu;
|
||||
|
||||
unsigned int currentVertexBuffer;
|
||||
|
@ -474,35 +474,6 @@ public:
|
|||
return currenttmu;
|
||||
}
|
||||
|
||||
#if 0
|
||||
unsigned short gammaTable[ 256 ]; // brightness / gamma modify this
|
||||
|
||||
idStr rendererString;
|
||||
idStr vendorString;
|
||||
idStr versionString;
|
||||
idStr extensionsString;
|
||||
idStr wglExtensionsString;
|
||||
idStr shadingLanguageString;
|
||||
|
||||
float glVersion; // atof( version_string )
|
||||
graphicsVendor_t vendor;
|
||||
|
||||
int maxTextureSize; // queried from GL
|
||||
int maxTextureCoords;
|
||||
int maxTextureImageUnits;
|
||||
int uniformBufferOffsetAlignment;
|
||||
|
||||
int colorBits;
|
||||
int depthBits;
|
||||
int stencilBits;
|
||||
|
||||
bool depthBoundsTestAvailable;
|
||||
bool timerQueryAvailable;
|
||||
bool swapControlTearAvailable;
|
||||
|
||||
int displayFrequency;
|
||||
#endif
|
||||
|
||||
#endif // !defined( USE_VULKAN )
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue