Mir
render_target.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_RENDERER_GL_RENDER_TARGET_H_
20 #define MIR_RENDERER_GL_RENDER_TARGET_H_
21 
22 namespace mir
23 {
24 namespace renderer
25 {
26 namespace gl
27 {
28 
30 {
31 public:
32  virtual ~RenderTarget() = default;
33 
35  virtual void make_current() = 0;
37  virtual void release_current() = 0;
43  virtual void swap_buffers() = 0;
47  virtual void bind() = 0;
48 
49 protected:
50  RenderTarget() = default;
51  RenderTarget(RenderTarget const&) = delete;
52  RenderTarget& operator=(RenderTarget const&) = delete;
53 };
54 
55 }
56 }
57 }
58 
59 #endif
Definition: as_render_target.h:27
virtual ~RenderTarget()=default
virtual void swap_buffers()=0
Swap buffers for OpenGL rendering.
Definition: render_target.h:29
RenderTarget & operator=(RenderTarget const &)=delete
virtual void release_current()=0
Releases the current GL render target.
virtual void bind()=0
Binds any necessary resources (fbos, textures if any) in preparation for drawing. ...
virtual void make_current()=0
Makes GL render target current to calling thread.

Copyright © 2012-2016 Canonical Ltd.
Generated on Tue Oct 31 05:57:28 UTC 2017