mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 19:12:07 +08:00
cameraview.cc: set alignment to 1 when copying texture (#24418)
old-commit-hash: 3fc01ec15acc5a4f8fdd427240dfc178362760dd
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user