gzdoom-gles/src/r_renderer.h
alexey.lysiuk 56557a17f1 - fixed output of software renderers with Vulkan backend
Vulkan hardware buffer for software canvas may have some padding
Software renderers should be aware of buffer's pitch in order to copy pixels properly

https://forum.zdoom.org/viewtopic.php?t=64562
2019-05-08 22:02:05 +03:00

45 lines
1,007 B
C++

#ifndef __R_RENDERER_H
#define __R_RENDERER_H
#include <stdio.h>
struct FRenderer;
extern FRenderer *SWRenderer;
class FSerializer;
class FTexture;
class AActor;
class player_t;
struct sector_t;
class FCanvasTexture;
class FileWriter;
class DCanvas;
struct FLevelLocals;
struct FRenderer
{
virtual ~FRenderer() {}
// precache one texture
virtual void Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitlist) = 0;
// render 3D view
virtual void RenderView(player_t *player, DCanvas *target, void *videobuffer, int bufferpitch) = 0;
// renders view to a savegame picture
virtual void WriteSavePic(player_t *player, FileWriter *file, int width, int height) = 0;
// draws player sprites with hardware acceleration (only useful for software rendering)
virtual void DrawRemainingPlayerSprites() = 0;
// set up the colormap for a newly loaded level.
virtual void SetColormap(FLevelLocals *) = 0;
virtual void SetClearColor(int color) = 0;
virtual void Init() = 0;
};
#endif