axmol/cocos/renderer/backend/opengl/RenderTargetGL.h

29 lines
682 B
C
Raw Normal View History

#pragma once
#include "../RenderTarget.h"
#include "platform/CCGL.h"
CC_BACKEND_BEGIN
2020-10-27 16:58:37 +08:00
class DeviceGL;
class RenderTargetGL : public RenderTarget
{
public:
/*
* generateFBO, false, use for screen framebuffer
*/
2020-10-27 16:58:37 +08:00
RenderTargetGL(bool defaultRenderTarget, DeviceGL* deviceGL);
~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