| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 </script> | 280 </script> |
| 281 </head> | 281 </head> |
| 282 <body> | 282 <body> |
| 283 <h1>Hello Square: Colors</h1> | 283 <h1>Hello Square: Colors</h1> |
| 284 This example shows how to use parameters to the color output of a shader. | 284 This example shows how to use parameters to the color output of a shader. |
| 285 <br/> | 285 <br/> |
| 286 | 286 |
| 287 | 287 |
| 288 <!-- Start of O3D plugin --> | 288 <!-- Start of O3D plugin --> |
| 289 <div id="o3d" width="600px" height="600px"></div> | 289 <div id="o3d" style="width: 600px; height: 600px;"></div> |
| 290 <!-- End of O3D plugin --> | 290 <!-- End of O3D plugin --> |
| 291 | 291 |
| 292 <form name="default_form" action="#" method="get"> | 292 <form name="default_form" action="#" method="get"> |
| 293 <p> | 293 <p> |
| 294 Change color: | 294 Change color: |
| 295 <input type="button" value="Red" onclick="changeColor(1,0,0);" /> | 295 <input type="button" value="Red" onclick="changeColor(1,0,0);" /> |
| 296 <input type="button" value="Green" onclick="changeColor(0,1,0);" /> | 296 <input type="button" value="Green" onclick="changeColor(0,1,0);" /> |
| 297 <input type="button" value="Blue" onclick="changeColor(0,0,1);" /> | 297 <input type="button" value="Blue" onclick="changeColor(0,0,1);" /> |
| 298 <input type="button" value="Yellow" onclick="changeColor(1,1,0);" /> | 298 <input type="button" value="Yellow" onclick="changeColor(1,1,0);" /> |
| 299 <input type="button" value="Cyan" onclick="changeColor(0,1,1);" /> | 299 <input type="button" value="Cyan" onclick="changeColor(0,1,1);" /> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 gl_FragColor = color; | 334 gl_FragColor = color; |
| 335 } | 335 } |
| 336 | 336 |
| 337 // Here we tell our effect file *which* functions are | 337 // Here we tell our effect file *which* functions are |
| 338 // our vertex and pixel shaders. | 338 // our vertex and pixel shaders. |
| 339 </textarea> | 339 </textarea> |
| 340 <!-- End of effect --> | 340 <!-- End of effect --> |
| 341 </div> | 341 </div> |
| 342 </body> | 342 </body> |
| 343 </html> | 343 </html> |
| OLD | NEW |