Antkeeper  0.0.1
pass.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Christopher J. Howard
3  *
4  * This file is part of Antkeeper source code.
5  *
6  * Antkeeper source code is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Antkeeper source code is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #include <engine/render/pass.hpp>
21 
22 namespace render {
23 
24 pass::pass(gl::pipeline* pipeline, const gl::framebuffer* framebuffer):
25  m_pipeline(pipeline),
26  m_framebuffer(framebuffer),
27  m_enabled(true)
28 {}
29 
31 {}
32 
33 void pass::set_enabled(bool enabled)
34 {
35  m_enabled = enabled;
36 }
37 
38 void pass::set_framebuffer(const gl::framebuffer* framebuffer)
39 {
40  m_framebuffer = framebuffer;
41 }
42 
44 {
46 }
47 
48 } // namespace render
Graphics pipeline interface.
Definition: pipeline.hpp:48
void clear_attachments(std::uint8_t mask, const clear_value &value)
Clears the color, depth, or stencil buffers of current attachments.
Definition: pipeline.cpp:1053
void set_enabled(bool enabled)
Definition: pass.cpp:33
virtual ~pass()
Definition: pass.cpp:30
pass(gl::pipeline *pipeline, const gl::framebuffer *framebuffer)
Definition: pass.cpp:24
std::uint8_t m_clear_mask
Definition: pass.hpp:65
void set_framebuffer(const gl::framebuffer *framebuffer)
Definition: pass.cpp:38
void clear()
Definition: pass.cpp:43
gl::pipeline * m_pipeline
Definition: pass.hpp:63
const gl::framebuffer * m_framebuffer
Definition: pass.hpp:64
gl::clear_value m_clear_value
Definition: pass.hpp:66
High-level rendering.