frame_buffer_provider.h Source File - ClanLib SDK
Description: frame_buffer_provider.h Source File

frame_buffer_provider.h
1/*
2** ClanLib SDK
3** Copyright (c) 1997-2020 The ClanLib Team
4**
5** This software is provided 'as-is', without any express or implied
6** warranty. In no event will the authors be held liable for any damages
7** arising from the use of this software.
8**
9** Permission is granted to anyone to use this software for any purpose,
10** including commercial applications, and to alter it and redistribute it
11** freely, subject to the following restrictions:
12**
13** 1. The origin of this software must not be misrepresented; you must not
14** claim that you wrote the original software. If you use this software
15** in a product, an acknowledgment in the product documentation would be
16** appreciated but is not required.
17** 2. Altered source versions must be plainly marked as such, and must not be
18** misrepresented as being the original software.
19** 3. This notice may not be removed or altered from any source distribution.
20**
21** Note: Some of the libraries ClanLib may link to may have additional
22** requirements or restrictions.
23**
24** File Author(s):
25**
26** Magnus Norddahl
27** Harry Storbacka
28*/
29
30
31#pragma once
32
33#include "../Render/frame_buffer.h"
34#include <vector>
35
36namespace clan
37{
40
41 class RenderBuffer;
42 class Texture2D;
43
45 class FrameBufferProvider
46 {
47 public:
48 virtual ~FrameBufferProvider() { return; }
49
50 virtual Size get_size() const = 0;
51 virtual FrameBufferBindTarget get_bind_target() const = 0;
52
57 virtual void attach_color(int attachment_index, const RenderBuffer &render_buffer) = 0;
58
64 virtual void attach_color(int attachment_index, const Texture1D &texture, int level) = 0;
65
72 virtual void attach_color(int attachment_index, const Texture1DArray &texture, int array_index, int level) = 0;
73
79 virtual void attach_color(int attachment_index, const Texture2D &texture, int level) = 0;
80
87 virtual void attach_color(int attachment_index, const Texture2DArray &texture, int array_index, int level) = 0;
88
95 virtual void attach_color(int attachment_index, const Texture3D &texture, int depth, int level) = 0;
96
104 virtual void attach_color(int attachment_index, const TextureCube &texture, TextureSubtype subtype, int level) = 0;
105
112 virtual void detach_color(int attachment_index) = 0;
113
114 virtual void attach_stencil(const RenderBuffer &render_buffer) = 0;
115 virtual void attach_stencil(const Texture2D &texture, int level) = 0;
116 virtual void attach_stencil(const TextureCube &texture, TextureSubtype subtype, int level) = 0;
117 virtual void detach_stencil() = 0;
118
119 virtual void attach_depth(const RenderBuffer &render_buffer) = 0;
120 virtual void attach_depth(const Texture2D &texture, int level) = 0;
121 virtual void attach_depth(const TextureCube &texture, TextureSubtype subtype, int level) = 0;
122 virtual void detach_depth() = 0;
123
124 virtual void attach_depth_stencil(const RenderBuffer &render_buffer) = 0;
125 virtual void attach_depth_stencil(const Texture2D &texture, int level) = 0;
126 virtual void attach_depth_stencil(const TextureCube &texture, TextureSubtype subtype, int level) = 0;
127 virtual void detach_depth_stencil() = 0;
128
129 virtual void set_bind_target(FrameBufferBindTarget target) = 0;
130 };
131
133}
clan::FrameBufferProvider
Interface for implementing a FrameBuffer target.
Definition frame_buffer_provider.h:46
clan::FrameBufferProvider::attach_depth
virtual void attach_depth(const RenderBuffer &render_buffer)=0
clan::FrameBufferProvider::attach_depth_stencil
virtual void attach_depth_stencil(const Texture2D &texture, int level)=0
clan::FrameBufferProvider::detach_color
virtual void detach_color(int attachment_index)=0
Detach color buffer.
clan::FrameBufferProvider::attach_color
virtual void attach_color(int attachment_index, const Texture1DArray &texture, int array_index, int level)=0
Attach color buffer.
clan::FrameBufferProvider::attach_stencil
virtual void attach_stencil(const RenderBuffer &render_buffer)=0
clan::FrameBufferProvider::attach_stencil
virtual void attach_stencil(const Texture2D &texture, int level)=0
clan::FrameBufferProvider::set_bind_target
virtual void set_bind_target(FrameBufferBindTarget target)=0
clan::FrameBufferProvider::~FrameBufferProvider
virtual ~FrameBufferProvider()
Definition frame_buffer_provider.h:48
clan::FrameBufferProvider::attach_color
virtual void attach_color(int attachment_index, const TextureCube &texture, TextureSubtype subtype, int level)=0
Attach color buffer.
clan::FrameBufferProvider::attach_depth_stencil
virtual void attach_depth_stencil(const TextureCube &texture, TextureSubtype subtype, int level)=0
clan::FrameBufferProvider::detach_depth
virtual void detach_depth()=0
clan::FrameBufferProvider::attach_color
virtual void attach_color(int attachment_index, const RenderBuffer &render_buffer)=0
Attach color buffer.
clan::FrameBufferProvider::attach_color
virtual void attach_color(int attachment_index, const Texture2DArray &texture, int array_index, int level)=0
Attach color buffer.
clan::FrameBufferProvider::attach_color
virtual void attach_color(int attachment_index, const Texture3D &texture, int depth, int level)=0
Attach color buffer.
clan::FrameBufferProvider::attach_stencil
virtual void attach_stencil(const TextureCube &texture, TextureSubtype subtype, int level)=0
clan::FrameBufferProvider::attach_color
virtual void attach_color(int attachment_index, const Texture2D &texture, int level)=0
Attach color buffer.
clan::FrameBufferProvider::get_bind_target
virtual FrameBufferBindTarget get_bind_target() const =0
clan::FrameBufferProvider::attach_depth_stencil
virtual void attach_depth_stencil(const RenderBuffer &render_buffer)=0
clan::FrameBufferProvider::detach_depth_stencil
virtual void detach_depth_stencil()=0
clan::FrameBufferProvider::detach_stencil
virtual void detach_stencil()=0
clan::FrameBufferProvider::get_size
virtual Size get_size() const =0
clan::FrameBufferProvider::attach_depth
virtual void attach_depth(const TextureCube &texture, TextureSubtype subtype, int level)=0
clan::FrameBufferProvider::attach_color
virtual void attach_color(int attachment_index, const Texture1D &texture, int level)=0
Attach color buffer.
clan::FrameBufferProvider::attach_depth
virtual void attach_depth(const Texture2D &texture, int level)=0
clan::RenderBuffer
Render-buffer object class.
Definition render_buffer.h:47
clan::Size
2D (width,height) size structure - Integer
Definition size.h:171
clan::Texture1DArray
1D texture array object class.
Definition texture_1d_array.h:41
clan::Texture1D
1D texture object class.
Definition texture_1d.h:41
clan::Texture2DArray
2D texture array object class.
Definition texture_2d_array.h:43
clan::Texture2D
2D texture object class.
Definition texture_2d.h:41
clan::Texture3D
3D texture object class.
Definition texture_3d.h:41
clan::TextureCube
2D texture cube object class.
Definition texture_cube.h:52
clan::FrameBufferBindTarget
FrameBufferBindTarget
Framebuffer bind target.
Definition frame_buffer.h:65
clan::TextureSubtype
TextureSubtype
Texture Subtype.
Definition frame_buffer.h:54
clan
Definition clanapp.h:36