2021-09-18 10:20:28 +00:00
|
|
|
#ifndef __GLES_FRAMEBUFFER
|
|
|
|
#define __GLES_FRAMEBUFFER
|
|
|
|
|
|
|
|
#include "gl_sysfb.h"
|
|
|
|
#include "m_png.h"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace OpenGLESRenderer
|
|
|
|
{
|
|
|
|
|
|
|
|
class FHardwareTexture;
|
|
|
|
|
|
|
|
class OpenGLFrameBuffer : public SystemGLFrameBuffer
|
|
|
|
{
|
|
|
|
typedef SystemGLFrameBuffer Super;
|
|
|
|
|
|
|
|
void RenderTextureView(FCanvasTexture* tex, std::function<void(IntRect &)> renderFunc) override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit OpenGLFrameBuffer() {}
|
|
|
|
OpenGLFrameBuffer(void *hMonitor, bool fullscreen) ;
|
|
|
|
~OpenGLFrameBuffer();
|
2022-08-03 12:13:42 +00:00
|
|
|
int Backend() override { return 0; }
|
2021-09-18 10:20:28 +00:00
|
|
|
|
|
|
|
void InitializeState() override;
|
|
|
|
void Update() override;
|
2022-06-06 09:45:02 +00:00
|
|
|
int GetShaderCount() override { return 0; }
|
2021-09-18 10:20:28 +00:00
|
|
|
|
|
|
|
void FirstEye() override;
|
|
|
|
void NextEye(int eyecount) override;
|
|
|
|
void SetSceneRenderTarget(bool useSSAO) override;
|
|
|
|
void WaitForCommands(bool finish) override;
|
|
|
|
void CopyScreenToBuffer(int width, int height, uint8_t* buffer) override;
|
|
|
|
bool FlipSavePic() const override { return true; }
|
|
|
|
|
|
|
|
FRenderState* RenderState() override;
|
|
|
|
|
|
|
|
const char* DeviceName() const override;
|
|
|
|
void SetTextureFilterMode() override;
|
|
|
|
IHardwareTexture *CreateHardwareTexture(int numchannels) override;
|
|
|
|
void PrecacheMaterial(FMaterial *mat, int translation) override;
|
|
|
|
void BeginFrame() override;
|
|
|
|
void SetViewportRects(IntRect *bounds) override;
|
|
|
|
IVertexBuffer *CreateVertexBuffer() override;
|
|
|
|
IIndexBuffer *CreateIndexBuffer() override;
|
|
|
|
IDataBuffer *CreateDataBuffer(int bindingpoint, bool ssbo, bool needsresize) override;
|
|
|
|
|
|
|
|
// Retrieves a buffer containing image data for a screenshot.
|
|
|
|
// Hint: Pitch can be negative for upside-down images, in which case buffer
|
|
|
|
// points to the last row in the buffer, which will be the first row output.
|
|
|
|
virtual TArray<uint8_t> GetScreenshotBuffer(int &pitch, ESSType &color_type, float &gamma) override;
|
|
|
|
|
|
|
|
void Swap();
|
|
|
|
bool IsHWGammaActive() const { return HWGammaActive; }
|
|
|
|
|
|
|
|
void SetVSync(bool vsync) override;
|
|
|
|
|
|
|
|
void Draw2D() override;
|
|
|
|
void PostProcessScene(bool swscene, int fixedcm, float flash, const std::function<void()> &afterBloomDrawEndScene2D) override;
|
|
|
|
|
|
|
|
bool HWGammaActive = false; // Are we using hardware or software gamma?
|
2021-12-30 09:30:21 +00:00
|
|
|
|
2021-09-18 10:20:28 +00:00
|
|
|
FTexture *WipeStartScreen() override;
|
|
|
|
FTexture *WipeEndScreen() override;
|
|
|
|
|
|
|
|
int camtexcount = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //__GL_FRAMEBUFFER
|