2020-09-21 22:10:50 +08:00
|
|
|
#pragma once
|
|
|
|
#include "../RenderTarget.h"
|
2023-06-11 13:08:08 +08:00
|
|
|
#include "platform/GL.h"
|
2023-07-19 18:35:05 +08:00
|
|
|
#include "OpenGLState.h"
|
2020-09-21 22:10:50 +08:00
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
NS_AX_BACKEND_BEGIN
|
2020-09-21 22:10:50 +08:00
|
|
|
|
2020-10-27 16:58:37 +08:00
|
|
|
class DeviceGL;
|
|
|
|
|
2020-09-21 22:10:50 +08:00
|
|
|
class RenderTargetGL : public RenderTarget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/*
|
2021-12-25 10:04:45 +08:00
|
|
|
* generateFBO, false, use for screen framebuffer
|
|
|
|
*/
|
2020-10-27 16:58:37 +08:00
|
|
|
RenderTargetGL(bool defaultRenderTarget, DeviceGL* deviceGL);
|
2020-09-21 22:10:50 +08:00
|
|
|
~RenderTargetGL();
|
|
|
|
|
2022-06-24 14:18:48 +08:00
|
|
|
void bindFrameBuffer() const;
|
|
|
|
void unbindFrameBuffer() const;
|
2020-09-21 22:10:50 +08:00
|
|
|
|
2022-06-24 14:18:48 +08:00
|
|
|
void update() const;
|
2021-12-25 10:04:45 +08:00
|
|
|
|
2020-09-21 22:10:50 +08:00
|
|
|
public:
|
|
|
|
GLuint _FBO = 0;
|
|
|
|
};
|
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
NS_AX_BACKEND_END
|