summaryrefslogtreecommitdiffstats
path: root/o3d/samples
Commit message (Collapse)AuthorAgeFilesLines
* Adding debugging demo to o3d-webgl collection. Includes minor bug fix in ↵luchen@google.com2010-06-086-52/+319
| | | | | | | | param_object (removeFromArray fails because collection is an object, not an array). Review URL: http://codereview.chromium.org/2716001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49192 0039d316-1c4b-4281-b951-d872f2087c98
* Adding support for pointlist, linelist, linestrip, trianglestrip and ↵luchen@google.com2010-06-083-5/+423
| | | | | | | | triangelfan primitive drawing types. Demo file included. Review URL: http://codereview.chromium.org/2645003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49173 0039d316-1c4b-4281-b951-d872f2087c98
* Converted four more demo files to o3d-webgl: juggler, sobel, julia and ↵luchen@google.com2010-06-074-0/+1351
| | | | | | | | texturesamplers. Review URL: http://codereview.chromium.org/2690002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49101 0039d316-1c4b-4281-b951-d872f2087c98
* Adding WebGL-ized rotatemodel.html demo.luchen@google.com2010-06-031-0/+250
| | | | | | Review URL: http://codereview.chromium.org/2483002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48869 0039d316-1c4b-4281-b951-d872f2087c98
* Porting the Phong Shader demo to WebGL.luchen@google.com2010-06-031-0/+345
| | | | | | Review URL: http://codereview.chromium.org/2503001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48868 0039d316-1c4b-4281-b951-d872f2087c98
* Adding WebGL-ified version of the customcamera.html demo.luchen@google.com2010-06-021-0/+456
| | | | | | Review URL: http://codereview.chromium.org/2439003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48682 0039d316-1c4b-4281-b951-d872f2087c98
* Until we work out why V8 refuses to work on the Safari/10.6 combination, ↵maf@google.com2010-05-291-0/+24
| | | | | | | | | ignore attempts to select the V8 engine on that config. This makes everything work. w00t! Review URL: http://codereview.chromium.org/2361003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48549 0039d316-1c4b-4281-b951-d872f2087c98
* Changed how checkers sample identifies whether a hit occurred usingkbr@google.com2010-05-281-2/+4
| | | | | | | | | | | | | | | clientId rather than object equality. In both Safari and Chrome, if the browser's JavaScript engine is used rather than O3D's embedded V8, these equality comparisons fail. It looks like we may need to disable the use of the embedded V8 for this sample due to bad interactions with event dispatching. BUG=none TEST=none Review URL: http://codereview.chromium.org/2334001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48451 0039d316-1c4b-4281-b951-d872f2087c98
* Some texture parameters were being set in the pack when the texture was ↵petersont@google.com2010-05-242-97/+210
| | | | | | | | created by calling pack.createTexture2D or pack.createTextureCUBE. Moved that code into Texture class. Review URL: http://codereview.chromium.org/2117003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48078 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored Buffer and Field getAt functions to use a common helper function, ↵petersont@google.com2010-05-242-27/+38
| | | | | | | | avoiding redundant code. Review URL: http://codereview.chromium.org/2081002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48071 0039d316-1c4b-4281-b951-d872f2087c98
* The z-sorting sample looked tinted gray because of the final alpha channel ↵petersont@google.com2010-05-193-6/+16
| | | | | | | | copying to the screen. Fixing this revealed that the sort was actually broken in a different way as well, so I fixed that, too. Review URL: http://codereview.chromium.org/2074015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47606 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a typo in pool code and made comments more google stylepetersont@google.com2010-05-174-19/+29
| | | | | | | Implemented ParamObject.removeParam and ParamObject.copyParams. Minor style change in primitive.js. Review URL: http://codereview.chromium.org/2083004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47465 0039d316-1c4b-4281-b951-d872f2087c98
* Sorts drawlists by priority or by depth as indicated by the flag in the ↵petersont@google.com2010-05-174-7/+272
| | | | | | | | DrawPass. Review URL: http://codereview.chromium.org/2075003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47459 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored the SAS parameter code slightly to avoid redundant listing of ↵petersont@google.com2010-05-142-181/+170
| | | | | | | | parameter names. Review URL: http://codereview.chromium.org/2122002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47337 0039d316-1c4b-4281-b951-d872f2087c98
* When a demo on the o3d-webgl site gets opened in an ordinary browser that ↵petersont@google.com2010-05-142-11/+78
| | | | | | | | doesn't support WebGL yet, the error message just says "WebGL context not found". Now it provides a link with more information. Review URL: http://codereview.chromium.org/2099002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47312 0039d316-1c4b-4281-b951-d872f2087c98
* Added setLanguage functions to canvas, fps and particles. Added ↵amarinichev@chromium.org2010-05-0623-106/+7106
| | | | | | | | beachdemo-glsl and its shaders. Review URL: http://codereview.chromium.org/1894001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46579 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored event handling code gman added to simpleviewer.html intokbr@google.com2010-04-302-98/+130
| | | | | | | | | | | | | | client.js. Fixed bug where window.event was being overwritten, which for some reason broke key event handling in Firefox even though the event wrapper wasn't being used. Tested pool sample in Firefox, WebKit and Chromium. BUG=none TEST=none Review URL: http://codereview.chromium.org/1826002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46140 0039d316-1c4b-4281-b951-d872f2087c98
* Merged in gman's fixes to make o3d-webgl samples work in Firefox.kbr@google.com2010-04-306-14/+123
| | | | | | | | | | | | | Resized poolballs.png to power-of-two dimensions. Retested all o3d-webgl samples in top of tree Firefox, WebKit and Chromium. BUG=none TEST=none TBR=gman,petersont Review URL: http://codereview.chromium.org/1695031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46100 0039d316-1c4b-4281-b951-d872f2087c98
* Advancing to latest gyp.bradnelson@google.com2010-04-301-59/+4
| | | | | | | | Reverting 46012. Review URL: http://codereview.chromium.org/1815003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46082 0039d316-1c4b-4281-b951-d872f2087c98
* Incorporated gman's CSS changes for resizing and placing thekbr@google.com2010-04-301-6/+29
| | | | | | | | | | | instructions at the bottom of the page. BUG=none TEST=ran pool sample Review URL: http://codereview.chromium.org/1706020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46022 0039d316-1c4b-4281-b951-d872f2087c98
* Added pool ball image to MANIFEST.kbr@google.com2010-04-301-0/+1
| | | | | | | | | | BUG=none TEST=ran built pool sample TBR=petersont Review URL: http://codereview.chromium.org/1812006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46019 0039d316-1c4b-4281-b951-d872f2087c98
* Worked around bug in directory copying support in gyp MSVS generatorkbr@google.com2010-04-291-4/+59
| | | | | | | | | | | | by enumerating all files needing to be copied. BUG=none TEST=built on Windows TBR=gman Review URL: http://codereview.chromium.org/1695030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46012 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed problem with some parameters being optimized away by the GLSLkbr@google.com2010-04-291-4/+12
| | | | | | | | | | | | compiler. BUG=none TEST=ran o3d-webgl pool on Windows with NVIDIA hardware already reviewed=petersont Review URL: http://codereview.chromium.org/1748017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46010 0039d316-1c4b-4281-b951-d872f2087c98
* Reorganized dependencies in generated samples_gen.gyp so that thekbr@google.com2010-04-291-6/+32
| | | | | | | | | | | | | | | conversion step always occurs before the copying step, which fixes a build problem on Windows. Worked around a gyp issue on Windows to properly convert both the plugin and WebGL versions of a couple of the assets. BUG=none TEST=built on Windows TBR=gman Review URL: http://codereview.chromium.org/1801008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46002 0039d316-1c4b-4281-b951-d872f2087c98
* Added culling sample.petersont@google.com2010-04-2914-79/+772
| | | | | | Review URL: http://codereview.chromium.org/1703014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45993 0039d316-1c4b-4281-b951-d872f2087c98
* Added pool, fixed a bug in Bitmap (or to be precise, kbr fixed the bug). ↵petersont@google.com2010-04-294-5/+2155
| | | | | | | | Flipping a bitmap vertically was deferred to the texture, which is fine, unless the bitmap actually gets modified before the texture gets made, so now flipVertically() actually flips the image. Review URL: http://codereview.chromium.org/1699021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45960 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed output directory for converted WebGL assets. Something stillkbr@google.com2010-04-291-1/+1
| | | | | | | | | | | | appears to be broken in the Windows build, however. BUG=none TEST=built on Mac, attempted build on Windows TBR=gman Review URL: http://codereview.chromium.org/1699024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45903 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/1798009petersont@google.com2010-04-291-36/+79
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45899 0039d316-1c4b-4281-b951-d872f2087c98
* Copy WebGL compatible assets to output directory during the build.kbr@google.com2010-04-292-0/+27
| | | | | | | | | | | | | | Manually copy webgl.js to output directory because we are not prepared to run the documentation generation on this file yet. All o3d-webgl samples now run out of the build directory. BUG=none TEST=ran o3d-webgl samples out of build directory TBR=gman Review URL: http://codereview.chromium.org/1796004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45897 0039d316-1c4b-4281-b951-d872f2087c98
* Fleshed out sampler implementation a bit.petersont@google.com2010-04-293-14/+115
| | | | | | Review URL: http://codereview.chromium.org/1759012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45893 0039d316-1c4b-4281-b951-d872f2087c98
* Copy o3d-webgl and o3d-webgl-samples into the build directory whilekbr@google.com2010-04-291-0/+32
| | | | | | | | | | | | building the samples. BUG=none TEST=ran build on Mac, verified files were copied TBR=gman Review URL: http://codereview.chromium.org/1742016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45891 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug in effect.js during lookup of attribute locations. Fixedkbr@google.com2010-04-291-8/+8
| | | | | | | | | | | | variable scoping problems making debugging more difficult. BUG=none TEST=none TBR=petersont Review URL: http://codereview.chromium.org/1758015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45890 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed samples to work with resizing code introduced yesterday. Now thekbr@google.com2010-04-289-13/+57
| | | | | | | | | | | | | | | setup of the containing div is identical to that in the plugin version of O3D. Fixed createClients to only call the initialization callback once the client's initial size has been set. Fixed bug in texture wrap mode setup which was breaking the bump map in helloworld.html. BUG=none TEST=ran all o3d-webgl samples TBR=petersont Review URL: http://codereview.chromium.org/1687019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45866 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug in samples conversion introduced by WebGL-related changes andkbr@google.com2010-04-281-2/+10
| | | | | | | | | | | | | caught by Linux try bots. Need to specify a different output than the non-WebGL target for the same asset, because otherwise multithreaded builds choose one or the other target to execute. BUG=none TEST=reran build Review URL: http://codereview.chromium.org/1723019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45837 0039d316-1c4b-4281-b951-d872f2087c98
* Thanks to gman, fixed o3d.webgl.createClient and o3d-webgl Client to handlekbr@google.com2010-04-283-4/+394
| | | | | | | | | | | resizing of div containing O3D element. Added simpleviewer sample. BUG=none TEST=ran simpleviewer sample Review URL: http://codereview.chromium.org/1798006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45770 0039d316-1c4b-4281-b951-d872f2087c98
* Added rules which generate WebGL-compatible assets to samples_gen.py.kbr@google.com2010-04-272-3/+19
| | | | | | | | | | | | | Added conversion step for teapot and cube assets, which are known to work within helloworld.html. Added comment to helloworld.html about enabling the debug rendering context. BUG=none TEST=tested helloworld.html against converted assets Review URL: http://codereview.chromium.org/1793004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45754 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed problem in o3dConverter where it was not outputting all of thekbr@google.com2010-04-235-30/+114
| | | | | | | | | | | | | | | | | | | vertex data in JSON format. Fixed problems in effect.js where GLSL code path needed to name the texture coordinate attributes with the semantic names and not the names like "diffuseUV" because otherwise the backend did not know how to hook them up. Fixed problem with cube map faces being flipped and bug in binding cube map textures. At this point o3d-webgl can load the converted cube and teapot, though the teapot is currently missing the bump map. Tested O3D plugin with this sample to ensure no regression. BUG=none TEST=none Review URL: http://codereview.chromium.org/1729012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45495 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed primitives' glsl shaders: it was missing MatrixLoadOrder directive.amarinichev@chromium.org2010-04-231-7/+16
| | | | | | Review URL: http://codereview.chromium.org/1766002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45459 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug pointed out by mihai where success was incorrectly reportedkbr@google.com2010-04-231-2/+7
| | | | | | | | | | | | during shader compilation. Added reporting of link failures. BUG=none TEST=ran some o3d-webgl samples TBR=petersont Review URL: http://codereview.chromium.org/1757006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45408 0039d316-1c4b-4281-b951-d872f2087c98
* Changed the semantics of many fields throughout the o3d-webglkbr@google.com2010-04-2223-671/+749
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation to be backed by Params using o3d.ParamObject.setUpO3DParam_. This change was needed to maintain the semantics of the plugin, where fetching a parameter of a certain name and setting it is equivalent to setting the field against the object. This change mandated moving all of the assignments of the form "constructor.prototype.fieldName = defaultValue" into the constructor function itself, so that the setter created by setUpO3DParam will be properly called for those assignments. For all files touched by this CL, moved all default field assignments, not just those associated with Param-backed fields. Incorporated petersont's setup of the dx_clipping uniform introduced in amarinichev's cg_to_glsl converter. Commented out bogus modification of projection matrix in o3d.Param.SAS.setProjection and added TODO to modify all handwritten shaders. Fixed bug in o3d.Buffer.prototype.resize where it needed to coerce the argument to an integer, a bug in the type determination for arrays in param.js, and a couple of other bugs. Changed cg_to_glsl script to use the expected case for the SAS matrices in the o3d-webgl backend. Hopefully this change will not break the GLES2 backend. Ran all o3d-webgl samples. All work except for shadow-map.html (affected by https://bugs.webkit.org/show_bug.cgi?id=37963 ) and helloworld.html, which now does not report any errors but also does not display any output yet. BUG=none TEST=ran o3d-webgl samples TBR=petersont,amarinichev Review URL: http://codereview.chromium.org/1751006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45278 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/1736003amarinichev@chromium.org2010-04-2119-1098/+1624
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45262 0039d316-1c4b-4281-b951-d872f2087c98
* Incremental progress toward archive loading in o3d-webgl. Implementedkbr@google.com2010-04-2111-18/+1045
| | | | | | | | | | | | | | | | | | | | | ArchiveRequest, which expects to be pointed to the top-level scene.json, and which emulates the behavior of the O3D plugin by downloading the referenced resources and creating RawData objects for each. Pulled in public domain JSON parser from http://www.json.org/ . Implemented portions of TextureCUBE. Fixed some unimplemented functionality and a few bugs related to creation of parameters. At this point a larger refactoring of o3d-webgl is needed to make the deserialization work properly, so this code is being checked in as a checkpoint. Also fixed small bug in the cg_to_glsl converter script. BUG=none TEST=none TBR=petersont,amarinichev Review URL: http://codereview.chromium.org/1745002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45143 0039d316-1c4b-4281-b951-d872f2087c98
* Added --convert-dds-to-png command line option to the COLLADA converter,kbr@google.com2010-04-202-2/+82
| | | | | | | | | | | | | | | | | | | which causes all DDS textures to be outputted as PNGs. This required changes to the serialization code to reconstitute cube map textures from six separate images. Some bugs in the plugin were uncovered with this change which have been worked around for the time being. Pulled in libtxc_dxtn library for decompressing DXTn textures. Tested by converting teapot with --convert-dds-to-png and running helloworld.html and render-mode.html. BUG=none TEST=none Review URL: http://codereview.chromium.org/1677002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45014 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed recently introduced regression in effect.js pointed out bykbr@google.com2010-04-161-4/+4
| | | | | | | | | | | | kkania where varying declarations were being repeated twice in Cg versions of shaders. BUG=none TEST=ran primitives.html Review URL: http://codereview.chromium.org/1669003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44849 0039d316-1c4b-4281-b951-d872f2087c98
* Hierarchy. Hierarchy. Hierarchy!!!avi@chromium.org2010-04-093-4/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1561020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44107 0039d316-1c4b-4281-b951-d872f2087c98
* Build fixes for case when fullscreen message is disabled, for IMC codekbr@chromium.org2010-04-081-11/+15
| | | | | | | | | | | path, and for effect.js docs. BUG=none TEST=none (built O3D on Mac) Review URL: http://codereview.chromium.org/1512029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43995 0039d316-1c4b-4281-b951-d872f2087c98
* A number of incidental changes I've made over the passed few weeks have ↵petersont@google.com2010-04-0810-115/+420
| | | | | | | | apparently slipped through the cracks because of my carelessness deciding which files to include in the cls. I will add inline comments explaining each one. Review URL: http://codereview.chromium.org/1626006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43904 0039d316-1c4b-4281-b951-d872f2087c98
* Modified effect.js to emit glsl as well as the original o3d shader language. ↵petersont@google.com2010-04-073-303/+1006
| | | | | | | | Also got primitives.html working and added it to o3d-webgl-samples directory. Review URL: http://codereview.chromium.org/1300002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43884 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/1565008petersont@google.com2010-04-052-331/+65
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43656 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented Texture2D.drawImage, along the way cleaned up a number of ↵petersont@google.com2010-03-2214-85/+215
| | | | | | | | lingering bugs, moved some texture initialization so subsequent calls to gl.texSubImage2D wouldn't fail. Review URL: http://codereview.chromium.org/1092003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42277 0039d316-1c4b-4281-b951-d872f2087c98