Skip to content

Commit 50e3a8e

Browse files
committed
context
1 parent 7163b31 commit 50e3a8e

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

src/ruis/render/null/context.hpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
ruis-render-null - null renderer
3+
4+
Copyright (C) 2024-2024 Ivan Gagis <igagis@gmail.com>
5+
6+
This program 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+
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
/* ================ LICENSE END ================ */
21+
22+
#pragma once
23+
24+
#include <ruis/render/context.hpp>
25+
26+
namespace ruis::render::null {
27+
28+
class context : public ruis::render::context
29+
{
30+
public:
31+
};
32+
33+
} // namespace ruis::render::null

src/ruis/render/null/factory.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ namespace ruis::render::null {
3434
class factory : public ruis::render::factory
3535
{
3636
public:
37+
factory(utki::shared_ref<ruis::render::context> render_context) :
38+
ruis::render::factory(std::move(render_context))
39+
{}
40+
3741
utki::shared_ref<ruis::render::frame_buffer> create_framebuffer(
3842
std::shared_ptr<ruis::render::texture_2d> color,
3943
std::shared_ptr<ruis::render::texture_depth> depth,

src/ruis/render/null/renderer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2525

2626
#include <ruis/render/renderer.hpp>
2727

28+
#include "context.hpp"
2829
#include "factory.hpp"
2930

3031
namespace ruis::render::null {
@@ -34,7 +35,7 @@ class renderer : public ruis::render::renderer
3435
public:
3536
renderer() :
3637
ruis::render::renderer(
37-
std::make_unique<ruis::render::null::factory>(), //
38+
std::make_unique<ruis::render::null::factory>(utki::make_shared<ruis::render::null::context>()), //
3839
parameters()
3940
)
4041
{}

0 commit comments

Comments
 (0)