fbo.h
来自「这是整套横扫千军3D版游戏的源码」· C头文件 代码 · 共 80 行
H
80 行
/**
* @file FBO.h
* @brief EXT_framebuffer_object
* @author Christopher Han <xiphux@gmail.com>
*
* EXT_framebuffer_object class definition
* Copyright (C) 2005. Licensed under the terms of the
* GNU GPL, v2 or later.
*
* Framebuffer abstraction added by Jelmer Cnossen
*/
#ifndef FBO_H
#define FBO_H
#include "Rendering/GL/myGL.h"
/**
* @brief FBO
*
* Framebuffer Object class. Derived from the
* abstract IFramebuffer class
*/
class FBO : public IFramebuffer
{
public:
/**
* @brief check FBO status
*/
bool checkFBOStatus(void);
/**
* @brief attach texture
* @param tex texture to attach
* @param textype type of texture
* @param attachtype what kind of target to attach as
*/
void attachTexture(const GLuint tex, const unsigned int textype, FramebufferAttachType attachtype);
/**
* @brief select
*/
void select(void);
/**
* @brief deselect
*/
void deselect(void);
/**
* @brief valid
* @return whether a valid framebuffer exists
*/
bool valid(void);
private:
/**
* @brief Constructor
*/
FBO(int requires, int w, int h);
/**
* @brief Destructor
*/
~FBO();
/**
* @brief framebuffer
*
* GLuint pointing to the current framebuffer
*/
GLuint frameBuffer;
GLuint depthRenderBuffer;
int requires;
// instantiate_fb is the only code where new FBOs may be created
friend IFramebuffer* instantiate_fb(const int w, const int h, const int requires);
};
#endif /* FBO_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?