Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: samples/solar3d/web/texture_manager.dart

Issue 11865005: Remove Futures class, move methods to Future. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 part of solar3d; 5 part of solar3d;
6 6
7 class Texture { 7 class Texture {
8 final int bindingPoint; 8 final int bindingPoint;
9 WebGLTexture texture; 9 WebGLTexture texture;
10 Texture(this.bindingPoint); 10 Texture(this.bindingPoint);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 gl.texImage2D(sideTargets[i], 106 gl.texImage2D(sideTargets[i],
107 0, 107 0,
108 WebGLRenderingContext.RGBA, 108 WebGLRenderingContext.RGBA,
109 WebGLRenderingContext.RGBA, 109 WebGLRenderingContext.RGBA,
110 WebGLRenderingContext.UNSIGNED_BYTE, 110 WebGLRenderingContext.UNSIGNED_BYTE,
111 img); 111 img);
112 c.complete(img.src); 112 c.complete(img.src);
113 }); 113 });
114 img.src = '$baseURL${sides[i]}'; 114 img.src = '$baseURL${sides[i]}';
115 } 115 }
116 return Futures.wait(futures); 116 return Future.wait(futures);
117 } 117 }
118 118
119 void bind(String name) { 119 void bind(String name) {
120 Texture t = textures[name]; 120 Texture t = textures[name];
121 if (t == null) { 121 if (t == null) {
122 print('Cannot find texture $name'); 122 print('Cannot find texture $name');
123 return; 123 return;
124 } 124 }
125 gl.bindTexture(WebGLRenderingContext.TEXTURE_2D, null); 125 gl.bindTexture(WebGLRenderingContext.TEXTURE_2D, null);
126 gl.bindTexture(WebGLRenderingContext.TEXTURE_CUBE_MAP, null); 126 gl.bindTexture(WebGLRenderingContext.TEXTURE_CUBE_MAP, null);
127 gl.bindTexture(t.bindingPoint, t.texture); 127 gl.bindTexture(t.bindingPoint, t.texture);
128 } 128 }
129 } 129 }
OLDNEW
« no previous file with comments | « samples/solar3d/web/solar.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698