2019-02-20 20:21:57 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "gl_sysfb.h"
|
|
|
|
#include "vk_device.h"
|
|
|
|
#include "vk_objects.h"
|
|
|
|
|
|
|
|
class VkSamplerManager;
|
2019-02-21 21:49:00 +00:00
|
|
|
class VkShaderManager;
|
|
|
|
class VkRenderState;
|
2019-02-20 20:21:57 +00:00
|
|
|
|
|
|
|
class VulkanFrameBuffer : public SystemBaseFrameBuffer
|
|
|
|
{
|
|
|
|
typedef SystemBaseFrameBuffer Super;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
VulkanDevice *device;
|
2019-02-21 11:31:14 +00:00
|
|
|
|
|
|
|
VulkanCommandBuffer *GetUploadCommands();
|
|
|
|
VulkanCommandBuffer *GetDrawCommands();
|
2019-02-20 20:21:57 +00:00
|
|
|
|
|
|
|
VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev);
|
|
|
|
~VulkanFrameBuffer();
|
|
|
|
|
|
|
|
void Update();
|
|
|
|
|
|
|
|
void InitializeState() override;
|
|
|
|
|
|
|
|
void CleanForRestart() override;
|
|
|
|
void UpdatePalette() override;
|
|
|
|
uint32_t GetCaps() override;
|
|
|
|
void WriteSavePic(player_t *player, FileWriter *file, int width, int height) override;
|
|
|
|
sector_t *RenderView(player_t *player) override;
|
|
|
|
void UnbindTexUnit(int no) override;
|
|
|
|
void TextureFilterChanged() override;
|
|
|
|
void BeginFrame() override;
|
|
|
|
void BlurScene(float amount) override;
|
2019-02-21 11:31:14 +00:00
|
|
|
|
|
|
|
FModelRenderer *CreateModelRenderer(int mli) override;
|
2019-02-20 20:21:57 +00:00
|
|
|
IShaderProgram *CreateShaderProgram() override;
|
2019-02-21 11:31:14 +00:00
|
|
|
IVertexBuffer *CreateVertexBuffer() override;
|
|
|
|
IIndexBuffer *CreateIndexBuffer() override;
|
|
|
|
IDataBuffer *CreateDataBuffer(int bindingpoint, bool ssbo) override;
|
2019-02-20 20:21:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
bool WipeStartScreen(int type);
|
|
|
|
void WipeEndScreen();
|
|
|
|
bool WipeDo(int ticks);
|
|
|
|
void WipeCleanup();
|
|
|
|
*/
|
|
|
|
|
|
|
|
void SetVSync(bool vsync);
|
|
|
|
|
|
|
|
void Draw2D() override;
|
|
|
|
|
|
|
|
private:
|
2019-02-21 21:49:00 +00:00
|
|
|
std::unique_ptr<VkShaderManager> mShaderManager;
|
2019-02-21 11:31:14 +00:00
|
|
|
std::unique_ptr<VkSamplerManager> mSamplerManager;
|
|
|
|
std::unique_ptr<VulkanCommandPool> mGraphicsCommandPool;
|
|
|
|
std::unique_ptr<VulkanCommandBuffer> mUploadCommands;
|
|
|
|
std::unique_ptr<VulkanCommandBuffer> mPresentCommands;
|
2019-02-21 21:49:00 +00:00
|
|
|
std::unique_ptr<VkRenderState> mRenderState;
|
2019-02-21 11:31:14 +00:00
|
|
|
|
2019-02-20 20:21:57 +00:00
|
|
|
int camtexcount = 0;
|
2019-02-21 09:19:59 +00:00
|
|
|
|
|
|
|
int lastSwapWidth = 0;
|
|
|
|
int lastSwapHeight = 0;
|
2019-02-20 20:21:57 +00:00
|
|
|
};
|
2019-02-21 11:31:14 +00:00
|
|
|
|
|
|
|
inline VulkanFrameBuffer *GetVulkanFrameBuffer() { return static_cast<VulkanFrameBuffer*>(screen); }
|