mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-09 23:14:46 +01:00
gl: Use named_object<GL_TEXTURE> as the base class for images
This commit is contained in:
parent
1e16b338b4
commit
0ea692e9ab
|
|
@ -410,6 +410,8 @@ namespace gl
|
|||
auto view = std::make_unique<texture_view>(this, swizzle, aspect_flags);
|
||||
auto result = view.get();
|
||||
views.emplace(key, std::move(view));
|
||||
|
||||
result->set_name(fmt::format("%s_%x", name(), remap.encoded));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace gl
|
|||
GLuint num_layers;
|
||||
};
|
||||
|
||||
class texture
|
||||
class texture : public named_object<GL_TEXTURE>
|
||||
{
|
||||
friend class texture_view;
|
||||
|
||||
|
|
@ -181,7 +181,6 @@ namespace gl
|
|||
};
|
||||
|
||||
protected:
|
||||
GLuint m_id = GL_NONE;
|
||||
GLuint m_width = 0;
|
||||
GLuint m_height = 0;
|
||||
GLuint m_depth = 0;
|
||||
|
|
@ -346,10 +345,9 @@ namespace gl
|
|||
}
|
||||
};
|
||||
|
||||
class texture_view
|
||||
class texture_view : public named_object<GL_TEXTURE>
|
||||
{
|
||||
protected:
|
||||
GLuint m_id = GL_NONE;
|
||||
GLenum m_target = 0;
|
||||
GLenum m_format = 0;
|
||||
GLenum m_view_format = 0;
|
||||
|
|
@ -465,6 +463,7 @@ namespace gl
|
|||
|
||||
class viewable_image : public texture
|
||||
{
|
||||
protected:
|
||||
std::unordered_map<u64, std::unique_ptr<texture_view>> views;
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in a new issue