Skip to content

Commit

Permalink
- remove softpoly scene drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed May 22, 2019
1 parent 0eda298 commit 48d2d42
Show file tree
Hide file tree
Showing 44 changed files with 48 additions and 6,693 deletions.
17 changes: 0 additions & 17 deletions src/CMakeLists.txt
Expand Up @@ -713,7 +713,6 @@ file( GLOB HEADER_FILES
rendering/polyrenderer/*.h
rendering/polyrenderer/math/*.h
rendering/polyrenderer/drawers/*.h
rendering/polyrenderer/scene/*.h
rendering/polyrenderer/backend/*.h
rendering/hwrenderer/data/*.h
rendering/hwrenderer/dynlights/*.h
Expand Down Expand Up @@ -786,21 +785,6 @@ set ( SWRENDER_SOURCES
)

set( POLYRENDER_SOURCES
rendering/polyrenderer/poly_renderer.cpp
rendering/polyrenderer/poly_renderthread.cpp
rendering/polyrenderer/scene/poly_scene.cpp
rendering/polyrenderer/scene/poly_portal.cpp
rendering/polyrenderer/scene/poly_cull.cpp
rendering/polyrenderer/scene/poly_decal.cpp
rendering/polyrenderer/scene/poly_particle.cpp
rendering/polyrenderer/scene/poly_plane.cpp
rendering/polyrenderer/scene/poly_playersprite.cpp
rendering/polyrenderer/scene/poly_wall.cpp
rendering/polyrenderer/scene/poly_wallsprite.cpp
rendering/polyrenderer/scene/poly_sprite.cpp
rendering/polyrenderer/scene/poly_model.cpp
rendering/polyrenderer/scene/poly_sky.cpp
rendering/polyrenderer/scene/poly_light.cpp
rendering/polyrenderer/drawers/poly_buffer.cpp
rendering/polyrenderer/drawers/poly_triangle.cpp
rendering/polyrenderer/drawers/poly_draw_args.cpp
Expand Down Expand Up @@ -1564,7 +1548,6 @@ source_group("Rendering\\Software Renderer\\Viewport" REGULAR_EXPRESSION "^${CMA
source_group("Rendering\\Poly Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/.+")
source_group("Rendering\\Poly Renderer\\Math" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/math/.+")
source_group("Rendering\\Poly Renderer\\Drawers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/drawers/.+")
source_group("Rendering\\Poly Renderer\\Scene" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/scene/.+")
source_group("Rendering\\Poly Renderer\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/backend/.+")
source_group("Render Data" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_data/.+")
source_group("Render Data\\Models" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_data/models/.+")
Expand Down
11 changes: 3 additions & 8 deletions src/rendering/polyrenderer/drawers/poly_draw_args.cpp
Expand Up @@ -36,7 +36,7 @@
#include "swrenderer/r_swcolormaps.h"
#include "poly_draw_args.h"
#include "swrenderer/viewport/r_viewport.h"
#include "polyrenderer/poly_renderthread.h"
#include "polyrenderer/drawers/poly_triangle.h"

void PolyDrawArgs::SetTexture(const uint8_t *texels, int width, int height)
{
Expand Down Expand Up @@ -97,13 +97,6 @@ void PolyDrawArgs::SetLight(FSWColormap *base_colormap, uint32_t lightlevel, dou
{
mGlobVis = (float)globVis;

PolyCameraLight *cameraLight = PolyCameraLight::Instance();
if (cameraLight->FixedLightLevel() >= 0 || cameraLight->FixedColormap())
{
lightlevel = cameraLight->FixedLightLevel() >= 0 ? cameraLight->FixedLightLevel() : 255;
fixed = true;
}

mLight = clamp<uint32_t>(lightlevel, 0, 255);
mFixedLight = fixed;
mLightRed = base_colormap->Color.r;
Expand Down Expand Up @@ -203,6 +196,7 @@ void PolyDrawArgs::SetStyle(const FRenderStyle &renderstyle, double alpha, uint3

/////////////////////////////////////////////////////////////////////////////

#if 0
void RectDrawArgs::SetTexture(FSoftwareTexture *texture, FRenderStyle style)
{
mTexture = texture;
Expand Down Expand Up @@ -351,3 +345,4 @@ void RectDrawArgs::SetStyle(const FRenderStyle &renderstyle, double alpha, uint3
SetStyle(Translation() ? TriBlendMode::AddShadedTranslated : TriBlendMode::AddShaded, alpha);
}
}
#endif
2 changes: 2 additions & 0 deletions src/rendering/polyrenderer/drawers/poly_draw_args.h
Expand Up @@ -167,6 +167,7 @@ class PolyDrawArgs
uint32_t mDynLightColor = 0;
};

#if 0
class RectDrawArgs
{
public:
Expand Down Expand Up @@ -233,3 +234,4 @@ class RectDrawArgs
bool mSimpleShade = true;
float mX0, mX1, mY0, mY1, mU0, mU1, mV0, mV1;
};
#endif
3 changes: 2 additions & 1 deletion src/rendering/polyrenderer/drawers/poly_triangle.cpp
Expand Up @@ -35,7 +35,6 @@
#include "v_palette.h"
#include "r_data/colormaps.h"
#include "poly_triangle.h"
#include "polyrenderer/poly_renderer.h"
#include "swrenderer/drawers/r_draw_rgba.h"
#include "screen_triangle.h"
#include "x86.h"
Expand Down Expand Up @@ -724,6 +723,7 @@ void DrawPolyTrianglesCommand::Execute(DrawerThread *thread)

/////////////////////////////////////////////////////////////////////////////

#if 0
void DrawRectCommand::Execute(DrawerThread *thread)
{
auto renderTarget = PolyRenderer::Instance()->RenderTarget;
Expand All @@ -737,3 +737,4 @@ void DrawRectCommand::Execute(DrawerThread *thread)
else
ScreenTriangle::RectDrawers8[blendmode](destOrg, destWidth, destHeight, destPitch, &args, PolyTriangleThreadData::Get(thread));
}
#endif
2 changes: 2 additions & 0 deletions src/rendering/polyrenderer/drawers/poly_triangle.h
Expand Up @@ -240,6 +240,7 @@ class DrawPolyTrianglesCommand : public PolyDrawerCommand
PolyDrawMode mode;
};

#if 0
class DrawRectCommand : public PolyDrawerCommand
{
public:
Expand All @@ -250,3 +251,4 @@ class DrawRectCommand : public PolyDrawerCommand
private:
RectDrawArgs args;
};
#endif
4 changes: 4 additions & 0 deletions src/rendering/polyrenderer/drawers/screen_triangle.cpp
Expand Up @@ -1588,6 +1588,7 @@ void DrawSpan8(int y, int x0, int x1, const TriDrawTriangleArgs *args, PolyTrian
}
}

#if 0
template<typename ModeT>
void DrawRect8(const void *destOrg, int destWidth, int destHeight, int destPitch, const RectDrawArgs *args, PolyTriangleThreadData *thread)
{
Expand Down Expand Up @@ -2115,6 +2116,7 @@ void DrawRect32(const void *destOrg, int destWidth, int destHeight, int destPitc
else
DrawRectOpt32<ModeT, DrawerOptCF>(destOrg, destWidth, destHeight, destPitch, args, thread);
}
#endif

void(*ScreenTriangle::SpanDrawers8[])(int, int, int, const TriDrawTriangleArgs *, PolyTriangleThreadData *) =
{
Expand Down Expand Up @@ -2180,6 +2182,7 @@ void(*ScreenTriangle::SpanDrawers32[])(int, int, int, const TriDrawTriangleArgs
&DrawSpan32<TriScreenDrawerModes::StyleAddShadedTranslated>
};

#if 0
void(*ScreenTriangle::RectDrawers8[])(const void *, int, int, int, const RectDrawArgs *, PolyTriangleThreadData *) =
{
&DrawRect8<TriScreenDrawerModes::StyleOpaque>,
Expand Down Expand Up @@ -2243,6 +2246,7 @@ void(*ScreenTriangle::RectDrawers32[])(const void *, int, int, int, const RectDr
&DrawRect32<TriScreenDrawerModes::StyleAddStencilTranslated>,
&DrawRect32<TriScreenDrawerModes::StyleAddShadedTranslated>
};
#endif

void(*ScreenTriangle::TriangleDrawers[])(const TriDrawTriangleArgs *args, PolyTriangleThreadData *thread, int16_t *edges, int topY, int bottomY) =
{
Expand Down
3 changes: 3 additions & 0 deletions src/rendering/polyrenderer/drawers/screen_triangle.h
Expand Up @@ -25,6 +25,7 @@
#include <cstdint>
#include <vector>
#include "r_data/renderstyle.h"
#include "rendering/swrenderer/drawers/r_draw.h"

class FString;
class PolyDrawArgs;
Expand Down Expand Up @@ -138,8 +139,10 @@ class ScreenTriangle

static void(*SpanDrawers8[])(int y, int x0, int x1, const TriDrawTriangleArgs *args, PolyTriangleThreadData *thread);
static void(*SpanDrawers32[])(int y, int x0, int x1, const TriDrawTriangleArgs *args, PolyTriangleThreadData *thread);
#if 0
static void(*RectDrawers8[])(const void *, int, int, int, const RectDrawArgs *, PolyTriangleThreadData *);
static void(*RectDrawers32[])(const void *, int, int, int, const RectDrawArgs *, PolyTriangleThreadData *);
#endif

static int FuzzStart;
};
Expand Down
15 changes: 0 additions & 15 deletions src/rendering/polyrenderer/poly_all.cpp
@@ -1,21 +1,6 @@
#include "../swrenderer/textures/r_swtexture.h"
#include "poly_renderer.cpp"
#include "poly_renderthread.cpp"
#include "drawers/poly_buffer.cpp"
#include "drawers/poly_draw_args.cpp"
#include "drawers/poly_triangle.cpp"
#include "drawers/screen_triangle.cpp"
#include "math/gpu_types.cpp"
#include "scene/poly_cull.cpp"
#include "scene/poly_decal.cpp"
#include "scene/poly_particle.cpp"
#include "scene/poly_plane.cpp"
#include "scene/poly_playersprite.cpp"
#include "scene/poly_portal.cpp"
#include "scene/poly_scene.cpp"
#include "scene/poly_sky.cpp"
#include "scene/poly_sprite.cpp"
#include "scene/poly_model.cpp"
#include "scene/poly_wall.cpp"
#include "scene/poly_wallsprite.cpp"
#include "scene/poly_light.cpp"

0 comments on commit 48d2d42

Please sign in to comment.