diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a66ede47..897d78721 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -801,6 +801,7 @@ file( GLOB HEADER_FILES polyrenderer/*.h polyrenderer/math/*.h polyrenderer/drawers/*.h + polyrenderer/drawers/*.php polyrenderer/scene/*.h gl/*.h gl/api/*.h diff --git a/src/polyrenderer/drawers/poly_buffer.cpp b/src/polyrenderer/drawers/poly_buffer.cpp index 5ad9f4474..291e05acb 100644 --- a/src/polyrenderer/drawers/poly_buffer.cpp +++ b/src/polyrenderer/drawers/poly_buffer.cpp @@ -34,7 +34,7 @@ #include "v_palette.h" #include "r_data/colormaps.h" #include "poly_buffer.h" -#include "swrenderer/drawers/r_drawers.h" +#include "screen_triangle.h" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/polyrenderer/drawers/poly_draw_args.h b/src/polyrenderer/drawers/poly_draw_args.h index 78e6d07a2..bf38ffab9 100644 --- a/src/polyrenderer/drawers/poly_draw_args.h +++ b/src/polyrenderer/drawers/poly_draw_args.h @@ -24,7 +24,7 @@ #include "r_data/r_translate.h" #include "r_data/colormaps.h" -#include "swrenderer/drawers/r_drawers.h" +#include "screen_triangle.h" class FTexture; diff --git a/src/polyrenderer/drawers/poly_triangle.h b/src/polyrenderer/drawers/poly_triangle.h index bc2357b48..8debeec8a 100644 --- a/src/polyrenderer/drawers/poly_triangle.h +++ b/src/polyrenderer/drawers/poly_triangle.h @@ -24,7 +24,7 @@ #include "swrenderer/drawers/r_draw.h" #include "swrenderer/drawers/r_thread.h" -#include "swrenderer/drawers/r_drawers.h" +#include "polyrenderer/drawers/screen_triangle.h" #include "polyrenderer/math/tri_matrix.h" #include "polyrenderer/drawers/poly_buffer.h" #include "polyrenderer/drawers/poly_draw_args.h" diff --git a/src/polyrenderer/drawers/screen_triangle.h b/src/polyrenderer/drawers/screen_triangle.h index 1f11aad54..cd2a6cbe0 100644 --- a/src/polyrenderer/drawers/screen_triangle.h +++ b/src/polyrenderer/drawers/screen_triangle.h @@ -22,7 +22,126 @@ #pragma once -#include "swrenderer/drawers/r_drawers.h" +#include +#include + +class FString; + +struct TriFullSpan +{ + uint16_t X; + uint16_t Y; + uint32_t Length; +}; + +struct TriPartialBlock +{ + uint16_t X; + uint16_t Y; + uint32_t Mask0; + uint32_t Mask1; +}; + +struct WorkerThreadData +{ + int32_t core; + int32_t num_cores; + int32_t pass_start_y; + int32_t pass_end_y; + uint32_t *temp; + + // Triangle working data: + TriFullSpan *FullSpans; + TriPartialBlock *PartialBlocks; + uint32_t NumFullSpans; + uint32_t NumPartialBlocks; + int32_t StartX; + int32_t StartY; +}; + +struct TriVertex +{ + TriVertex() { } + TriVertex(float x, float y, float z, float w, float u, float v) : x(x), y(y), z(z), w(w) { varying[0] = u; varying[1] = v; } + + enum { NumVarying = 2 }; + float x, y, z, w; + float varying[NumVarying]; +}; + +struct TriUniforms +{ + uint32_t light; + uint32_t subsectorDepth; + uint32_t color; + uint32_t srcalpha; + uint32_t destalpha; + uint16_t light_alpha; + uint16_t light_red; + uint16_t light_green; + uint16_t light_blue; + uint16_t fade_alpha; + uint16_t fade_red; + uint16_t fade_green; + uint16_t fade_blue; + uint16_t desaturate; + float globvis; + uint32_t flags; + enum Flags + { + simple_shade = 1, + nearest_filter = 2, + fixed_light = 4 + }; +}; + +struct TriDrawTriangleArgs +{ + uint8_t *dest; + int32_t pitch; + TriVertex *v1; + TriVertex *v2; + TriVertex *v3; + int32_t clipleft; + int32_t clipright; + int32_t cliptop; + int32_t clipbottom; + const uint8_t *texturePixels; + uint32_t textureWidth; + uint32_t textureHeight; + const uint8_t *translation; + const TriUniforms *uniforms; + uint8_t *stencilValues; + uint32_t *stencilMasks; + int32_t stencilPitch; + uint8_t stencilTestValue; + uint8_t stencilWriteValue; + uint32_t *subsectorGBuffer; + const uint8_t *colormaps; + const uint8_t *RGB256k; + const uint8_t *BaseColors; +}; + +enum class TriBlendMode +{ + Copy, // blend_copy(shade(fg)) + AlphaBlend, // blend_alpha_blend(shade(fg), bg) + AddSolid, // blend_add(shade(fg), bg, srcalpha, destalpha) + Add, // blend_add(shade(fg), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + Sub, // blend_sub(shade(fg), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + RevSub, // blend_revsub(shade(fg), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + Stencil, // blend_stencil(shade(color), fg.a, bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + Shaded, // blend_stencil(shade(color), fg.index, bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + TranslateCopy, // blend_copy(shade(translate(fg))) + TranslateAlphaBlend, // blend_alpha_blend(shade(translate(fg)), bg) + TranslateAdd, // blend_add(shade(translate(fg)), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + TranslateSub, // blend_sub(shade(translate(fg)), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + TranslateRevSub,// blend_revsub(shade(translate(fg)), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) + AddSrcColorOneMinusSrcColor, // glBlendMode(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR) used by GZDoom's fullbright additive sprites + Skycap // Fade to sky color when the V texture coordinate go beyond the [-1, 1] range +}; + +inline int NumTriBlendModes() { return (int)TriBlendMode::Skycap + 1; } class ScreenTriangle { diff --git a/src/swrenderer/drawers/r_draw.h b/src/swrenderer/drawers/r_draw.h index 66843cc4e..29b908398 100644 --- a/src/swrenderer/drawers/r_draw.h +++ b/src/swrenderer/drawers/r_draw.h @@ -6,7 +6,6 @@ struct FSWColormap; struct FLightNode; -struct TriLight; EXTERN_CVAR(Bool, r_multithreaded); EXTERN_CVAR(Bool, r_magfilter); diff --git a/src/swrenderer/drawers/r_draw_pal.cpp b/src/swrenderer/drawers/r_draw_pal.cpp index fcd14a27b..358bafbd3 100644 --- a/src/swrenderer/drawers/r_draw_pal.cpp +++ b/src/swrenderer/drawers/r_draw_pal.cpp @@ -115,7 +115,7 @@ namespace swrenderer _step_viewpos_z = args.dc_viewpos_step.Z; } - uint8_t PalWall1Command::AddLights(const TriLight *lights, int num_lights, float viewpos_z, uint8_t fg, uint8_t material) + uint8_t PalWall1Command::AddLights(const DrawerLight *lights, int num_lights, float viewpos_z, uint8_t fg, uint8_t material) { uint32_t lit_r = 0; uint32_t lit_g = 0; @@ -175,7 +175,7 @@ namespace swrenderer uint8_t *dest = _dest; int bits = _fracbits; int pitch = _pitch; - TriLight *dynlights = _dynlights; + DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_z = _viewpos_z; float step_viewpos_z = _step_viewpos_z; @@ -226,7 +226,7 @@ namespace swrenderer uint8_t *dest = _dest; int bits = _fracbits; int pitch = _pitch; - TriLight *dynlights = _dynlights; + DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_z = _viewpos_z; float step_viewpos_z = _step_viewpos_z; @@ -347,7 +347,7 @@ namespace swrenderer uint8_t *dest = _dest; int bits = _fracbits; int pitch = _pitch; - TriLight *dynlights = _dynlights; + DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_z = _viewpos_z; float step_viewpos_z = _step_viewpos_z; @@ -421,7 +421,7 @@ namespace swrenderer uint8_t *dest = _dest; int bits = _fracbits; int pitch = _pitch; - TriLight *dynlights = _dynlights; + DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_z = _viewpos_z; float step_viewpos_z = _step_viewpos_z; @@ -494,7 +494,7 @@ namespace swrenderer uint8_t *dest = _dest; int bits = _fracbits; int pitch = _pitch; - TriLight *dynlights = _dynlights; + DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_z = _viewpos_z; float step_viewpos_z = _step_viewpos_z; @@ -1874,7 +1874,7 @@ namespace swrenderer _step_viewpos_x = args.dc_viewpos_step.X; } - uint8_t PalSpanCommand::AddLights(const TriLight *lights, int num_lights, float viewpos_x, uint8_t fg, uint8_t material) + uint8_t PalSpanCommand::AddLights(const DrawerLight *lights, int num_lights, float viewpos_x, uint8_t fg, uint8_t material) { uint32_t lit_r = 0; uint32_t lit_g = 0; @@ -1949,7 +1949,7 @@ namespace swrenderer xstep = _xstep; ystep = _ystep; - const TriLight *dynlights = _dynlights; + const DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_x = _viewpos_x; float step_viewpos_x = _step_viewpos_x; @@ -2037,7 +2037,7 @@ namespace swrenderer xstep = _xstep; ystep = _ystep; - const TriLight *dynlights = _dynlights; + const DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_x = _viewpos_x; float step_viewpos_x = _step_viewpos_x; @@ -2113,7 +2113,7 @@ namespace swrenderer const PalEntry *palette = GPalette.BaseColors; - const TriLight *dynlights = _dynlights; + const DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_x = _viewpos_x; float step_viewpos_x = _step_viewpos_x; @@ -2219,7 +2219,7 @@ namespace swrenderer const PalEntry *palette = GPalette.BaseColors; - const TriLight *dynlights = _dynlights; + const DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_x = _viewpos_x; float step_viewpos_x = _step_viewpos_x; @@ -2360,7 +2360,7 @@ namespace swrenderer uint32_t *bg2rgb = _destblend; const PalEntry *palette = GPalette.BaseColors; - const TriLight *dynlights = _dynlights; + const DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_x = _viewpos_x; float step_viewpos_x = _step_viewpos_x; @@ -2483,7 +2483,7 @@ namespace swrenderer uint32_t *bg2rgb = _destblend; const PalEntry *palette = GPalette.BaseColors; - const TriLight *dynlights = _dynlights; + const DrawerLight *dynlights = _dynlights; int num_dynlights = _num_dynlights; float viewpos_x = _viewpos_x; float step_viewpos_x = _step_viewpos_x; diff --git a/src/swrenderer/drawers/r_draw_pal.h b/src/swrenderer/drawers/r_draw_pal.h index efc6d6a17..dc499d79e 100644 --- a/src/swrenderer/drawers/r_draw_pal.h +++ b/src/swrenderer/drawers/r_draw_pal.h @@ -18,7 +18,7 @@ namespace swrenderer FString DebugInfo() override { return "PalWallCommand"; } protected: - inline static uint8_t AddLights(const TriLight *lights, int num_lights, float viewpos_z, uint8_t fg, uint8_t material); + inline static uint8_t AddLights(const DrawerLight *lights, int num_lights, float viewpos_z, uint8_t fg, uint8_t material); uint32_t _iscale; uint32_t _texturefrac; @@ -31,7 +31,7 @@ namespace swrenderer int _pitch; uint32_t *_srcblend; uint32_t *_destblend; - TriLight *_dynlights; + DrawerLight *_dynlights; int _num_dynlights; float _viewpos_z; float _step_viewpos_z; @@ -134,7 +134,7 @@ namespace swrenderer FString DebugInfo() override { return "PalSpanCommand"; } protected: - inline static uint8_t AddLights(const TriLight *lights, int num_lights, float viewpos_x, uint8_t fg, uint8_t material); + inline static uint8_t AddLights(const DrawerLight *lights, int num_lights, float viewpos_x, uint8_t fg, uint8_t material); const uint8_t *_source; const uint8_t *_colormap; @@ -153,7 +153,7 @@ namespace swrenderer int _color; fixed_t _srcalpha; fixed_t _destalpha; - TriLight *_dynlights; + DrawerLight *_dynlights; int _num_dynlights; float _viewpos_x; float _step_viewpos_x; diff --git a/src/swrenderer/drawers/r_draw_rgba.cpp b/src/swrenderer/drawers/r_draw_rgba.cpp index f9c120a59..36f85f6e4 100644 --- a/src/swrenderer/drawers/r_draw_rgba.cpp +++ b/src/swrenderer/drawers/r_draw_rgba.cpp @@ -36,7 +36,6 @@ #include "v_palette.h" #include "r_data/colormaps.h" #include "r_draw_rgba.h" -#include "r_drawers.h" #include "gl/data/gl_matrix.h" #include "swrenderer/viewport/r_viewport.h" #include "swrenderer/scene/r_light.h" diff --git a/src/swrenderer/drawers/r_draw_rgba.h b/src/swrenderer/drawers/r_draw_rgba.h index 1ed068f82..2eab9a185 100644 --- a/src/swrenderer/drawers/r_draw_rgba.h +++ b/src/swrenderer/drawers/r_draw_rgba.h @@ -25,7 +25,6 @@ #include "r_draw.h" #include "v_palette.h" #include "r_thread.h" -#include "r_drawers.h" #include "swrenderer/viewport/r_skydrawer.h" #include "swrenderer/viewport/r_spandrawer.h" #include "swrenderer/viewport/r_walldrawer.h" diff --git a/src/swrenderer/drawers/r_drawers.h b/src/swrenderer/drawers/r_drawers.h deleted file mode 100644 index 6205940bf..000000000 --- a/src/swrenderer/drawers/r_drawers.h +++ /dev/null @@ -1,151 +0,0 @@ -/* -** LLVM code generated drawers -** Copyright (c) 2016 Magnus Norddahl -** -** This software is provided 'as-is', without any express or implied -** warranty. In no event will the authors be held liable for any damages -** arising from the use of this software. -** -** Permission is granted to anyone to use this software for any purpose, -** including commercial applications, and to alter it and redistribute it -** freely, subject to the following restrictions: -** -** 1. The origin of this software must not be misrepresented; you must not -** claim that you wrote the original software. If you use this software -** in a product, an acknowledgment in the product documentation would be -** appreciated but is not required. -** 2. Altered source versions must be plainly marked as such, and must not be -** misrepresented as being the original software. -** 3. This notice may not be removed or altered from any source distribution. -** -*/ - -#pragma once - -#include -#include - -class FString; - -struct TriFullSpan -{ - uint16_t X; - uint16_t Y; - uint32_t Length; -}; - -struct TriPartialBlock -{ - uint16_t X; - uint16_t Y; - uint32_t Mask0; - uint32_t Mask1; -}; - -struct WorkerThreadData -{ - int32_t core; - int32_t num_cores; - int32_t pass_start_y; - int32_t pass_end_y; - uint32_t *temp; - - // Triangle working data: - TriFullSpan *FullSpans; - TriPartialBlock *PartialBlocks; - uint32_t NumFullSpans; - uint32_t NumPartialBlocks; - int32_t StartX; - int32_t StartY; -}; - -struct TriLight -{ - uint32_t color; - float x, y, z; - float radius; -}; - -struct TriVertex -{ - TriVertex() { } - TriVertex(float x, float y, float z, float w, float u, float v) : x(x), y(y), z(z), w(w) { varying[0] = u; varying[1] = v; } - - enum { NumVarying = 2 }; - float x, y, z, w; - float varying[NumVarying]; -}; - -struct TriUniforms -{ - uint32_t light; - uint32_t subsectorDepth; - uint32_t color; - uint32_t srcalpha; - uint32_t destalpha; - uint16_t light_alpha; - uint16_t light_red; - uint16_t light_green; - uint16_t light_blue; - uint16_t fade_alpha; - uint16_t fade_red; - uint16_t fade_green; - uint16_t fade_blue; - uint16_t desaturate; - float globvis; - uint32_t flags; - enum Flags - { - simple_shade = 1, - nearest_filter = 2, - fixed_light = 4 - }; -}; - -struct TriDrawTriangleArgs -{ - uint8_t *dest; - int32_t pitch; - TriVertex *v1; - TriVertex *v2; - TriVertex *v3; - int32_t clipleft; - int32_t clipright; - int32_t cliptop; - int32_t clipbottom; - const uint8_t *texturePixels; - uint32_t textureWidth; - uint32_t textureHeight; - const uint8_t *translation; - const TriUniforms *uniforms; - uint8_t *stencilValues; - uint32_t *stencilMasks; - int32_t stencilPitch; - uint8_t stencilTestValue; - uint8_t stencilWriteValue; - uint32_t *subsectorGBuffer; - const uint8_t *colormaps; - const uint8_t *RGB256k; - const uint8_t *BaseColors; -}; - -enum class TriBlendMode -{ - Copy, // blend_copy(shade(fg)) - AlphaBlend, // blend_alpha_blend(shade(fg), bg) - AddSolid, // blend_add(shade(fg), bg, srcalpha, destalpha) - Add, // blend_add(shade(fg), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - Sub, // blend_sub(shade(fg), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - RevSub, // blend_revsub(shade(fg), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - Stencil, // blend_stencil(shade(color), fg.a, bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - Shaded, // blend_stencil(shade(color), fg.index, bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - TranslateCopy, // blend_copy(shade(translate(fg))) - TranslateAlphaBlend, // blend_alpha_blend(shade(translate(fg)), bg) - TranslateAdd, // blend_add(shade(translate(fg)), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - TranslateSub, // blend_sub(shade(translate(fg)), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - TranslateRevSub,// blend_revsub(shade(translate(fg)), bg, srcalpha, calc_blend_bgalpha(fg, destalpha)) - AddSrcColorOneMinusSrcColor, // glBlendMode(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR) used by GZDoom's fullbright additive sprites - Skycap // Fade to sky color when the V texture coordinate go beyond the [-1, 1] range -}; - -inline int NumTriBlendModes() { return (int)TriBlendMode::Skycap + 1; } diff --git a/src/swrenderer/drawers/r_thread.h b/src/swrenderer/drawers/r_thread.h index da24854eb..cc8d33eab 100644 --- a/src/swrenderer/drawers/r_thread.h +++ b/src/swrenderer/drawers/r_thread.h @@ -23,7 +23,7 @@ #pragma once #include "r_draw.h" -#include "r_drawers.h" +#include "polyrenderer/drawers/screen_triangle.h" #include #include #include diff --git a/src/swrenderer/line/r_walldraw.cpp b/src/swrenderer/line/r_walldraw.cpp index 1d2760e76..5f4cd8485 100644 --- a/src/swrenderer/line/r_walldraw.cpp +++ b/src/swrenderer/line/r_walldraw.cpp @@ -29,7 +29,6 @@ #include "v_palette.h" #include "r_data/colormaps.h" #include "gl/dynlights/gl_dynlight.h" -#include "swrenderer/drawers/r_drawers.h" #include "swrenderer/drawers/r_draw.h" #include "swrenderer/segments/r_drawsegment.h" #include "swrenderer/scene/r_opaque_pass.h" @@ -200,7 +199,7 @@ namespace swrenderer } drawerargs.dc_num_lights = 0; - drawerargs.dc_lights = Thread->FrameMemory->AllocMemory(max_lights); + drawerargs.dc_lights = Thread->FrameMemory->AllocMemory(max_lights); // Setup lights for column cur_node = light_list; diff --git a/src/swrenderer/plane/r_flatplane.cpp b/src/swrenderer/plane/r_flatplane.cpp index 2d1b6ae94..28961baad 100644 --- a/src/swrenderer/plane/r_flatplane.cpp +++ b/src/swrenderer/plane/r_flatplane.cpp @@ -204,7 +204,7 @@ namespace swrenderer drawerargs.dc_viewpos.Z = (float)((viewport->CenterY - y - 0.5) / viewport->InvZtoScale * zspan); drawerargs.dc_viewpos_step.X = (float)(zspan / viewport->CenterX); - static TriLight lightbuffer[64 * 1024]; + static DrawerLight lightbuffer[64 * 1024]; static int nextlightindex = 0; // Plane normal diff --git a/src/swrenderer/r_swcanvas.cpp b/src/swrenderer/r_swcanvas.cpp index ce089272b..73d17ca3c 100644 --- a/src/swrenderer/r_swcanvas.cpp +++ b/src/swrenderer/r_swcanvas.cpp @@ -43,7 +43,6 @@ #include "textures/textures.h" #include "r_data/voxels.h" #include "drawers/r_draw_rgba.h" -#include "drawers/r_drawers.h" EXTERN_CVAR(Bool, r_blendmethod) diff --git a/src/swrenderer/r_swrenderer.cpp b/src/swrenderer/r_swrenderer.cpp index 0366886ce..75a53102b 100644 --- a/src/swrenderer/r_swrenderer.cpp +++ b/src/swrenderer/r_swrenderer.cpp @@ -47,7 +47,6 @@ #include "textures/textures.h" #include "r_data/voxels.h" #include "drawers/r_draw_rgba.h" -#include "drawers/r_drawers.h" #include "polyrenderer/poly_renderer.h" #include "p_setup.h" diff --git a/src/swrenderer/viewport/r_drawerargs.h b/src/swrenderer/viewport/r_drawerargs.h index 3172a5440..ad77dadd2 100644 --- a/src/swrenderer/viewport/r_drawerargs.h +++ b/src/swrenderer/viewport/r_drawerargs.h @@ -13,7 +13,6 @@ struct FSWColormap; struct FLightNode; -struct TriLight; namespace swrenderer { @@ -21,6 +20,13 @@ namespace swrenderer class DrawerArgs; struct ShadeConstants; + struct DrawerLight + { + uint32_t color; + float x, y, z; + float radius; + }; + class DrawerArgs { public: diff --git a/src/swrenderer/viewport/r_skydrawer.h b/src/swrenderer/viewport/r_skydrawer.h index 938950968..b4d23a7ee 100644 --- a/src/swrenderer/viewport/r_skydrawer.h +++ b/src/swrenderer/viewport/r_skydrawer.h @@ -5,7 +5,6 @@ struct FSWColormap; struct FLightNode; -struct TriLight; namespace swrenderer { diff --git a/src/swrenderer/viewport/r_spandrawer.h b/src/swrenderer/viewport/r_spandrawer.h index 8275cc6d5..368ae8a32 100644 --- a/src/swrenderer/viewport/r_spandrawer.h +++ b/src/swrenderer/viewport/r_spandrawer.h @@ -5,7 +5,6 @@ struct FSWColormap; struct FLightNode; -struct TriLight; namespace swrenderer { @@ -54,7 +53,7 @@ namespace swrenderer FVector3 dc_normal; FVector3 dc_viewpos; FVector3 dc_viewpos_step; - TriLight *dc_lights = nullptr; + DrawerLight *dc_lights = nullptr; int dc_num_lights = 0; private: diff --git a/src/swrenderer/viewport/r_spritedrawer.h b/src/swrenderer/viewport/r_spritedrawer.h index bca4664aa..31d3861d9 100644 --- a/src/swrenderer/viewport/r_spritedrawer.h +++ b/src/swrenderer/viewport/r_spritedrawer.h @@ -5,7 +5,6 @@ struct FSWColormap; struct FLightNode; -struct TriLight; namespace swrenderer { diff --git a/src/swrenderer/viewport/r_walldrawer.h b/src/swrenderer/viewport/r_walldrawer.h index 68a3ea46f..e6d530932 100644 --- a/src/swrenderer/viewport/r_walldrawer.h +++ b/src/swrenderer/viewport/r_walldrawer.h @@ -5,7 +5,6 @@ struct FSWColormap; struct FLightNode; -struct TriLight; namespace swrenderer { @@ -54,7 +53,7 @@ namespace swrenderer FVector3 dc_normal; FVector3 dc_viewpos; FVector3 dc_viewpos_step; - TriLight *dc_lights = nullptr; + DrawerLight *dc_lights = nullptr; int dc_num_lights = 0; private: