gzdoom/src/r_renderer.h

49 lines
1 KiB
C
Raw Normal View History

2016-03-01 15:47:10 +00:00
#ifndef __R_RENDERER_H
#define __R_RENDERER_H
#include <stdio.h>
struct FRenderer;
extern FRenderer *SWRenderer;
class FSerializer;
2016-03-01 15:47:10 +00:00
class FTexture;
class AActor;
class player_t;
struct sector_t;
class FCanvasTexture;
class FileWriter;
2016-03-01 15:47:10 +00:00
struct FRenderer
{
virtual ~FRenderer() {}
2016-03-01 15:47:10 +00:00
// precache one texture
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;
2016-03-01 15:47:10 +00:00
// renders view to a savegame picture
virtual void WriteSavePic(player_t *player, FileWriter *file, int width, int height) = 0;
// render to a camera texture
virtual void RenderTextureView(FCanvasTexture *tex, AActor *viewpoint, double fov) = 0;
2016-03-01 15:47:10 +00:00
// draws player sprites with hardware acceleration (only useful for software rendering)
virtual void DrawRemainingPlayerSprites() = 0;
2016-03-01 15:47:10 +00:00
// set up the colormap for a newly loaded level.
virtual void SetColormap() = 0;
virtual void OnModeSet() = 0;
virtual void SetClearColor(int color) = 0;
virtual void Init() = 0;
2016-03-01 15:47:10 +00:00
};
#endif