GL/Texture: Add a GetTextureSubImage fallback/helper

This commit is contained in:
Connor McLaughlin
2020-03-16 00:03:25 +10:00
parent 212fddd195
commit b4153266a0
2 changed files with 37 additions and 1 deletions

View File

@@ -33,8 +33,12 @@ public:
Texture& operator=(const Texture& copy) = delete;
Texture& operator=(Texture&& moved);
private:
// Helper which uses glGetTextureSubImage where available, otherwise a temporary FBO.
static void GetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
GLsizei bufSize, void* pixels);
private:
GLuint m_id = 0;
u32 m_width = 0;
u32 m_height = 0;