2016-03-01 15:47:10 +00:00
|
|
|
#ifndef __R_RENDERER_H
|
|
|
|
#define __R_RENDERER_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
struct FRenderer;
|
|
|
|
extern FRenderer *Renderer;
|
2016-09-20 21:13:12 +00:00
|
|
|
class FSerializer;
|
2016-03-01 15:47:10 +00:00
|
|
|
class FTexture;
|
|
|
|
class AActor;
|
|
|
|
class player_t;
|
|
|
|
struct sector_t;
|
|
|
|
class FCanvasTexture;
|
2016-09-21 07:01:12 +00:00
|
|
|
class FileWriter;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
struct FRenderer
|
|
|
|
{
|
|
|
|
FRenderer()
|
|
|
|
{
|
|
|
|
Renderer = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~FRenderer()
|
|
|
|
{
|
|
|
|
Renderer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
// precache one texture
|
2017-03-09 18:54:41 +00:00
|
|
|
virtual void Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitlist) = 0;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// render 3D view
|
|
|
|
virtual void RenderView(player_t *player) = 0;
|
|
|
|
|
|
|
|
// 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) = 0;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// draws player sprites with hardware acceleration (only useful for software rendering)
|
|
|
|
virtual void DrawRemainingPlayerSprites() {}
|
|
|
|
|
|
|
|
virtual void OnModeSet () {}
|
2017-01-15 02:21:35 +00:00
|
|
|
virtual void SetClearColor(int color) = 0;
|
2017-08-31 20:37:29 +00:00
|
|
|
virtual void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, double fov) = 0;
|
2016-03-01 15:47:10 +00:00
|
|
|
virtual void PreprocessLevel() {}
|
|
|
|
|
2017-07-29 15:03:40 +00:00
|
|
|
virtual uint32_t GetCaps() { return 0; }
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|