Received: from eggs.gnu.org ([2001:4830:134:3::10]:54372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDa2d-0005ZF-0E for qemu-devel@nongnu.org; Tue, 20 Jan 2015 09:44:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDa2Z-0000yN-03 for qemu-devel@nongnu.org; Tue, 20 Jan 2015 09:44:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDa2Y-0000yJ-PC for qemu-devel@nongnu.org; Tue, 20 Jan 2015 09:44:22 -0500 Message-ID: <1421765057.3606.46.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 20 Jan 2015 15:44:17 +0100 In-Reply-To: <54BE5E27.7040807@redhat.com> References: <1421674603-31575-1-git-send-email-kraxel@redhat.com> <1421674603-31575-5-git-send-email-kraxel@redhat.com> <54BD2B3A.1090508@redhat.com> <1421751643.3606.30.camel@nilsson.home.kraxel.org> <54BE5E27.7040807@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 4/7] console-gl: add opengl rendering helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Anthony Liguori Hi, > >> This looks like a list for GL_TRIANGLES instead of GL_TRIANGLE_STRIP. > >> For GL_TRIANGLE_STRIP, you first define one whole triangle (by > >> specifying each of the three vertices) and after that, each vertex > >> results in a new triangle drawn (whose two other vertices are the two > >> vertices preceding the last one). > > Thanks for the nice description. > > > > So the trick to get it done with only four vertexes is to put the > > correct points (which are going to be shared by both triangles) into the > > middle. I've played around with it a bit without success (and before my > > new opengl book arrived), and this 6-point version worked ... > > Hm, I did write a working solution in my reply, didn't I? Yep, was just trying to explain how I ended up with the 6 vertex version, not having fully figured how triangle strips are working. All fine now, I've changed it to use 4 vertexes version instead, and I _also_ understood why it is working as intended. FYI: current code is at https://www.kraxel.org/cgit/qemu/log/?h=rebase/ui-sdl-next [ incremental fixes not squashed in yet ] thanks, Gerd