cameraview.cc: set alignment to 1 when copying texture (#24418)

old-commit-hash: 3fc01ec15acc5a4f8fdd427240dfc178362760dd
This commit is contained in:
Willem Melching
2022-05-04 11:44:16 +02:00
committed by GitHub
parent 43b558f6db
commit 44a92a53d0
+2
View File
@@ -216,6 +216,7 @@ void CameraViewWidget::paintGL() {
if (latest_frame == nullptr) return;
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glViewport(0, 0, width(), height());
glBindVertexArray(frame_vao);
@@ -238,6 +239,7 @@ void CameraViewWidget::paintGL() {
glBindVertexArray(0);
glBindTexture(GL_TEXTURE_2D, 0);
glActiveTexture(GL_TEXTURE0);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
}
void CameraViewWidget::vipcConnected(VisionIpcClient *vipc_client) {