OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library android_extension; | 5 library android_extension; |
6 | 6 |
7 import "dart-ext:android_extension"; | |
8 | |
9 // The simplest way to call native code: top-level functions. | 7 // The simplest way to call native code: top-level functions. |
10 int systemRand() native "SystemRand"; | 8 int systemRand() native "SystemRand"; |
11 void systemSrand(int seed) native "SystemSrand"; | 9 void systemSrand(int seed) native "SystemSrand"; |
12 void log(String what) native "Log"; | 10 void log(String what) native "Log"; |
13 | 11 |
14 // EGL functions. | 12 // EGL functions. |
15 void eglSwapBuffers() native "EGLSwapBuffers"; | 13 void eglSwapBuffers() native "EGLSwapBuffers"; |
16 | 14 |
17 // GL functions. | 15 // GL functions. |
18 void glAttachShader(int program, int shader) native "GLAttachShader"; | 16 void glAttachShader(int program, int shader) native "GLAttachShader"; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 getShaderInfoLog(shader) => glGetShaderInfoLog(shader); | 132 getShaderInfoLog(shader) => glGetShaderInfoLog(shader); |
135 getProgramInfoLog(program) => glGetProgramInfoLog(program); | 133 getProgramInfoLog(program) => glGetProgramInfoLog(program); |
136 | 134 |
137 // TODO(vsm): Kill. | 135 // TODO(vsm): Kill. |
138 noSuchMethod(invocation) { | 136 noSuchMethod(invocation) { |
139 throw new Exception('Unimplemented ${invocation.memberName}'); | 137 throw new Exception('Unimplemented ${invocation.memberName}'); |
140 } | 138 } |
141 } | 139 } |
142 | 140 |
143 var gl = new WebGLRenderingContext(); | 141 var gl = new WebGLRenderingContext(); |
OLD | NEW |