/
redgpu
/
bullet
Обзор
Документация
Войти
/
redgpu
/
bullet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.85
examples/OpenGLWindow/GLRenderToTexture.h
30 строк
606 B
erwincoumans
add initial examples, replacing the 'Demos/Demos3'. Will make it work cross-platform, OpenGL3/OpenGL2 and add more examples to it.
16 апр 2015, 19:55
16 апр 2015, 19:55
a1bf9c5
Код
Авторство
О чём код?
#ifndef GL_RENDER_TO_TEXTURE_H #define GL_RENDER_TO_TEXTURE_H ///See http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/ #include "OpenGLInclude.h" enum { RENDERTEXTURE_COLOR=1, RENDERTEXTURE_DEPTH, }; struct GLRenderToTexture { GLuint m_framebufferName; GLuint m_depthrenderbuffer; bool m_initialized; int m_renderTextureType; public: GLRenderToTexture(); void init(int width, int height, GLuint textureId, int renderTextureType=RENDERTEXTURE_COLOR); bool enable(); void disable(); virtual ~GLRenderToTexture(); }; #endif //GL_RENDER_TO_TEXTURE_H