mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 10:38:53 +00:00
Merge branch 'master' into vkdoom3-merge
This commit is contained in:
commit
72091f73ca
12 changed files with 47 additions and 27 deletions
|
@ -45,29 +45,29 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#define PRESSKEY "press any button."
|
||||
#define PRESSYN "press y or n."
|
||||
#define QUITMSG "are you sure you want to\nquit this great game?"
|
||||
#define LOADNET "you can't do load while in a net game!\n\n"PRESSKEY
|
||||
#define QLOADNET "you can't quickload during a netgame!\n\n"PRESSKEY
|
||||
#define QSAVESPOT "you haven't picked a quicksave slot yet!\n\n"PRESSKEY
|
||||
#define SAVEDEAD "you can't save if you aren't playing!\n\n"PRESSKEY
|
||||
#define QSPROMPT "quicksave over your game named\n\n'%s'?\n\n"PRESSYN
|
||||
#define QLPROMPT "do you want to quickload the game named\n\n'%s'?\n\n"PRESSYN
|
||||
#define LOADNET "you can't do load while in a net game!\n\n" PRESSKEY
|
||||
#define QLOADNET "you can't quickload during a netgame!\n\n" PRESSKEY
|
||||
#define QSAVESPOT "you haven't picked a quicksave slot yet!\n\n" PRESSKEY
|
||||
#define SAVEDEAD "you can't save if you aren't playing!\n\n" PRESSKEY
|
||||
#define QSPROMPT "quicksave over your game named\n\n'%s'?\n\n" PRESSYN
|
||||
#define QLPROMPT "do you want to quickload the game named\n\n'%s'?\n\n" PRESSYN
|
||||
|
||||
#define NEWGAME \
|
||||
"you can't start a new game\n"\
|
||||
"while in a network game.\n\n"PRESSKEY
|
||||
"while in a network game.\n\n" PRESSKEY
|
||||
|
||||
#define NIGHTMARE \
|
||||
"are you sure? this skill level\n"\
|
||||
"isn't even remotely fair.\n\n"PRESSYN
|
||||
"isn't even remotely fair.\n\n" PRESSYN
|
||||
|
||||
#define SWSTRING \
|
||||
"this is the shareware version of doom.\n\n"\
|
||||
"you need to order the entire trilogy.\n\n"PRESSKEY
|
||||
"you need to order the entire trilogy.\n\n" PRESSKEY
|
||||
|
||||
#define MSGOFF "Messages OFF"
|
||||
#define MSGON "Messages ON"
|
||||
#define NETEND "you can't end a netgame!\n\n"PRESSKEY
|
||||
#define ENDGAME "are you sure you want to end the game?\n\n"PRESSYN
|
||||
#define NETEND "you can't end a netgame!\n\n" PRESSKEY
|
||||
#define ENDGAME "are you sure you want to end the game?\n\n" PRESSYN
|
||||
|
||||
#define DOSY "(press A to quit)"
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ typedef struct memblock_s
|
|||
#define Z_ChangeTag(p,t) \
|
||||
{ \
|
||||
if (( (memblock_t *)( (byte *)(p) - sizeof(memblock_t)))->id!=0x1d4a11) \
|
||||
I_Error("Z_CT at "__FILE__":%i",__LINE__); \
|
||||
I_Error("Z_CT at " __FILE__ ":%i",__LINE__); \
|
||||
Z_ChangeTag2((void**)&p,t); \
|
||||
};
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#define UNROLL4(Y) { int _IX, _NM = count&0xfffffffc; for (_IX=0;_IX<_NM;_IX+=4){Y(_IX+0);Y(_IX+1);Y(_IX+2);Y(_IX+3);}for(;_IX<count;_IX++){Y(_IX);}}
|
||||
#define UNROLL8(Y) { int _IX, _NM = count&0xfffffff8; for (_IX=0;_IX<_NM;_IX+=8){Y(_IX+0);Y(_IX+1);Y(_IX+2);Y(_IX+3);Y(_IX+4);Y(_IX+5);Y(_IX+6);Y(_IX+7);} _NM = count&0xfffffffe; for(;_IX<_NM;_IX+=2){Y(_IX); Y(_IX+1);} if (_IX < count) {Y(_IX);} }
|
||||
|
||||
#undef NODEFAULT
|
||||
#ifdef _DEBUG
|
||||
#define NODEFAULT default: assert( 0 )
|
||||
#else
|
||||
|
|
|
@ -215,6 +215,8 @@ bulk of the codebase, so it is the best place for analyze pragmas.
|
|||
// win32 needs this, but 360 doesn't
|
||||
#pragma warning( disable: 6540 ) // warning C6540: The use of attribute annotations on this function will invalidate all of its existing __declspec annotations [D:\tech5\engine\engine-10.vcxproj]
|
||||
|
||||
#pragma warning( disable: 4467 ) // .. Include\CodeAnalysis\SourceAnnotations.h(68): warning C4467: usage of ATL attributes is deprecated
|
||||
|
||||
#if !defined(VERIFY_FORMAT_STRING)
|
||||
// checking format strings catches a LOT of errors
|
||||
#include <CodeAnalysis\SourceAnnotations.h>
|
||||
|
|
|
@ -104,10 +104,10 @@ void Framebuffer::Init()
|
|||
globalFramebuffers.hdrFBO->Bind();
|
||||
|
||||
#if defined(USE_HDR_MSAA)
|
||||
if( r_multiSamples.GetBool() )
|
||||
if( glConfig.multisamples )
|
||||
{
|
||||
globalFramebuffers.hdrFBO->AddColorBuffer( GL_RGBA16F, 0, r_multiSamples.GetInteger() );
|
||||
globalFramebuffers.hdrFBO->AddDepthBuffer( GL_DEPTH24_STENCIL8, r_multiSamples.GetInteger() );
|
||||
globalFramebuffers.hdrFBO->AddColorBuffer( GL_RGBA16F, 0, glConfig.multisamples );
|
||||
globalFramebuffers.hdrFBO->AddDepthBuffer( GL_DEPTH24_STENCIL8, glConfig.multisamples );
|
||||
|
||||
globalFramebuffers.hdrFBO->AttachImage2D( GL_TEXTURE_2D_MULTISAMPLE, globalImages->currentRenderHDRImage, 0 );
|
||||
globalFramebuffers.hdrFBO->AttachImageDepth( GL_TEXTURE_2D_MULTISAMPLE, globalImages->currentDepthImage );
|
||||
|
@ -217,17 +217,21 @@ void Framebuffer::CheckFramebuffers()
|
|||
globalImages->currentDepthImage->Resize( screenWidth, screenHeight );
|
||||
|
||||
#if defined(USE_HDR_MSAA)
|
||||
if( r_multiSamples.GetBool() )
|
||||
if( glConfig.multisamples )
|
||||
{
|
||||
globalImages->currentRenderHDRImageNoMSAA->Resize( screenWidth, screenHeight );
|
||||
|
||||
globalFramebuffers.hdrNonMSAAFBO->Bind();
|
||||
globalFramebuffers.hdrNonMSAAFBO->AttachImage2D( GL_TEXTURE_2D, globalImages->currentRenderHDRImageNoMSAA, 0 );
|
||||
globalFramebuffers.hdrNonMSAAFBO->Check();
|
||||
|
||||
globalFramebuffers.hdrNonMSAAFBO->width = screenWidth;
|
||||
globalFramebuffers.hdrNonMSAAFBO->height = screenHeight;
|
||||
|
||||
globalFramebuffers.hdrFBO->Bind();
|
||||
globalFramebuffers.hdrFBO->AttachImage2D( GL_TEXTURE_2D_MULTISAMPLE, globalImages->currentRenderHDRImage, 0 );
|
||||
globalFramebuffers.hdrFBO->AttachImageDepth( GL_TEXTURE_2D_MULTISAMPLE, globalImages->currentDepthImage );
|
||||
globalFramebuffers.hdrFBO->Check();
|
||||
|
||||
globalFramebuffers.hdrNonMSAAFBO->width = screenWidth;
|
||||
globalFramebuffers.hdrNonMSAAFBO->height = screenHeight;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -164,7 +164,7 @@ static void R_DepthImage( idImage* image )
|
|||
{
|
||||
// RB: NULL data and MSAA support
|
||||
#if defined(USE_HDR_MSAA)
|
||||
int msaaSamples = r_multiSamples.GetInteger();
|
||||
int msaaSamples = glConfig.multisamples;
|
||||
#else
|
||||
int msaaSamples = 0;
|
||||
#endif
|
||||
|
@ -176,7 +176,7 @@ static void R_DepthImage( idImage* image )
|
|||
static void R_HDR_RGBA16FImage_ResNative( idImage* image )
|
||||
{
|
||||
#if defined(USE_HDR_MSAA)
|
||||
int msaaSamples = r_multiSamples.GetInteger();
|
||||
int msaaSamples = glConfig.multisamples;
|
||||
#else
|
||||
int msaaSamples = 0;
|
||||
#endif
|
||||
|
|
|
@ -200,7 +200,10 @@ void idRenderProgManager::Init()
|
|||
LoadFragmentShader( i );
|
||||
LoadGLSLProgram( i, i, i );
|
||||
}
|
||||
|
||||
|
||||
r_useHalfLambertLighting.ClearModified();
|
||||
r_useHDR.ClearModified();
|
||||
|
||||
// special case handling for fastZ shaders
|
||||
/*
|
||||
switch( glConfig.driverType )
|
||||
|
|
|
@ -314,6 +314,14 @@ static void R_CheckCvars()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (r_useHDR.IsModified() || r_useHalfLambertLighting.IsModified() )
|
||||
{
|
||||
r_useHDR.ClearModified();
|
||||
r_useHalfLambertLighting.ClearModified();
|
||||
renderProgManager.KillAllShaders();
|
||||
renderProgManager.LoadAllShaders();
|
||||
}
|
||||
|
||||
// RB: turn off shadow mapping for OpenGL drivers that are too slow
|
||||
switch( glConfig.driverType )
|
||||
|
|
|
@ -390,7 +390,9 @@ static void R_CheckPortableExtensions()
|
|||
}
|
||||
|
||||
// RB: Mesa support
|
||||
if( idStr::Icmpn( glConfig.renderer_string, "Mesa", 4 ) == 0 || idStr::Icmpn( glConfig.renderer_string, "X.org", 4 ) == 0 || idStr::Icmpn( glConfig.renderer_string, "Gallium", 7 ) == 0 )
|
||||
if( idStr::Icmpn( glConfig.renderer_string, "Mesa", 4 ) == 0 || idStr::Icmpn( glConfig.renderer_string, "X.org", 5 ) == 0 || idStr::Icmpn( glConfig.renderer_string, "Gallium", 7 ) == 0 ||
|
||||
strcmp( glConfig.vendor_string, "X.Org" ) == 0 ||
|
||||
idStr::Icmpn( glConfig.renderer_string, "llvmpipe", 8 ) == 0 )
|
||||
{
|
||||
if( glConfig.driverType == GLDRV_OPENGL32_CORE_PROFILE )
|
||||
{
|
||||
|
|
|
@ -4406,7 +4406,7 @@ static void RB_Tonemap( const viewDef_t* viewDef )
|
|||
GL_SelectTexture( 0 );
|
||||
|
||||
#if defined(USE_HDR_MSAA)
|
||||
if( r_multiSamples.GetInteger() > 0 )
|
||||
if( glConfig.multisamples > 0 )
|
||||
{
|
||||
globalImages->currentRenderHDRImageNoMSAA->Bind();
|
||||
}
|
||||
|
@ -5436,7 +5436,7 @@ void RB_DrawViewInternal( const viewDef_t* viewDef, const int stereoEye )
|
|||
*/
|
||||
|
||||
#if defined(USE_HDR_MSAA)
|
||||
if( r_multiSamples.GetInteger() > 0 )
|
||||
if( glConfig.multisamples > 0 )
|
||||
{
|
||||
glBindFramebuffer( GL_READ_FRAMEBUFFER, globalFramebuffers.hdrFBO->GetFramebuffer() );
|
||||
glBindFramebuffer( GL_DRAW_FRAMEBUFFER, globalFramebuffers.hdrNonMSAAFBO->GetFramebuffer() );
|
||||
|
|
|
@ -44,7 +44,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
DisplayRealTimeString
|
||||
============
|
||||
*/
|
||||
void DisplayRealTimeString( char* string, ... )
|
||||
void DisplayRealTimeString( const char* string, ... )
|
||||
{
|
||||
va_list argPtr;
|
||||
char buf[MAX_STRING_CHARS];
|
||||
|
|
|
@ -46,7 +46,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
class idBrush;
|
||||
class idBrushList;
|
||||
|
||||
void DisplayRealTimeString( char* string, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
|
||||
void DisplayRealTimeString( const char* string, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
|
||||
|
||||
|
||||
//===============================================================
|
||||
|
|
Loading…
Reference in a new issue