|
@@ -75,7 +75,12 @@ void AlbumTexture::copyContents (const TextureProvider& other) const noexcept {
|
|
|
|
|
|
|
|
// Read the source texture
|
|
// Read the source texture
|
|
|
glBindTexture (GL_TEXTURE_2D, other.getTextureID (0));
|
|
glBindTexture (GL_TEXTURE_2D, other.getTextureID (0));
|
|
|
- glGetnTexImage (GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, bufferSize, buffer);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (GLEW_VERSION_4_5) {
|
|
|
|
|
+ glGetnTexImage (GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, bufferSize, buffer);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ glGetTexImage (GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// Upload into another texture
|
|
// Upload into another texture
|
|
|
glBindTexture (GL_TEXTURE_2D, this->m_textureID);
|
|
glBindTexture (GL_TEXTURE_2D, this->m_textureID);
|
|
@@ -133,4 +138,4 @@ void AlbumTexture::load () const {
|
|
|
bool AlbumTexture::isReady () const {
|
|
bool AlbumTexture::isReady () const {
|
|
|
// these are only ready to be rendered if their content's are present
|
|
// these are only ready to be rendered if their content's are present
|
|
|
return this->m_width > 0 && this->m_height > 0;
|
|
return this->m_width > 0 && this->m_height > 0;
|
|
|
-}
|
|
|
|
|
|
|
+}
|