diff options
author | Mathias Agopian <mathias@google.com> | 2009-05-27 20:38:06 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-05-27 20:38:06 -0700 |
commit | b1a39d67be99fe6c4545b25e10ac82a5dd1df634 (patch) | |
tree | 9c5107e1af357dc5e734287df0661a36642a4761 /opengl/libs/tools | |
parent | a3d66a834f7e6796003684652d8aef13fa6345cd (diff) | |
download | frameworks_native-b1a39d67be99fe6c4545b25e10ac82a5dd1df634.zip frameworks_native-b1a39d67be99fe6c4545b25e10ac82a5dd1df634.tar.gz frameworks_native-b1a39d67be99fe6c4545b25e10ac82a5dd1df634.tar.bz2 |
Added most of the support needed for GLES 2.x
Diffstat (limited to 'opengl/libs/tools')
-rw-r--r-- | opengl/libs/tools/enumextract.sh | 32 | ||||
-rwxr-xr-x | opengl/libs/tools/genfiles | 11 | ||||
-rwxr-xr-x | opengl/libs/tools/glapigen | 15 | ||||
-rwxr-xr-x | opengl/libs/tools/glentrygen | 15 |
4 files changed, 31 insertions, 42 deletions
diff --git a/opengl/libs/tools/enumextract.sh b/opengl/libs/tools/enumextract.sh deleted file mode 100644 index 5707302..0000000 --- a/opengl/libs/tools/enumextract.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -awk ' -/^#define GL_/ { - names[count] = $2; - values[count] = $3; - sort[count] = $3 + 0; - count++; -} -END { - for (i = 1; i < count; i++) { - for (j = 0; j < i; j++) { - if (sort[i] < sort[j]) { - tn = names[i]; - tv = values[i]; - ts = sort[i]; - names[i] = names[j]; - values[i] = values[j]; - sort[i] = sort[j]; - names[j] = tn; - values[j] = tv; - sort[j] = ts; - } - } - } - - for (i = 0; i < count; i++) { - printf("GLENUM(%s, %s)\n", names[i], values[i]); - } -} -' < $1 - diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles index 107768b..4f8eda4 100755 --- a/opengl/libs/tools/genfiles +++ b/opengl/libs/tools/genfiles @@ -15,6 +15,13 @@ # limitations under the License. ./glapigen ../../include/GLES/gl.h > ../GLES_CM/gl_api.in -./glentrygen ../../include/GLES/gl.h > ../gl_entries.in +./glentrygen ../../include/GLES/gl.h > ../GLES_CM/gl_entries.in + ./glapigen ../../include/GLES/glext.h > ../GLES_CM/glext_api.in -./glentrygen ../../include/GLES/glext.h > ../glext_entries.in +./glentrygen ../../include/GLES/glext.h > ../GLES_CM/glext_entries.in + +./glapigen ../../include/GLES2/gl2.h > ../GLES2/gl2_api.in +./glentrygen ../../include/GLES2/gl2.h > ../GLES2/gl2_entries.in + +./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in +./glentrygen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_entries.in diff --git a/opengl/libs/tools/glapigen b/opengl/libs/tools/glapigen index a2c3a7b..bd8dda3 100755 --- a/opengl/libs/tools/glapigen +++ b/opengl/libs/tools/glapigen @@ -16,16 +16,23 @@ use strict; +sub rtrim($) +{ + my $string = shift; + $string =~ s/\s+$//; + return $string; +} + while (my $line = <>) { next if $line =~ /^\//; next if $line =~ /^#/; next if $line =~ /^\s*$/; - if ($line !~ /^GL_API\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { + if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { next; } - my $type = $1; - my $name = $2; - my $args = $3; + my $type = rtrim($2); + my $name = $3; + my $args = $4; #printf("%s", $line); diff --git a/opengl/libs/tools/glentrygen b/opengl/libs/tools/glentrygen index 5e0f7b6..170f041 100755 --- a/opengl/libs/tools/glentrygen +++ b/opengl/libs/tools/glentrygen @@ -16,16 +16,23 @@ use strict; +sub rtrim($) +{ + my $string = shift; + $string =~ s/\s+$//; + return $string; +} + while (my $line = <>) { next if $line =~ /^\//; next if $line =~ /^#/; next if $line =~ /^\s*$/; - if ($line !~ /^GL_API\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { + if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { next; } - my $type = $1; - my $name = $2; - my $args = $3; + my $type = rtrim($2); + my $name = $3; + my $args = $4; printf("GL_ENTRY(%s, %s, %s)\n", $type, $name, $args); } |