kwin: Use the robust access functions
Use glReadnPixels() instead of glReadPixels(), and glGetnUniformfv() instead of glGetUniformfv().
This commit is contained in:
parent
2f87b7542f
commit
19796b8263
2 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ void ScreenShotEffect::postPaintScreen()
|
|||
restoreMatrix();
|
||||
// copy content from framebuffer into image
|
||||
img = QImage(QSize(width, height), QImage::Format_ARGB32);
|
||||
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*)img.bits());
|
||||
glReadnPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, img.byteCount(), (GLvoid*)img.bits());
|
||||
GLRenderTarget::popRenderTarget();
|
||||
ScreenShotEffect::convertFromGLImage(img, width, height);
|
||||
}
|
||||
|
|
|
@ -649,7 +649,7 @@ QMatrix4x4 GLShader::getUniformMatrix4x4(const char* name)
|
|||
int location = uniformLocation(name);
|
||||
if (location >= 0) {
|
||||
GLfloat m[16];
|
||||
glGetUniformfv(mProgram, location, m);
|
||||
glGetnUniformfv(mProgram, location, sizeof(m), m);
|
||||
QMatrix4x4 matrix(m[0], m[4], m[8], m[12],
|
||||
m[1], m[5], m[9], m[13],
|
||||
m[2], m[6], m[10], m[14],
|
||||
|
|
Loading…
Reference in a new issue