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

Side by Side Diff: samples/o3d-webgl-samples/hellocube-textures.html

Issue 1687019: Fixed samples to work with resizing code introduced yesterday. Now the... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 7 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 <!-- 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 </script> 376 </script>
377 </head> 377 </head>
378 <body> 378 <body>
379 <h1>Hello Cube: Textures</h1> 379 <h1>Hello Cube: Textures</h1>
380 This example shows how texture map a cube using an image fetched from a URL. 380 This example shows how texture map a cube using an image fetched from a URL.
381 <br/> 381 <br/>
382 382
383 383
384 <!-- Start of O3D plugin --> 384 <!-- Start of O3D plugin -->
385 <div id="o3d" width="600px" height="600px"></div> 385 <div id="o3d" style="width: 600px; height: 600px;"></div>
386 <!-- End of O3D plugin --> 386 <!-- End of O3D plugin -->
387 <br /> 387 <br />
388 Image URL: <input type="text" id="url" size="100"> 388 Image URL: <input type="text" id="url" size="100">
389 <input type="button" id="updateButton" onclick="changeTexture();" value="Update Texture"><BR> 389 <input type="button" id="updateButton" onclick="changeTexture();" value="Update Texture"><BR>
390 390
391 <!-- Don't render the textarea --> 391 <!-- Don't render the textarea -->
392 <div style="display:none"> 392 <div style="display:none">
393 <!-- Start of effect --> 393 <!-- Start of effect -->
394 <textarea id="vshader"> 394 <textarea id="vshader">
395 // World View Projection matrix that will transform the input vertices 395 // World View Projection matrix that will transform the input vertices
(...skipping 28 matching lines...) Expand all
424 * This pixel shader just returns the color red. 424 * This pixel shader just returns the color red.
425 */ 425 */
426 void main() { 426 void main() {
427 gl_FragColor = texture2D(texSampler0, uvs); 427 gl_FragColor = texture2D(texSampler0, uvs);
428 } 428 }
429 </textarea> 429 </textarea>
430 <!-- End of effect --> 430 <!-- End of effect -->
431 </div> 431 </div>
432 </body> 432 </body>
433 </html> 433 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698