Permalink
Browse files

[osx] fixed, remove useless GL_UNPACK_ROW_LENGTH, CGLTexImageIOSurfac…

…e2D does not pay attention to it and it was being used incorrectly as the stride should be in pixles not bytes
  • Loading branch information...
1 parent f112276 commit 19670a2622d718b4781dd0203ff4289d9665b7c3 @davilla davilla committed Aug 25, 2012
Showing with 0 additions and 3 deletions.
  1. +0 −3 xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -2485,11 +2485,9 @@ void CLinuxRendererGL::UploadCVRefTexture(int index)
GLsizei texWidth = IOSurfaceGetWidth(surface);
GLsizei texHeight= IOSurfaceGetHeight(surface);
OSType format_type = CVPixelBufferGetPixelFormatType(cvBufferRef);
- size_t rowbytes = CVPixelBufferGetBytesPerRow(cvBufferRef);
glEnable(m_textureTarget);
glBindTexture(m_textureTarget, plane.id);
- glPixelStorei(GL_UNPACK_ROW_LENGTH, rowbytes);
if (format_type == kCVPixelFormatType_422YpCbCr8)
CGLTexImageIOSurface2D(cgl_ctx, m_textureTarget, GL_RGB8,
@@ -2498,7 +2496,6 @@ void CLinuxRendererGL::UploadCVRefTexture(int index)
CGLTexImageIOSurface2D(cgl_ctx, m_textureTarget, GL_RGBA8,
texWidth, texHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, surface, 0);
- glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glBindTexture(m_textureTarget, 0);
glDisable(m_textureTarget);
}

0 comments on commit 19670a2

Please sign in to comment.