| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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> |
| OLD | NEW |