From 3e1515e88c6f750c193ed9b9908d8a9c09e5b025 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Tue, 12 Mar 2013 22:09:10 +0100 Subject: Change videowidget to reduce CPU-load according to Stanislaw --- FTNoIR_Tracker_PT/video_widget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'FTNoIR_Tracker_PT/video_widget.cpp') diff --git a/FTNoIR_Tracker_PT/video_widget.cpp b/FTNoIR_Tracker_PT/video_widget.cpp index 598766b4..c2b41da1 100644 --- a/FTNoIR_Tracker_PT/video_widget.cpp +++ b/FTNoIR_Tracker_PT/video_widget.cpp @@ -3,6 +3,8 @@ * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. + * + * 20130312, WVR: Add 7 lines to resizeGL after resize_frame. This should lower CPU-load. */ #include "video_widget.h" @@ -29,6 +31,13 @@ void VideoWidget::resizeGL(int w, int h) glLoadIdentity(); glOrtho(0, w, 0, h, -1, 1); resize_frame(); + glDisable(GL_DEPTH_TEST); + glBegin(GL_QUADS); + glVertex2f(0,0); + glVertex2f(1,0); + glVertex2f(1,1); + glVertex2f(0,1); + glEnd(); } void VideoWidget::paintGL() -- cgit v1.2.3