mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-22 17:52:10 +00:00
Fixed Linux build under Kubuntu 18.10
This commit is contained in:
parent
1e6064518f
commit
eb60a374fe
9 changed files with 51 additions and 20 deletions
|
@ -36,7 +36,7 @@ _______________________________
|
|||
- Added Steel Storm 2 Engine render demo fixes
|
||||
|
||||
- Merged LordHavoc's image compression progress bar which shows up in the map loading screen
|
||||
when loading new images from mods
|
||||
when loading and compressing new images from mods
|
||||
|
||||
- Added instructions how to use these Doom 3 port with the GOG installer
|
||||
|
||||
|
|
|
@ -1518,6 +1518,25 @@ else()
|
|||
${STUBAUDIO_SOURCES}
|
||||
${DOOMCLASSIC_STUBAUDIO_SOURCES})
|
||||
endif()
|
||||
|
||||
if(USE_VULKAN)
|
||||
list(APPEND RBDOOM3_INCLUDES ${RENDERER_VULKAN_INCLUDES})
|
||||
list(APPEND RBDOOM3_SOURCES ${RENDERER_VULKAN_SOURCES})
|
||||
|
||||
set(Vulkan_LIBRARIES
|
||||
${Vulkan_LIBRARY}
|
||||
glslang
|
||||
SPIRV
|
||||
)
|
||||
|
||||
if(ENABLE_GLSLANG_BINARIES)
|
||||
list(APPEND Vulkan_LIBRARIES glslang-default-resource-limits)
|
||||
endif()
|
||||
|
||||
else()
|
||||
list(APPEND RBDOOM3_INCLUDES ${RENDERER_OPENGL_INCLUDES})
|
||||
list(APPEND RBDOOM3_SOURCES ${RENDERER_OPENGL_SOURCES})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@ cd ..
|
|||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DSDL2=ON ../neo
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DSDL2=ON -DOpenGL_GL_PREFERENCE=GLVND ../neo
|
||||
|
|
|
@ -33,6 +33,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
idCVar r_showBuffers( "r_showBuffers", "0", CVAR_INTEGER, "" );
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
==================
|
||||
IsWriteCombined
|
||||
|
@ -51,7 +52,7 @@ bool IsWriteCombined( void* base )
|
|||
bool isWriteCombined = ( ( info.AllocationProtect & PAGE_WRITECOMBINE ) != 0 );
|
||||
return isWriteCombined;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(USE_INTRINSICS)
|
||||
|
||||
|
@ -329,4 +330,4 @@ void idUniformBuffer::Reference( const idUniformBuffer& other, int refOffset, in
|
|||
allocation = other.allocation;
|
||||
#endif
|
||||
assert( OwnsBuffer() == false );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ bool idVertexBuffer::AllocBufferObject( const void* data, int allocSize, bufferU
|
|||
|
||||
if( r_showBuffers.GetBool() )
|
||||
{
|
||||
idLib::Printf( "vertex buffer alloc %p, api %p (%i bytes)\n", this, GetAPIObject(), GetSize() );
|
||||
idLib::Printf( "vertex buffer alloc %p, api %p (%i bytes)\n", this, ( GLuint* )&apiObject, GetSize() );
|
||||
}
|
||||
|
||||
// copy the data
|
||||
|
@ -164,7 +164,7 @@ void idVertexBuffer::FreeBufferObject()
|
|||
|
||||
if( r_showBuffers.GetBool() )
|
||||
{
|
||||
idLib::Printf( "vertex buffer free %p, api %p (%i bytes)\n", this, GetAPIObject(), GetSize() );
|
||||
idLib::Printf( "vertex buffer free %p, api %p (%i bytes)\n", this, ( GLuint* )&apiObject, GetSize() );
|
||||
}
|
||||
|
||||
glDeleteBuffers( 1, ( GLuint* )&apiObject );
|
||||
|
@ -344,7 +344,7 @@ bool idIndexBuffer::AllocBufferObject( const void* data, int allocSize, bufferUs
|
|||
|
||||
if( r_showBuffers.GetBool() )
|
||||
{
|
||||
idLib::Printf( "index buffer alloc %p, api %p (%i bytes)\n", this, GetAPIObject(), GetSize() );
|
||||
idLib::Printf( "index buffer alloc %p, api %p (%i bytes)\n", this, ( GLuint* )&apiObject, GetSize() );
|
||||
}
|
||||
|
||||
// copy the data
|
||||
|
@ -382,7 +382,7 @@ void idIndexBuffer::FreeBufferObject()
|
|||
|
||||
if( r_showBuffers.GetBool() )
|
||||
{
|
||||
idLib::Printf( "index buffer free %p, api %p (%i bytes)\n", this, GetAPIObject(), GetSize() );
|
||||
idLib::Printf( "index buffer free %p, api %p (%i bytes)\n", this, ( GLuint* )&apiObject, GetSize() );
|
||||
}
|
||||
|
||||
glDeleteBuffers( 1, ( GLuint* )&apiObject );
|
||||
|
@ -550,7 +550,7 @@ bool idUniformBuffer::AllocBufferObject( const void* data, int allocSize, buffer
|
|||
|
||||
if( r_showBuffers.GetBool() )
|
||||
{
|
||||
idLib::Printf( "joint buffer alloc %p, api %p (%i joints)\n", this, GetAPIObject(), GetSize() );
|
||||
idLib::Printf( "joint buffer alloc %p, api %p (%i joints)\n", this, ( GLuint* )&apiObject, GetSize() );
|
||||
}
|
||||
|
||||
// copy the data
|
||||
|
@ -588,7 +588,7 @@ void idUniformBuffer::FreeBufferObject()
|
|||
|
||||
if( r_showBuffers.GetBool() )
|
||||
{
|
||||
idLib::Printf( "joint buffer free %p, api %p (%i size)\n", this, GetAPIObject(), GetSize() );
|
||||
idLib::Printf( "joint buffer free %p, api %p (%i size)\n", this, ( GLuint* )&apiObject, GetSize() );
|
||||
}
|
||||
|
||||
glBindBuffer( GL_UNIFORM_BUFFER, 0 );
|
||||
|
@ -692,4 +692,4 @@ void idUniformBuffer::ClearWithoutFreeing()
|
|||
size = 0;
|
||||
offsetInOtherBuffer = OWNS_BUFFER_FLAG;
|
||||
apiObject = 0xFFFF;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@ idRenderProgManager::LoadGLSLShader
|
|||
*/
|
||||
void idRenderProgManager::LoadShader( shader_t& shader )
|
||||
{
|
||||
|
||||
idStr inFile;
|
||||
idStr outFileHLSL;
|
||||
idStr outFileGLSL;
|
||||
|
@ -200,9 +199,21 @@ void idRenderProgManager::LoadShader( shader_t& shader )
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: we should really scan the program source code for using rpEnableSkinning but at this
|
||||
// point we directly load a binary and the program source code is not available on the consoles
|
||||
bool hasGPUSkinning = false;
|
||||
|
||||
if( idStr::Icmp( shader.name.c_str(), "heatHaze" ) == 0 ||
|
||||
idStr::Icmp( shader.name.c_str(), "heatHazeWithMask" ) == 0 ||
|
||||
idStr::Icmp( shader.name.c_str(), "heatHazeWithMaskAndVertex" ) == 0 ||
|
||||
( BIT( USE_GPU_SKINNING ) & shader.shaderFeatures ) )
|
||||
{
|
||||
hasGPUSkinning = true;
|
||||
}
|
||||
|
||||
idStr hlslCode( hlslFileBuffer );
|
||||
idStr programHLSL = StripDeadCode( hlslCode, inFile, compileMacros, shader.builtin );
|
||||
programGLSL = ConvertCG2GLSL( programHLSL, inFile, shader.stage == SHADER_STAGE_VERTEX, programUniforms, glConfig.driverType == GLDRV_VULKAN );
|
||||
programGLSL = ConvertCG2GLSL( programHLSL, inFile.c_str(), shader.stage, programUniforms, false, hasGPUSkinning );
|
||||
|
||||
fileSystem->WriteFile( outFileHLSL, programHLSL.c_str(), programHLSL.Length(), "fs_savepath" );
|
||||
fileSystem->WriteFile( outFileGLSL, programGLSL.c_str(), programGLSL.Length(), "fs_savepath" );
|
||||
|
@ -566,4 +577,4 @@ idRenderBackend::ResizeImages
|
|||
void idRenderBackend::ResizeImages()
|
||||
{
|
||||
// TODO resize framebuffers here
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,9 +123,9 @@ struct debugPolygon_t
|
|||
|
||||
void RB_SetMVP( const idRenderMatrix& mvp );
|
||||
void RB_SetVertexColorParms( stageVertexColor_t svc );
|
||||
void RB_GetShaderTextureMatrix( const float* shaderRegisters, const textureStage_t* texture, float matrix[16] );
|
||||
void RB_LoadShaderTextureMatrix( const float* shaderRegisters, const textureStage_t* texture );
|
||||
void RB_BakeTextureMatrixIntoTexgen( idPlane lightProject[3], const float* textureMatrix );
|
||||
//void RB_GetShaderTextureMatrix( const float* shaderRegisters, const textureStage_t* texture, float matrix[16] );
|
||||
//void RB_LoadShaderTextureMatrix( const float* shaderRegisters, const textureStage_t* texture );
|
||||
//void RB_BakeTextureMatrixIntoTexgen( idPlane lightProject[3], const float* textureMatrix );
|
||||
|
||||
//bool ChangeDisplaySettingsIfNeeded( gfxImpParms_t parms );
|
||||
//bool CreateGameWindow( gfxImpParms_t parms );
|
||||
|
@ -486,4 +486,4 @@ public:
|
|||
#endif // !defined( USE_VULKAN )
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
#include <SDL.h>
|
||||
|
||||
#include "renderer/tr_local.h"
|
||||
#include "renderer/RenderCommon.h"
|
||||
#include "sdl_local.h"
|
||||
#include "../posix/posix_public.h"
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
#include <SDL.h>
|
||||
|
||||
#include "renderer/tr_local.h"
|
||||
#include "renderer/RenderCommon.h"
|
||||
#include "sdl_local.h"
|
||||
|
||||
idCVar in_nograb( "in_nograb", "0", CVAR_SYSTEM | CVAR_NOCHEAT, "prevents input grabbing" );
|
||||
|
|
Loading…
Reference in a new issue