2016-03-01 15:47:10 +00:00
|
|
|
#ifndef __R_SWRENDERER_H
|
|
|
|
#define __R_SWRENDERER_H
|
|
|
|
|
|
|
|
#include "r_renderer.h"
|
|
|
|
|
|
|
|
struct FSoftwareRenderer : public FRenderer
|
|
|
|
{
|
|
|
|
// Can be overridden so that the colormaps for sector color/fade won't be built.
|
2016-09-21 07:01:12 +00:00
|
|
|
virtual bool UsesColormap() const override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// precache one texture
|
2016-05-01 20:47:36 +00:00
|
|
|
void PrecacheTexture(FTexture *tex, int cache);
|
2016-09-21 07:01:12 +00:00
|
|
|
virtual void Precache(BYTE *texhitlist, TMap<PClassActor*, bool> &actorhitlist) override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// render 3D view
|
2016-09-21 07:01:12 +00:00
|
|
|
virtual void RenderView(player_t *player) override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// Remap voxel palette
|
2016-09-21 07:01:12 +00:00
|
|
|
virtual void RemapVoxels() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// renders view to a savegame picture
|
2016-09-21 07:01:12 +00:00
|
|
|
virtual void WriteSavePic (player_t *player, FileWriter *file, int width, int height) override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// draws player sprites with hardware acceleration (only useful for software rendering)
|
2016-09-21 07:01:12 +00:00
|
|
|
virtual void DrawRemainingPlayerSprites() override;
|
|
|
|
|
|
|
|
virtual int GetMaxViewPitch(bool down) override;
|
|
|
|
|
|
|
|
void OnModeSet () override;
|
|
|
|
void ErrorCleanup () override;
|
|
|
|
void ClearBuffer(int color) override;
|
|
|
|
void Init() override;
|
|
|
|
void SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight, float trueratio) override;
|
|
|
|
void SetupFrame(player_t *player) override;
|
|
|
|
void CopyStackedViewParameters() override;
|
|
|
|
void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) override;
|
|
|
|
sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel, bool back) override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|