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-04 13:00:21 +00:00
|
|
|
#include "swrenderer/scene/r_scene.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();
|
|
|
|
|
2017-01-15 01:50:37 +00:00
|
|
|
// precache textures
|
2017-03-09 18:54:41 +00:00
|
|
|
void Precache(uint8_t *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;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2017-01-15 00:36:57 +00:00
|
|
|
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
|
|
|
|
2017-02-04 13:00:21 +00:00
|
|
|
swrenderer::RenderScene mScene;
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|