mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 14:18:45 +00:00
opengl优化
This commit is contained in:
parent
979000e340
commit
1becba6e3d
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ int main(int argc, char *argv[])
|
||||||
qputenv("QTSCRCPY_SERVER_PATH", "G:\\mygitcode\\QtScrcpy\\src\\scrcpy-server.jar");
|
qputenv("QTSCRCPY_SERVER_PATH", "G:\\mygitcode\\QtScrcpy\\src\\scrcpy-server.jar");
|
||||||
|
|
||||||
Dialog w;
|
Dialog w;
|
||||||
w.move(50, 930);
|
//w.move(50, 930);
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
|
|
|
@ -178,7 +178,7 @@ void YUVGLWidget::bindPixelTexture(GLuint texture, YUVTextureType textureType, q
|
||||||
makeCurrent();
|
makeCurrent();
|
||||||
glBindTexture(GL_TEXTURE_2D, texture);
|
glBindTexture(GL_TEXTURE_2D, texture);
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, stride);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, stride);
|
||||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, size.width(), size.height(), GL_RED, GL_UNSIGNED_BYTE, pixels);
|
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, size.width(), size.height(), GL_LUMINANCE, GL_UNSIGNED_BYTE, pixels);
|
||||||
doneCurrent();
|
doneCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ void YUVGLWidget::initTexture(qint32 textureType)
|
||||||
|
|
||||||
QSize size(0, 0);
|
QSize size(0, 0);
|
||||||
calcTextureSize(textureType, size);
|
calcTextureSize(textureType, size);
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, size.width(), size.height(), 0, GL_RED, GL_UNSIGNED_BYTE, NULL);
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, size.width(), size.height(), 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void YUVGLWidget::initTextures()
|
void YUVGLWidget::initTextures()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue