aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-05-05 14:06:12 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-05-05 14:06:12 +0100
commit874e9aeeeb74c5459639a93439a502d262847e68 (patch)
tree549b6cc3ff9f8842320775e7e51f61d182f4aadb /scripts
parentb4c5df7a15dad2417bc05d08a470b82ab89d56ea (diff)
parente444ea34f8ec27acfa9ead7eaa9904238c831e69 (diff)
downloadqemu-874e9aeeeb74c5459639a93439a502d262847e68.zip
qemu-874e9aeeeb74c5459639a93439a502d262847e68.tar.gz
qemu-874e9aeeeb74c5459639a93439a502d262847e68.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20150505-1' into staging
sdl2: add opengl support # gpg: Signature made Tue May 5 10:36:25 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-sdl-20150505-1: sdl2: Fix RGB555 sdl2: add support for display rendering using opengl. sdl2: move SDL_* includes to sdl2.h console-gl: add opengl rendering helper functions opengl: add shader helper functions. opengl: add shader build infrastructure Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/shaderinclude.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/shaderinclude.pl b/scripts/shaderinclude.pl
new file mode 100644
index 0000000..81b5146
--- /dev/null
+++ b/scripts/shaderinclude.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my $file = shift;
+open FILE, "<", $file or die "open $file: $!";
+my $name = $file;
+$name =~ s|.*/||;
+$name =~ s/[-.]/_/g;
+print "static GLchar ${name}_src[] =\n";
+while (<FILE>) {
+ chomp;
+ printf " \"%s\\n\"\n", $_;
+}
+print " \"\\n\";\n";
+close FILE;