gzdoom/src/swrenderer/r_swcanvas.h
Christoph Oelckers 9a24771a7d - refactored FDynamicColormap out of sector_t.
This has increasingly become an obstacle with the hardware renderer, so now the values are being stored as plain data in the sector, with the software renderer getting the actual color tables when needed. While this is a bit slower than storing the pregenerated colormap, in realistic situations the added time is mostly negligible in the microseconds range.
2017-03-15 22:04:59 +01:00

22 lines
958 B
C++

#pragma once
#include "v_video.h"
#include "r_data/colormaps.h"
class SWCanvas
{
public:
static void DrawTexture(DCanvas *canvas, FTexture *img, DrawParms &parms);
static void FillSimplePoly(DCanvas *canvas, FTexture *tex, FVector2 *points, int npoints,
double originx, double originy, double scalex, double scaley, DAngle rotation,
const FColormap &colormap, PalEntry flatcolor, int lightlevel, int bottomclip);
static void DrawLine(DCanvas *canvas, int x0, int y0, int x1, int y1, int palColor, uint32_t realcolor);
static void DrawPixel(DCanvas *canvas, int x, int y, int palColor, uint32_t realcolor);
static void Clear(DCanvas *canvas, int left, int top, int right, int bottom, int palcolor, uint32_t color);
static void Dim(DCanvas *canvas, PalEntry color, float damount, int x1, int y1, int w, int h);
private:
static void PUTTRANSDOT(DCanvas *canvas, int xx, int yy, int basecolor, int level);
static int PalFromRGB(uint32_t rgb);
};