- moved the draw lists back to the API independent side.

The original idea was to let Vulkan do this completely differently, but if that comes to pass it should be done without having generic data maintenance code on the API side.
This commit is contained in:
Christoph Oelckers 2018-10-28 19:06:29 +01:00
parent df15f00a21
commit cb4ffbf053
4 changed files with 12 additions and 24 deletions

View file

@ -821,7 +821,6 @@ set( FASTMATH_SOURCES
textures/hires/xbr/xbrz_old.cpp textures/hires/xbr/xbrz_old.cpp
gl/scene/gl_drawinfo.cpp gl/scene/gl_drawinfo.cpp
gl/scene/gl_scene.cpp gl/scene/gl_scene.cpp
gl/scene/gl_walls_draw.cpp
gl_load/gl_load.c gl_load/gl_load.c
hwrenderer/postprocessing/hw_postprocess_cvars.cpp hwrenderer/postprocessing/hw_postprocess_cvars.cpp
hwrenderer/postprocessing/hw_postprocessshader.cpp hwrenderer/postprocessing/hw_postprocessshader.cpp
@ -831,6 +830,7 @@ set( FASTMATH_SOURCES
hwrenderer/scene/hw_decal.cpp hwrenderer/scene/hw_decal.cpp
hwrenderer/scene/hw_drawinfo.cpp hwrenderer/scene/hw_drawinfo.cpp
hwrenderer/scene/hw_drawlist.cpp hwrenderer/scene/hw_drawlist.cpp
hwrenderer/scene/hw_drawlistadd.cpp
hwrenderer/scene/hw_clipper.cpp hwrenderer/scene/hw_clipper.cpp
hwrenderer/scene/hw_flats.cpp hwrenderer/scene/hw_flats.cpp
hwrenderer/scene/hw_portal.cpp hwrenderer/scene/hw_portal.cpp

View file

@ -14,11 +14,6 @@
struct FDrawInfo : public HWDrawInfo struct FDrawInfo : public HWDrawInfo
{ {
void AddWall(GLWall *wall) override;
void AddMirrorSurface(GLWall *w) override;
void AddFlat(GLFlat *flat, bool fog) override;
void AddSprite(GLSprite *sprite, bool translucent) override;
void Draw(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) override; void Draw(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) override;
void DrawIndexed(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) override; void DrawIndexed(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) override;
void RenderPortal(HWPortal *p, bool stencil) override; void RenderPortal(HWPortal *p, bool stencil) override;

View file

@ -351,10 +351,10 @@ public:
void ProcessLowerMinisegs(TArray<seg_t *> &lowersegs); void ProcessLowerMinisegs(TArray<seg_t *> &lowersegs);
virtual void AddSubsectorToPortal(FSectorPortalGroup *portal, subsector_t *sub) = 0; virtual void AddSubsectorToPortal(FSectorPortalGroup *portal, subsector_t *sub) = 0;
virtual void AddWall(GLWall *w) = 0; void AddWall(GLWall *w);
virtual void AddMirrorSurface(GLWall *w) = 0; void AddMirrorSurface(GLWall *w);
virtual void AddFlat(GLFlat *flat, bool fog) = 0; void AddFlat(GLFlat *flat, bool fog);
virtual void AddSprite(GLSprite *sprite, bool translucent) = 0; void AddSprite(GLSprite *sprite, bool translucent);
virtual bool SetDepthClamp(bool on) = 0; virtual bool SetDepthClamp(bool on) = 0;

View file

@ -20,19 +20,12 @@
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// //
#include "gl_load/gl_system.h"
#include "p_local.h"
#include "p_lnspec.h"
#include "a_sharedglobal.h"
#include "g_levellocals.h"
#include "actorinlines.h"
#include "hwrenderer/dynlights/hw_dynlightdata.h" #include "hwrenderer/dynlights/hw_dynlightdata.h"
#include "gl_load/gl_interface.h"
#include "hwrenderer/utility/hw_cvars.h" #include "hwrenderer/utility/hw_cvars.h"
#include "gl/renderer/gl_renderer.h"
#include "hwrenderer/dynlights/hw_lightbuffer.h" #include "hwrenderer/dynlights/hw_lightbuffer.h"
#include "gl/scene/gl_drawinfo.h" #include "hwrenderer/scene/hw_drawstructs.h"
#include "hwrenderer/scene/hw_drawinfo.h"
#include "hwrenderer/textures/hw_material.h"
EXTERN_CVAR(Bool, gl_seamless) EXTERN_CVAR(Bool, gl_seamless)
@ -42,7 +35,7 @@ EXTERN_CVAR(Bool, gl_seamless)
// //
//========================================================================== //==========================================================================
void FDrawInfo::AddWall(GLWall *wall) void HWDrawInfo::AddWall(GLWall *wall)
{ {
if (wall->flags & GLWall::GLWF_TRANSLUCENT) if (wall->flags & GLWall::GLWF_TRANSLUCENT)
{ {
@ -73,7 +66,7 @@ void FDrawInfo::AddWall(GLWall *wall)
// //
//========================================================================== //==========================================================================
void FDrawInfo::AddMirrorSurface(GLWall *w) void HWDrawInfo::AddMirrorSurface(GLWall *w)
{ {
w->type = RENDERWALL_MIRRORSURFACE; w->type = RENDERWALL_MIRRORSURFACE;
auto newwall = drawlists[GLDL_TRANSLUCENTBORDER].NewWall(); auto newwall = drawlists[GLDL_TRANSLUCENTBORDER].NewWall();
@ -99,7 +92,7 @@ void FDrawInfo::AddMirrorSurface(GLWall *w)
// //
//========================================================================== //==========================================================================
void FDrawInfo::AddFlat(GLFlat *flat, bool fog) void HWDrawInfo::AddFlat(GLFlat *flat, bool fog)
{ {
int list; int list;
@ -138,7 +131,7 @@ void FDrawInfo::AddFlat(GLFlat *flat, bool fog)
// //
// //
//========================================================================== //==========================================================================
void FDrawInfo::AddSprite(GLSprite *sprite, bool translucent) void HWDrawInfo::AddSprite(GLSprite *sprite, bool translucent)
{ {
int list; int list;
// [BB] Allow models to be drawn in the GLDL_TRANSLUCENT pass. // [BB] Allow models to be drawn in the GLDL_TRANSLUCENT pass.