2016-03-01 15:47:10 +00:00
|
|
|
|
2017-01-15 00:36:57 +00:00
|
|
|
#pragma once
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2017-01-15 00:36:57 +00:00
|
|
|
#include "r_renderer.h"
|
2017-02-03 23:25:37 +00:00
|
|
|
#include "r_renderthread.h"
|
2016-12-20 22:21:34 +00:00
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
struct FSoftwareRenderer : public FRenderer
|
|
|
|
{
|
2016-09-29 00:10:14 +00:00
|
|
|
FSoftwareRenderer();
|
|
|
|
~FSoftwareRenderer();
|
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
// Can be overridden so that the colormaps for sector color/fade won't be built.
|
2017-01-15 01:50:37 +00:00
|
|
|
bool UsesColormap() const override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2017-01-15 01:50:37 +00:00
|
|
|
// precache textures
|
|
|
|
void Precache(BYTE *texhitlist, TMap<PClassActor*, bool> &actorhitlist) override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// render 3D view
|
2017-01-15 01:50:37 +00:00
|
|
|
void RenderView(player_t *player) override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// Remap voxel palette
|
2017-01-15 01:50:37 +00:00
|
|
|
void RemapVoxels() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// renders view to a savegame picture
|
2017-01-15 01:50:37 +00:00
|
|
|
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)
|
2017-01-15 01:50:37 +00:00
|
|
|
void DrawRemainingPlayerSprites() override;
|
2016-09-21 07:01:12 +00:00
|
|
|
|
2017-01-15 01:50:37 +00:00
|
|
|
int GetMaxViewPitch(bool down) override;
|
2016-11-09 11:07:07 +00:00
|
|
|
bool RequireGLNodes() override;
|
2016-09-21 07:01:12 +00:00
|
|
|
|
2017-01-15 01:50:37 +00:00
|
|
|
void OnModeSet() override;
|
2017-01-15 02:21:35 +00:00
|
|
|
void SetClearColor(int color) override;
|
2016-09-21 07:01:12 +00:00
|
|
|
void Init() override;
|
|
|
|
void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) override;
|
2017-01-03 17:55:12 +00:00
|
|
|
sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2017-01-15 00:36:57 +00:00
|
|
|
void StateChanged(AActor *actor) override;
|
|
|
|
void PreprocessLevel() override;
|
|
|
|
void CleanLevelData() override;
|
2016-12-20 22:21:34 +00:00
|
|
|
|
2017-01-15 01:50:37 +00:00
|
|
|
private:
|
|
|
|
void PrecacheTexture(FTexture *tex, int cache);
|
2017-02-03 23:25:37 +00:00
|
|
|
|
|
|
|
swrenderer::RenderThread mMainThread;
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|