Re: [Qemu-devel] [PATCH 1/9] shaders: initialize vertexes once

2015-09-15 Thread Gerd Hoffmann
> > Therefore, I'm not sure whether deleting the buffer is right here. Maybe > > OpenGL uses reference counting here, too, so it remembers that the > > buffer is still in use by the VAO, and so the glDeleteBuffers() > > operation will only decrease its refcount, but not actually end up > > deleting

Re: [Qemu-devel] [PATCH 1/9] shaders: initialize vertexes once

2015-09-14 Thread Max Reitz
On 14.09.2015 18:00, Max Reitz wrote: > On 09.09.2015 13:20, Gerd Hoffmann wrote: >> Create a buffer for the vertex data and place vertexes >> there at initialization time. Then just use the buffer >> for each texture blit. >> >> Signed-off-by: Gerd Hoffmann >> --- >> include/ui/shader.h | 4 ++

Re: [Qemu-devel] [PATCH 1/9] shaders: initialize vertexes once

2015-09-14 Thread Max Reitz
On 09.09.2015 13:20, Gerd Hoffmann wrote: > Create a buffer for the vertex data and place vertexes > there at initialization time. Then just use the buffer > for each texture blit. > > Signed-off-by: Gerd Hoffmann > --- > include/ui/shader.h | 4 +++- > ui/console-gl.c | 7 ++- > ui/s

Re: [Qemu-devel] [PATCH 1/9] shaders: initialize vertexes once

2015-09-10 Thread Gerd Hoffmann
On Do, 2015-09-10 at 15:42 +0200, Marc-André Lureau wrote: > Hi > > On Thu, Sep 10, 2015 at 3:22 PM, Gerd Hoffmann wrote: > >> > +glBindBuffer (GL_ARRAY_BUFFER, 0); > >> > +glBindVertexArray (0); > >> > +glDeleteBuffers (1, &buffer); > >> > + > >> > >> extra space before ( > > > > Fix

Re: [Qemu-devel] [PATCH 1/9] shaders: initialize vertexes once

2015-09-10 Thread Marc-André Lureau
Hi On Thu, Sep 10, 2015 at 3:22 PM, Gerd Hoffmann wrote: >> > +glBindBuffer (GL_ARRAY_BUFFER, 0); >> > +glBindVertexArray (0); >> > +glDeleteBuffers (1, &buffer); >> > + >> >> extra space before ( > > Fixed. > >> Is the unbinding necessary? > > Unbinding? Do you mam the DeleteBuffers

Re: [Qemu-devel] [PATCH 1/9] shaders: initialize vertexes once

2015-09-10 Thread Marc-André Lureau
Hi On Wed, Sep 9, 2015 at 1:20 PM, Gerd Hoffmann wrote: > Create a buffer for the vertex data and place vertexes > there at initialization time. Then just use the buffer > for each texture blit. > > Signed-off-by: Gerd Hoffmann > --- > include/ui/shader.h | 4 +++- > ui/console-gl.c | 7

Re: [Qemu-devel] [PATCH 1/9] shaders: initialize vertexes once

2015-09-10 Thread Gerd Hoffmann
> > +glBindBuffer (GL_ARRAY_BUFFER, 0); > > +glBindVertexArray (0); > > +glDeleteBuffers (1, &buffer); > > + > > extra space before ( Fixed. > Is the unbinding necessary? Unbinding? Do you mam the DeleteBuffers? cheers, Gerd