opengl: add shader helper functions.

Helper functions to compile, link and run opengl shader programs.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2015-04-24 07:48:45 +02:00
parent d98bc0b654
commit 985e1c9b00
3 changed files with 111 additions and 0 deletions

9
include/ui/shader.h Normal file
View file

@ -0,0 +1,9 @@
#ifdef CONFIG_OPENGL
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
#endif
GLuint qemu_gl_create_compile_shader(GLenum type, const GLchar *src);
GLuint qemu_gl_create_link_program(GLuint vert, GLuint frag);
GLuint qemu_gl_create_compile_link_program(const GLchar *vert_src,
const GLchar *frag_src);