2020-09-21 22:10:50 +08:00
|
|
|
#pragma once
|
|
|
|
#include "../RenderTarget.h"
|
|
|
|
#include "platform/CCGL.h"
|
|
|
|
|
|
|
|
CC_BACKEND_BEGIN
|
|
|
|
|
2020-10-27 16:58:37 +08:00
|
|
|
class DeviceGL;
|
|
|
|
|
2020-09-21 22:10:50 +08:00
|
|
|
class RenderTargetGL : public RenderTarget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/*
|
|
|
|
* 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();
|
|
|
|
|
|
|
|
void bindFrameBuffer() const override;
|
|
|
|
void unbindFrameBuffer() const override;
|
|
|
|
|
|
|
|
void setColorAttachment(ColorAttachment attachment) override;
|
|
|
|
void setDepthAttachment(TextureBackend* attachment, int level = 0) override;
|
|
|
|
void setStencilAttachment(TextureBackend* attachment, int level = 0) override;
|
|
|
|
public:
|
|
|
|
GLuint _FBO = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
CC_BACKEND_END
|