: executor_(L"ogl_device")\r
, pattern_(nullptr)\r
, attached_texture_(0)\r
+ , attached_fbo_(0)\r
, active_shader_(0)\r
, read_buffer_(0)\r
{\r
if(!GLEW_VERSION_3_0)\r
CASPAR_LOG(warning) << "Missing OpenGL 3.0 support.";\r
\r
- CASPAR_LOG(info) << L"Successfully initialized GLEW.";\r
-\r
glGenFramebuffers(1, &fbo_); \r
-\r
- CASPAR_LOG(debug) << "Created framebuffer.";\r
-\r
- glBindFramebuffer(GL_FRAMEBUFFER, fbo_);\r
-\r
+ \r
CASPAR_LOG(info) << L"Successfully initialized OpenGL Device.";\r
});\r
}\r
{ \r
if(attached_texture_ != texture.id())\r
{\r
+ if(attached_fbo_ != fbo_)\r
+ {\r
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo_);\r
+ attached_fbo_ = fbo_;\r
+ }\r
+\r
GL(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + 0, GL_TEXTURE_2D, texture.id(), 0));\r
attached_texture_ = texture.id();\r
}\r
std::array<size_t, 4> scissor_;\r
const GLubyte* pattern_;\r
GLint attached_texture_;\r
+ GLuint attached_fbo_;\r
GLint active_shader_;\r
std::array<GLint, 16> binded_textures_;\r
std::array<GLint, 4> blend_func_;\r
std::array<tbb::concurrent_unordered_map<size_t, safe_ptr<buffer_pool<device_buffer>>>, 4> device_pools_;\r
std::array<tbb::concurrent_unordered_map<size_t, safe_ptr<buffer_pool<host_buffer>>>, 2> host_pools_;\r
\r
- unsigned int fbo_;\r
+ GLuint fbo_;\r
\r
executor executor_;\r
\r