Skip to content

Commit 23a243a

Browse files
committed
store renderer ref in texture_depth
1 parent 4893e56 commit 23a243a

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

src/ruis/render/opengl/factory.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ utki::shared_ref<ruis::render::texture_depth> factory::create_texture_depth(
117117
rasterimage::dimensioned::dimensions_type dims
118118
)
119119
{
120-
return utki::make_shared<texture_depth>(dims);
120+
return utki::make_shared<texture_depth>(
121+
this->get_renderer(), //
122+
dims
123+
);
121124
}
122125

123126
utki::shared_ref<ruis::render::texture_cube> factory::create_texture_cube(

src/ruis/render/opengl/texture_depth.cpp

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

2626
using namespace ruis::render::opengl;
2727

28-
texture_depth::texture_depth(r4::vector2<uint32_t> dims) :
29-
ruis::render::texture_depth(dims)
28+
texture_depth::texture_depth(
29+
utki::shared_ref<ruis::render::renderer> renderer, //
30+
r4::vector2<uint32_t> dims
31+
) :
32+
ruis::render::texture_depth(
33+
std::move(renderer), //
34+
dims
35+
)
3036
{
3137
this->bind(0);
3238

src/ruis/render/opengl/texture_depth.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ class texture_depth :
3232
public ruis::render::texture_depth
3333
{
3434
public:
35-
texture_depth(r4::vector2<uint32_t> dims);
35+
texture_depth(
36+
utki::shared_ref<ruis::render::renderer> renderer, //
37+
r4::vector2<uint32_t> dims
38+
);
3639

3740
texture_depth(const texture_depth&) = delete;
3841
texture_depth& operator=(const texture_depth&) = delete;

0 commit comments

Comments
 (0)