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

Issue 11362256: Added raytracer to gl samples. (Closed)

Created:
8 years, 1 month ago by vsm
Modified:
8 years, 1 month ago
Reviewers:
Cutch, gram
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Added raytracer to gl samples. Committed: https://code.google.com/p/dart/source/detail?r=14974

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+405 lines, -145 lines) Patch
A + samples/simplegl/flashingbox.html View 1 chunk +1 line, -1 line 0 comments Download
A + samples/simplegl/raytrace.html View 1 chunk +6 lines, -4 lines 0 comments Download
M samples/simplegl/simplegl.css View 1 chunk +9 lines, -24 lines 0 comments Download
M samples/simplegl/simplegl.html View 1 chunk +6 lines, -4 lines 0 comments Download
A + samples/simplegl/web/flashingbox.dart View 2 chunks +9 lines, -5 lines 0 comments Download
A + samples/simplegl/web/flashingbox_driver.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M samples/simplegl/web/gl.dart View 1 chunk +7 lines, -8 lines 0 comments Download
M samples/simplegl/web/gl_driver.dart View 1 chunk +17 lines, -9 lines 0 comments Download
D samples/simplegl/web/gl_html.dart View 1 chunk +0 lines, -24 lines 0 comments Download
A samples/simplegl/web/raytrace.dart View 1 1 chunk +327 lines, -0 lines 0 comments Download
A + samples/simplegl/web/raytrace_driver.dart View 1 chunk +3 lines, -4 lines 0 comments Download
D samples/simplegl/web/simplegl.dart View 1 chunk +0 lines, -44 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 13 chunks +17 lines, -15 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
vsm
8 years, 1 month ago (2012-11-14 22:04:57 UTC) #1
Cutch
LGTM with my suggestions. http://codereview.chromium.org/11362256/diff/1/samples/simplegl/web/raytrace.dart File samples/simplegl/web/raytrace.dart (right): http://codereview.chromium.org/11362256/diff/1/samples/simplegl/web/raytrace.dart#newcode157 samples/simplegl/web/raytrace.dart:157: throw new Exception("Could not compile ...
8 years, 1 month ago (2012-11-15 15:06:13 UTC) #2
vsm
8 years, 1 month ago (2012-11-15 20:22:09 UTC) #3
Thanks, fixing and landing.

http://codereview.chromium.org/11362256/diff/1/samples/simplegl/web/raytrace....
File samples/simplegl/web/raytrace.dart (right):

http://codereview.chromium.org/11362256/diff/1/samples/simplegl/web/raytrace....
samples/simplegl/web/raytrace.dart:157: throw new Exception("Could not compile
shader");
On 2012/11/15 15:06:13, Cutch wrote:
> How about calling getshaderinfolog and include the output in the exception or
> print it to the console so we have an easy way to determine why the shader
> didn't compile.

Done.

http://codereview.chromium.org/11362256/diff/1/samples/simplegl/web/raytrace....
samples/simplegl/web/raytrace.dart:186: throw new Exception("Could not
initialize shaders");
On 2012/11/15 15:06:13, Cutch wrote:
> Same here but with getprograminfolog

Done.

http://codereview.chromium.org/11362256/diff/1/samples/simplegl/web/raytrace....
samples/simplegl/web/raytrace.dart:214:
gl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, vertexPositionBuffer);
Done.  Thanks for the catch.

On 2012/11/15 15:06:13, Cutch wrote:
> This bind is unnecessary.

http://codereview.chromium.org/11362256/diff/1/samples/simplegl/web/raytrace....
samples/simplegl/web/raytrace.dart:237: return new Vector( v.x/l, v.y/l, v.z/l
);
On 2012/11/15 15:06:13, Cutch wrote:
> Do the division once:
> var lr = 1.0 / l;
> 
> return new Vector (v.x * lr, v.y * lr, v.z * lr);

Done.

Powered by Google App Engine
This is Rietveld 408576698