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 // The simplest way to call native code: top-level functions. | 7 // The simplest way to call native code: top-level functions. |
8 int systemRand() native "SystemRand"; | 8 int systemRand() native "SystemRand"; |
9 void systemSrand(int seed) native "SystemSrand"; | 9 void systemSrand(int seed) native "SystemSrand"; |
10 void log(String what) native "Log"; | 10 void log(String what) native "Log"; |
11 | 11 |
12 // EGL functions. | 12 // EGL functions. |
13 void eglSwapBuffers() native "EGLSwapBuffers"; | 13 void glSwapBuffers() native "SwapBuffers"; |
14 | 14 |
15 // GL functions. | 15 // GL functions. |
16 void glAttachShader(int program, int shader) native "GLAttachShader"; | 16 void glAttachShader(int program, int shader) native "GLAttachShader"; |
17 void glBindBuffer(int target, int buffer) native "GLBindBuffer"; | 17 void glBindBuffer(int target, int buffer) native "GLBindBuffer"; |
18 void glBufferData(int target, List data, int usage) native "GLBufferData"; | 18 void glBufferData(int target, List data, int usage) native "GLBufferData"; |
19 void glClearColor(num r, num g, num b, num alpha) native "GLClearColor"; | 19 void glClearColor(num r, num g, num b, num alpha) native "GLClearColor"; |
20 void glClearDepth(num depth) native "GLClearDepth"; | 20 void glClearDepth(num depth) native "GLClearDepth"; |
21 void glClear(int mask) native "GLClear"; | 21 void glClear(int mask) native "GLClear"; |
22 void glCompileShader(int shader) native "GLCompileShader"; | 22 void glCompileShader(int shader) native "GLCompileShader"; |
23 int glCreateBuffer() native "GLCreateBuffer"; | 23 int glCreateBuffer() native "GLCreateBuffer"; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 139 } |
140 | 140 |
141 var gl = new WebGLRenderingContext(); | 141 var gl = new WebGLRenderingContext(); |
142 | 142 |
143 //------------------------------------------------------------------ | 143 //------------------------------------------------------------------ |
144 // Simple audio support. | 144 // Simple audio support. |
145 | 145 |
146 void playBackground(String path) native "PlayBackground"; | 146 void playBackground(String path) native "PlayBackground"; |
147 void stopBackground() native "StopBackground"; | 147 void stopBackground() native "StopBackground"; |
148 | 148 |
OLD | NEW |