aboutsummaryrefslogtreecommitdiff
path: root/util/fbcompose/OpenGLScreen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbcompose/OpenGLScreen.cc')
-rw-r--r--util/fbcompose/OpenGLScreen.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/fbcompose/OpenGLScreen.cc b/util/fbcompose/OpenGLScreen.cc
index c69b4d7..fc4494a 100644
--- a/util/fbcompose/OpenGLScreen.cc
+++ b/util/fbcompose/OpenGLScreen.cc
@@ -299,29 +299,29 @@ void OpenGLScreen::createResources() {
299 Pixmap pixmap; 299 Pixmap pixmap;
300 300
301 // Default element buffer. 301 // Default element buffer.
302 m_default_element_buffer = new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER); 302 m_default_element_buffer.reset(new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER));
303 m_default_element_buffer->bufferData(sizeof(DEFAULT_ELEMENT_ARRAY), (const GLvoid*)(DEFAULT_ELEMENT_ARRAY), GL_STATIC_DRAW); 303 m_default_element_buffer->bufferData(sizeof(DEFAULT_ELEMENT_ARRAY), (const GLvoid*)(DEFAULT_ELEMENT_ARRAY), GL_STATIC_DRAW);
304 304
305 // Default primitive position buffer. 305 // Default primitive position buffer.
306 m_default_prim_pos_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); 306 m_default_prim_pos_buffer.reset(new OpenGLBuffer(*this, GL_ARRAY_BUFFER));
307 m_default_prim_pos_buffer->bufferData(sizeof(DEFAULT_PRIM_POS_ARRAY), (const GLvoid*)(DEFAULT_PRIM_POS_ARRAY), GL_STATIC_DRAW); 307 m_default_prim_pos_buffer->bufferData(sizeof(DEFAULT_PRIM_POS_ARRAY), (const GLvoid*)(DEFAULT_PRIM_POS_ARRAY), GL_STATIC_DRAW);
308 308
309 // Default texture position buffer. 309 // Default texture position buffer.
310 m_default_tex_coord_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); 310 m_default_tex_coord_buffer.reset(new OpenGLBuffer(*this, GL_ARRAY_BUFFER));
311 m_default_tex_coord_buffer->bufferData(sizeof(DEFAULT_TEX_POS_ARRAY), (const GLvoid*)(DEFAULT_TEX_POS_ARRAY), GL_STATIC_DRAW); 311 m_default_tex_coord_buffer->bufferData(sizeof(DEFAULT_TEX_POS_ARRAY), (const GLvoid*)(DEFAULT_TEX_POS_ARRAY), GL_STATIC_DRAW);
312 312
313 313
314 // Reconfigure rectangle position buffer. 314 // Reconfigure rectangle position buffer.
315 m_rec_rect_line_pos_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); 315 m_rec_rect_line_pos_buffer.reset( new OpenGLBuffer(*this, GL_ARRAY_BUFFER) );
316 316
317 // Reconfigure rectangle element buffer. 317 // Reconfigure rectangle element buffer.
318 m_rec_rect_element_buffer = new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER); 318 m_rec_rect_element_buffer.reset(new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER));
319 m_rec_rect_element_buffer->bufferData(sizeof(RECONFIGURE_RECT_ELEMENT_ARRAY), 319 m_rec_rect_element_buffer->bufferData(sizeof(RECONFIGURE_RECT_ELEMENT_ARRAY),
320 (const GLvoid*)(RECONFIGURE_RECT_ELEMENT_ARRAY), GL_STATIC_DRAW); 320 (const GLvoid*)(RECONFIGURE_RECT_ELEMENT_ARRAY), GL_STATIC_DRAW);
321 321
322 322
323 // Background texture. 323 // Background texture.
324 m_bg_texture = new OpenGL2DTexturePartition(*this, true); 324 m_bg_texture.reset( new OpenGL2DTexturePartition(*this, true) );
325 325
326 // Background texture partition buffers. 326 // Background texture partition buffers.
327 m_bg_pos_buffers = partitionSpaceToBuffers(*this, 0, 0, rootWindow().width(), rootWindow().height()); 327 m_bg_pos_buffers = partitionSpaceToBuffers(*this, 0, 0, rootWindow().width(), rootWindow().height());
@@ -329,13 +329,13 @@ void OpenGLScreen::createResources() {
329 329
330 // Plain black texture. 330 // Plain black texture.
331 pixmap = createSolidPixmap(*this, 1, 1, 0x00000000); 331 pixmap = createSolidPixmap(*this, 1, 1, 0x00000000);
332 m_black_texture = new OpenGL2DTexture(*this, false); 332 m_black_texture.reset( new OpenGL2DTexture(*this, false) );
333 m_black_texture->setPixmap(pixmap, false, 1, 1, true); 333 m_black_texture->setPixmap(pixmap, false, 1, 1, true);
334 XFreePixmap(display(), pixmap); 334 XFreePixmap(display(), pixmap);
335 335
336 // Plain white texture. 336 // Plain white texture.
337 pixmap = createSolidPixmap(*this, 1, 1, 0xffffffff); 337 pixmap = createSolidPixmap(*this, 1, 1, 0xffffffff);
338 m_white_texture = new OpenGL2DTexture(*this, false); 338 m_white_texture.reset( new OpenGL2DTexture(*this, false) );
339 m_white_texture->setPixmap(pixmap, false, 1, 1, true); 339 m_white_texture->setPixmap(pixmap, false, 1, 1, true);
340 XFreePixmap(display(), pixmap); 340 XFreePixmap(display(), pixmap);
341} 341}
@@ -354,7 +354,7 @@ void OpenGLScreen::initPlugins() {
354// Initializes the screen's plugins. 354// Initializes the screen's plugins.
355void OpenGLScreen::initPlugins(const CompositorConfig &config) { 355void OpenGLScreen::initPlugins(const CompositorConfig &config) {
356 BaseScreen::initPlugins(config); 356 BaseScreen::initPlugins(config);
357 m_shader_program = new OpenGLShaderProgram(pluginManager().plugins()); 357 m_shader_program.reset( new OpenGLShaderProgram(pluginManager().plugins()) );
358} 358}
359 359
360 360