mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +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");
|
||||
|
||||
Dialog w;
|
||||
w.move(50, 930);
|
||||
//w.move(50, 930);
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
|
|
|
@ -178,7 +178,7 @@ void YUVGLWidget::bindPixelTexture(GLuint texture, YUVTextureType textureType, q
|
|||
makeCurrent();
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ void YUVGLWidget::initTexture(qint32 textureType)
|
|||
|
||||
QSize size(0, 0);
|
||||
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()
|
||||
|
|
Loading…
Add table
Reference in a new issue