mirror of
https://github.com/DrBeef/Raze.git
synced 2024-12-16 07:31:04 +00:00
737bf15ad8
Compiles but only draws a black screen. Something must be missing but no idea yet what that might be.
67 lines
1.8 KiB
C++
67 lines
1.8 KiB
C++
#ifndef __GL_FRAMEBUFFER
|
|
#define __GL_FRAMEBUFFER
|
|
|
|
#include "gl_sysfb.h"
|
|
|
|
#include <memory>
|
|
|
|
namespace OpenGLRenderer
|
|
{
|
|
|
|
class FHardwareTexture;
|
|
class FGLDebug;
|
|
|
|
class OpenGLFrameBuffer : public SystemGLFrameBuffer
|
|
{
|
|
typedef SystemGLFrameBuffer Super;
|
|
|
|
public:
|
|
|
|
explicit OpenGLFrameBuffer() {}
|
|
OpenGLFrameBuffer(void *hMonitor, bool fullscreen) ;
|
|
~OpenGLFrameBuffer();
|
|
|
|
void InitializeState() override;
|
|
void Update() override;
|
|
void Draw2D() override;
|
|
|
|
void CleanForRestart() override;
|
|
const char* DeviceName() const override;
|
|
#ifdef IMPLEMENT_IT
|
|
void SetTextureFilterMode() override;
|
|
IHardwareTexture *CreateHardwareTexture() override;
|
|
void PrecacheMaterial(FMaterial *mat, int translation) override;
|
|
FModelRenderer *CreateModelRenderer(int mli) override;
|
|
void TextureFilterChanged() override;
|
|
#endif
|
|
void BeginFrame() override;
|
|
//void SetViewportRects(IntRect *bounds) override;
|
|
void BlurScene(float amount) override;
|
|
#ifdef IMPLEMENT_IT
|
|
IVertexBuffer *CreateVertexBuffer() override;
|
|
IIndexBuffer *CreateIndexBuffer() override;
|
|
#endif
|
|
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);
|
|
|
|
//void Draw2D() override;
|
|
void PostProcessScene(int fixedcm, const std::function<void()> &afterBloomDrawEndScene2D) override;
|
|
|
|
bool HWGammaActive = false; // Are we using hardware or software gamma?
|
|
std::shared_ptr<FGLDebug> mDebug; // Debug API
|
|
|
|
int camtexcount = 0;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //__GL_FRAMEBUFFER
|