gs-rendertarget: Add function to get texture directly

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2018-12-23 17:56:52 +01:00
parent a6f9451654
commit fd14fd62a6
2 changed files with 7 additions and 0 deletions

View file

@ -57,6 +57,11 @@ gs_texture_t* gs::rendertarget::get_object()
return tex;
}
std::shared_ptr<gs::texture> gs::rendertarget::get_texture()
{
return std::make_shared<gs::texture>(get_object(), false);
}
void gs::rendertarget::get_texture(gs::texture& tex)
{
tex = gs::texture(get_object(), false);

View file

@ -47,6 +47,8 @@ namespace gs {
gs_texture_t* get_object();
std::shared_ptr<gs::texture> get_texture();
void get_texture(gs::texture& tex);
void get_texture(std::shared_ptr<gs::texture>& tex);