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

29 lines
489 B
C
Raw Normal View History

#pragma once
#include "../RenderTarget.h"
#include "platform/GL.h"
#include "OpenGLState.h"
NS_AX_BACKEND_BEGIN
class DriverGL;
2020-10-27 16:58:37 +08:00
class RenderTargetGL : public RenderTarget
{
public:
/*
2021-12-25 10:04:45 +08:00
* generateFBO, false, use for screen framebuffer
*/
RenderTargetGL(bool defaultRenderTarget, DriverGL* driver);
~RenderTargetGL();
2022-06-24 14:18:48 +08:00
void bindFrameBuffer() const;
void unbindFrameBuffer() const;
2022-06-24 14:18:48 +08:00
void update() const;
2021-12-25 10:04:45 +08:00
public:
GLuint _FBO = 0;
};
NS_AX_BACKEND_END