mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
opengl: add shader build infrastructure
perl script to transform shader programs into c include files with static string constands containing the shader programs, so we can easily embed them into qemu. Also some Makefile logic for them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
5bccbb04a4
commit
d98bc0b654
2 changed files with 30 additions and 0 deletions
16
scripts/shaderinclude.pl
Normal file
16
scripts/shaderinclude.pl
Normal file
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue