mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-21 11:31:21 +00:00
ioquake3 resync to commit 972635ea from b1e6ef14
Build QVMs even if there is no QVM JIT OpenGL2: Fix border for cg_viewsize using HDR/FB-MSAA w/postProcess OpenGL2: Fix r_clear when using HDR/FB-MSAA OpenGL2: Fix FB-MSAA on AMD Windows driver OpenGL2: Fix updating the loading screen with r_cubeMapping 1
This commit is contained in:
parent
a19b0be747
commit
91aebdd96f
4 changed files with 25 additions and 23 deletions
|
@ -48,7 +48,7 @@ ifndef BUILD_AUTOUPDATER # DON'T build unless you mean to!
|
|||
endif
|
||||
|
||||
# ioquake3 git commit that this is based on
|
||||
IOQ3_REVISION = b1e6ef14
|
||||
IOQ3_REVISION = 972635ea
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
|
@ -1090,7 +1090,6 @@ endif
|
|||
|
||||
ifneq ($(HAVE_VM_COMPILED),true)
|
||||
BASE_CFLAGS += -DNO_VM_COMPILED
|
||||
BUILD_GAME_QVM=0
|
||||
endif
|
||||
|
||||
TARGETS =
|
||||
|
|
|
@ -342,9 +342,7 @@ void RB_BeginDrawingView (void) {
|
|||
{
|
||||
FBO_t *fbo = backEnd.viewParms.targetFbo;
|
||||
|
||||
// FIXME: HUGE HACK: render to the screen fbo if we've already postprocessed the frame and aren't drawing more world
|
||||
// drawing more world check is in case of double renders, such as skyportals
|
||||
if (fbo == NULL && !(backEnd.framePostProcessed && (backEnd.refdef.rdflags & RDF_NOWORLDMODEL)))
|
||||
if (fbo == NULL && (!r_postProcess->integer || !(backEnd.refdef.rdflags & RDF_NOWORLDMODEL)))
|
||||
fbo = tr.renderFbo;
|
||||
|
||||
if (tr.renderCubeFbo && fbo == tr.renderCubeFbo)
|
||||
|
@ -708,10 +706,9 @@ void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, const byte *
|
|||
ri.Printf( PRINT_ALL, "qglTexSubImage2D %i, %i: %i msec\n", cols, rows, end - start );
|
||||
}
|
||||
|
||||
// FIXME: HUGE hack
|
||||
if (glRefConfig.framebufferObject)
|
||||
{
|
||||
FBO_Bind(backEnd.framePostProcessed ? NULL : tr.renderFbo);
|
||||
FBO_Bind(r_postProcess->integer ? NULL : tr.renderFbo);
|
||||
}
|
||||
|
||||
RB_SetGL2D();
|
||||
|
@ -795,9 +792,8 @@ const void *RB_StretchPic ( const void *data ) {
|
|||
|
||||
cmd = (const stretchPicCommand_t *)data;
|
||||
|
||||
// FIXME: HUGE hack
|
||||
if (glRefConfig.framebufferObject)
|
||||
FBO_Bind(backEnd.framePostProcessed ? NULL : tr.renderFbo);
|
||||
FBO_Bind(r_postProcess->integer ? NULL : tr.renderFbo);
|
||||
|
||||
RB_SetGL2D();
|
||||
|
||||
|
@ -1173,6 +1169,13 @@ const void *RB_DrawSurfs( const void *data ) {
|
|||
qglGenerateTextureMipmapEXT(cubemap->image->texnum, GL_TEXTURE_CUBE_MAP);
|
||||
}
|
||||
|
||||
// FIXME? backEnd.viewParms doesn't get properly initialized for 2D drawing.
|
||||
// r_cubeMapping 1 generates cubemaps with R_RenderCubemapSide()
|
||||
// and sets isMirror = qtrue. Clear it here to prevent it from leaking
|
||||
// to 2D drawing and causing the loading screen to be culled.
|
||||
backEnd.viewParms.isMirror = qfalse;
|
||||
backEnd.viewParms.flags = 0;
|
||||
|
||||
return (const void *)(cmd + 1);
|
||||
}
|
||||
|
||||
|
@ -1201,6 +1204,13 @@ const void *RB_DrawBuffer( const void *data ) {
|
|||
if ( r_clear->integer ) {
|
||||
qglClearColor( 1, 0, 0.5, 1 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
|
||||
if (glRefConfig.framebufferObject && tr.renderFbo) {
|
||||
FBO_Bind(tr.renderFbo);
|
||||
|
||||
qglClearColor( 1, 0, 0.5, 1 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
return (const void *)(cmd + 1);
|
||||
|
@ -1313,14 +1323,7 @@ const void *RB_ClearDepth(const void *data)
|
|||
|
||||
if (glRefConfig.framebufferObject)
|
||||
{
|
||||
if (!tr.renderFbo || backEnd.framePostProcessed)
|
||||
{
|
||||
FBO_Bind(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
FBO_Bind(tr.renderFbo);
|
||||
}
|
||||
FBO_Bind(tr.renderFbo);
|
||||
}
|
||||
|
||||
qglClear(GL_DEPTH_BUFFER_BIT);
|
||||
|
@ -1378,7 +1381,7 @@ const void *RB_SwapBuffers( const void *data ) {
|
|||
|
||||
if (glRefConfig.framebufferObject)
|
||||
{
|
||||
if (!backEnd.framePostProcessed)
|
||||
if (!r_postProcess->integer)
|
||||
{
|
||||
if (tr.msaaResolveFbo && r_hdr->integer)
|
||||
{
|
||||
|
@ -1401,7 +1404,6 @@ const void *RB_SwapBuffers( const void *data ) {
|
|||
|
||||
GLimp_EndFrame();
|
||||
|
||||
backEnd.framePostProcessed = qfalse;
|
||||
backEnd.projection2D = qfalse;
|
||||
|
||||
return (const void *)(cmd + 1);
|
||||
|
@ -1655,8 +1657,6 @@ const void *RB_PostProcess(const void *data)
|
|||
}
|
||||
#endif
|
||||
|
||||
backEnd.framePostProcessed = qtrue;
|
||||
|
||||
return (const void *)(cmd + 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,9 +170,13 @@ void FBO_CreateBuffer(FBO_t *fbo, int format, int index, int multisample)
|
|||
}
|
||||
|
||||
absent = *pRenderBuffer == 0;
|
||||
if (absent)
|
||||
if (absent) {
|
||||
qglGenRenderbuffers(1, pRenderBuffer);
|
||||
|
||||
// workaround AMD Windows driver requiring bind to create renderbuffer
|
||||
GL_BindRenderbuffer(*pRenderBuffer);
|
||||
}
|
||||
|
||||
if (multisample && glRefConfig.framebufferMultisample)
|
||||
qglNamedRenderbufferStorageMultisampleEXT(*pRenderBuffer, multisample, format, fbo->width, fbo->height);
|
||||
else
|
||||
|
|
|
@ -1472,7 +1472,6 @@ typedef struct {
|
|||
|
||||
FBO_t *last2DFBO;
|
||||
qboolean colorMask[4];
|
||||
qboolean framePostProcessed;
|
||||
qboolean depthFill;
|
||||
} backEndState_t;
|
||||
|
||||
|
|
Loading…
Reference in a new issue