summaryrefslogtreecommitdiffstats
path: root/include/ui/shader.h
Commit message (Collapse)AuthorAgeFilesLines
* opengl: add flipping vertex shaderGerd Hoffmann2017-10-171-1/+1
| | | | | | | | Add vertex shader which flips the texture upside down while blitting it. Add argument to qemu_gl_run_texture_blit() to enable flipping. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20171010135453.6704-4-kraxel@redhat.com
* opengl: move shader init from console-gl.c to shader.cGerd Hoffmann2017-10-171-8/+6Star
| | | | | | | | | | | | With the upcoming dmabuf support in qemu there will be more users of the shaders than just console-gl.c. So rename ConsoleGLState to QemuGLShader, rename some functions too, move code from console-gl.c to shaders.c. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20171010135453.6704-3-kraxel@redhat.com
* shaders: initialize vertexes onceGerd Hoffmann2015-10-081-1/+3
| | | | | | | | | | 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 <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* ui: shader.h protect against double inclusionGerd Hoffmann2015-05-291-0/+5
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* ui: use libexpoxyGerd Hoffmann2015-05-291-4/+1Star
| | | | | | | | | | | libepoxy does the opengl extension handling for us. It also is helpful for trouble-shooting as it prints nice error messages instead of silently failing or segfaulting in case we do something wrong, like using gl commands not supported by the current context. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* console-gl: add opengl rendering helper functionsGerd Hoffmann2015-05-051-0/+2
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* opengl: add shader helper functions.Gerd Hoffmann2015-05-051-0/+9
Helper functions to compile, link and run opengl shader programs. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>