mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- fixed: The culling mode for translucent models must be inverted when rendering a mirror.
This commit is contained in:
parent
e1d6f6f3b3
commit
6438416adb
2 changed files with 4 additions and 1 deletions
|
@ -46,6 +46,7 @@
|
||||||
#include "gl/system/gl_interface.h"
|
#include "gl/system/gl_interface.h"
|
||||||
#include "gl/renderer/gl_renderer.h"
|
#include "gl/renderer/gl_renderer.h"
|
||||||
#include "gl/scene/gl_drawinfo.h"
|
#include "gl/scene/gl_drawinfo.h"
|
||||||
|
#include "gl/scene/gl_portal.h"
|
||||||
#include "gl/models/gl_models.h"
|
#include "gl/models/gl_models.h"
|
||||||
#include "gl/textures/gl_material.h"
|
#include "gl/textures/gl_material.h"
|
||||||
#include "gl/utility/gl_convert.h"
|
#include "gl/utility/gl_convert.h"
|
||||||
|
@ -100,7 +101,7 @@ void FGLModelRenderer::BeginDrawHUDModel(AActor *actor, const VSMatrix &objectTo
|
||||||
if (!(actor->RenderStyle == LegacyRenderStyles[STYLE_Normal]))
|
if (!(actor->RenderStyle == LegacyRenderStyles[STYLE_Normal]))
|
||||||
{
|
{
|
||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
glFrontFace(GL_CCW);
|
glFrontFace(GLPortal::isMirrored()? GL_CW : GL_CCW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_RenderState.mModelMatrix = objectToWorldMatrix;
|
gl_RenderState.mModelMatrix = objectToWorldMatrix;
|
||||||
|
|
|
@ -167,6 +167,8 @@ public:
|
||||||
return recursion;
|
return recursion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool isMirrored() { return !!((MirrorFlag ^ PlaneMirrorFlag) & 1); }
|
||||||
|
|
||||||
virtual int ClipSeg(seg_t *seg) { return PClip_Inside; }
|
virtual int ClipSeg(seg_t *seg) { return PClip_Inside; }
|
||||||
virtual int ClipSubsector(subsector_t *sub) { return PClip_Inside; }
|
virtual int ClipSubsector(subsector_t *sub) { return PClip_Inside; }
|
||||||
virtual int ClipPoint(const DVector2 &pos) { return PClip_Inside; }
|
virtual int ClipPoint(const DVector2 &pos) { return PClip_Inside; }
|
||||||
|
|
Loading…
Reference in a new issue