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

Side by Side Diff: samples/render-targets.html

Issue 274042: Remove pack from calls to texture.getRenderSurface... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « samples/convolution.html ('k') | samples/shadow-map.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 Copyright 2009, Google Inc. 2 Copyright 2009, Google Inc.
3 All rights reserved. 3 All rights reserved.
4 4
5 Redistribution and use in source and binary forms, with or without 5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are 6 modification, are permitted provided that the following conditions are
7 met: 7 met:
8 8
9 * Redistributions of source code must retain the above copyright 9 * Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer. 10 notice, this list of conditions and the following disclaimer.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Creates a pack to manage our resources/assets 148 // Creates a pack to manage our resources/assets
149 g_pack = g_client.createPack(); 149 g_pack = g_client.createPack();
150 150
151 // Create a sub-pack to manage the resources required for the teapot. 151 // Create a sub-pack to manage the resources required for the teapot.
152 g_teapotPack = g_client.createPack(); 152 g_teapotPack = g_client.createPack();
153 153
154 // Create the texture required for the color render-target. 154 // Create the texture required for the color render-target.
155 var texture2d = g_pack.createTexture2D(RENDER_TARGET_WIDTH, 155 var texture2d = g_pack.createTexture2D(RENDER_TARGET_WIDTH,
156 RENDER_TARGET_HEIGHT, 156 RENDER_TARGET_HEIGHT,
157 g_o3d.Texture.XRGB8, 1, true); 157 g_o3d.Texture.XRGB8, 1, true);
158 var renderSurface = texture2d.getRenderSurface(0, g_pack); 158 var renderSurface = texture2d.getRenderSurface(0);
159 159
160 // Create the depth-stencil buffer required when rendering the teapot. 160 // Create the depth-stencil buffer required when rendering the teapot.
161 var depthSurface = g_pack.createDepthStencilSurface(RENDER_TARGET_WIDTH, 161 var depthSurface = g_pack.createDepthStencilSurface(RENDER_TARGET_WIDTH,
162 RENDER_TARGET_HEIGHT); 162 RENDER_TARGET_HEIGHT);
163 163
164 g_cubeRoot = g_pack.createObject('Transform'); 164 g_cubeRoot = g_pack.createObject('Transform');
165 g_teapotRoot = g_pack.createObject('Transform'); 165 g_teapotRoot = g_pack.createObject('Transform');
166 g_cubeRoot.parent = g_client.root; 166 g_cubeRoot.parent = g_client.root;
167 g_teapotRoot.parent = g_client.root; 167 g_teapotRoot.parent = g_client.root;
168 168
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 // Here we tell our effect file the functions which specify our vertex 331 // Here we tell our effect file the functions which specify our vertex
332 // and pixel shaders. 332 // and pixel shaders.
333 // #o3d VertexShaderEntryPoint vertexShaderFunction 333 // #o3d VertexShaderEntryPoint vertexShaderFunction
334 // #o3d PixelShaderEntryPoint pixelShaderFunction 334 // #o3d PixelShaderEntryPoint pixelShaderFunction
335 // #o3d MatrixLoadOrder RowMajor 335 // #o3d MatrixLoadOrder RowMajor
336 </textarea> 336 </textarea>
337 </div> 337 </div>
338 </body> 338 </body>
339 339
340 </html> 340 </html>
OLDNEW
« no previous file with comments | « samples/convolution.html ('k') | samples/shadow-map.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698