summaryrefslogtreecommitdiffstats
path: root/o3d
Commit message (Collapse)AuthorAgeFilesLines
* Simplification of recent change suggested by amarinichev.kbr@google.com2010-04-221-4/+4
| | | | | | | | | BUG=none TEST=reran against teapot shader Review URL: http://codereview.chromium.org/1705006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45337 0039d316-1c4b-4281-b951-d872f2087c98
* Changed the semantics of many fields throughout the o3d-webglkbr@google.com2010-04-2224-672/+782
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2112-19/+1046
| | | | | | | | | | | | | | | | | | | | | 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
* Implemented DX clipping rules to match CG version. Uses dx_clipping varying.amarinichev@chromium.org2010-04-205-6/+53
| | | | | | Review URL: http://codereview.chromium.org/1646016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45069 0039d316-1c4b-4281-b951-d872f2087c98
* Added --convert-dds-to-png command line option to the COLLADA converter,kbr@google.com2010-04-2014-7/+279
| | | | | | | | | | | | | | | | | | | 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
* Changed --json-only argument to converter to --no-archive andkbr@chromium.org2010-04-163-26/+210
| | | | | | | | | | | | implemented it. Verified that normal operation is unchanged and that --no-archive produces desired results. Also tested with --no-binary. BUG=none TEST=none Review URL: http://codereview.chromium.org/1646012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44850 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
* A simple script to convert o3d cg shaders to glsl.amarinichev@chromium.org2010-04-161-0/+172
| | | | | | Review URL: http://codereview.chromium.org/1595017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44831 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/1599036zmo@google.com2010-04-161-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44721 0039d316-1c4b-4281-b951-d872f2087c98
* upgrade to selenium 1.03 and the newest chrome.zmo@google.com2010-04-151-9/+3
| | | | | | Review URL: http://codereview.chromium.org/1515007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44717 0039d316-1c4b-4281-b951-d872f2087c98
* Use the correct target when binding a cubemap texture.amarinichev@chromium.org2010-04-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/1530042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44665 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Use the plugin_npapi_filename variable to choose the bundle name ↵tschmelcher@chromium.org2010-04-156-15/+20
| | | | | | | | | | | (rather than the static "O3D" name) so that differently branded versions can co-exist. This also changes the default name from O3D.plugin to npo3dautoplugin.plugin to harmonize it with the other platforms. TEST=built & tested a rebranded plugin and non-rebranded plugin on Mac BUG=none Review URL: http://codereview.chromium.org/1585034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44662 0039d316-1c4b-4281-b951-d872f2087c98
* Send bool response on message SET_MAX_FPSzhurunz@google.com2010-04-143-8/+1
| | | | | | | | Enable build flag O3D_PLUGIN_SUPPORT_SET_MAX_FPS Review URL: http://codereview.chromium.org/1527030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44550 0039d316-1c4b-4281-b951-d872f2087c98
* Update DEPS to pull in missing Nixysa, and add code to use new Nixysa ↵maf@google.com2010-04-143-11/+10
| | | | | | | | threading support needed for Safari on 10.6. Review URL: http://codereview.chromium.org/1622023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44434 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/577038maf@google.com2010-04-139-46/+390
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44397 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed stream-attribute matching. Autoconverted teapot shader works ↵amarinichev@chromium.org2010-04-132-8/+8
| | | | | | | | correctly now. Review URL: http://codereview.chromium.org/1599025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44391 0039d316-1c4b-4281-b951-d872f2087c98
* Hierarchy. Hierarchy. Hierarchy!!!avi@chromium.org2010-04-094-5/+5
| | | | | | | | | 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
* Fixed bug in size of invalid rect. This slipped through inkbr@chromium.org2010-04-091-2/+2
| | | | | | | | | | | | | | | http://code.google.com/p/o3d/issues/detail?id=215 / http://codereview.chromium.org/669220 because of a last minute change to the NPN_InvalidateRect call. Internal bug ID: http://b/issue?id=2582040 BUG=none TEST=none (ran O3D samples) Review URL: http://codereview.chromium.org/1553020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44032 0039d316-1c4b-4281-b951-d872f2087c98
* Build fixes for case when fullscreen message is disabled, for IMC codekbr@chromium.org2010-04-083-26/+29
| | | | | | | | | | | 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
* Add a new message to allow draw on every new texture within given fps ↵tschmelcher@chromium.org2010-04-087-4/+107
| | | | | | | | | limitation. Submitting on behalf of zhurunz. Original issue @ http://codereview.chromium.org/1627007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43978 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
* Rev O3D DEPS to pull in new Nixysa.maf@google.com2010-03-311-1/+1
| | | | | | Review URL: http://codereview.chromium.org/1530010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43164 0039d316-1c4b-4281-b951-d872f2087c98
* Fix except clauses with multiple browser names. The scripts parse the list ↵kkania@chromium.org2010-03-303-9/+17
| | | | | | | | on spaces, so delete the extra whitespace. Also, special case Chrome for one v8 test, in which Chrome expects no parenthesis around the exception. Review URL: http://codereview.chromium.org/1566005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43104 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
* Bump GYP dep to get fixes for escaping/quoting in 'defines'.tschmelcher@chromium.org2010-03-201-1/+1
| | | | | | | | | TEST=built on Linux BUG=none Review URL: http://codereview.chromium.org/1125005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42180 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: link with --as-needed to eliminate direct dependencies on 15 shared ↵tschmelcher@chromium.org2010-03-191-6/+20
| | | | | | | | | | | libraries that we don't actually use. TEST=built on Linux and ran it BUG=none Review URL: http://codereview.chromium.org/1072008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42173 0039d316-1c4b-4281-b951-d872f2087c98
* Added textures, texture samplers and render targets to o3d-webgl. Also ↵petersont@google.com2010-03-1236-201/+2246
| | | | | | | | fixed bugs, added calls to parent class constructor to classes that didn't have them before, added a few demos to exhibit/test textures and render surfaces. Review URL: http://codereview.chromium.org/856004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41482 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for O3D in Chrome on Mac OS X using CoreGraphics drawingkbr@chromium.org2010-03-1119-66/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | model by rendering offscreen, reading back the frame buffer, and drawing the rendering results into the CGContextRef. This code path is currently Chrome-specific, but could be used for any browser with similar characteristics. This will require refactoring of the drawing and event model selection code, which may be done in a subsequent bug. Changed the RenderSurface APIs to allow the Bitmap for readback to be passed in. Added Client::SetOffscreenRenderingSurfaces so that the entry point Client::RenderClient() can be used unchanged. Fixed problem with plugin_enable_fullscreen_msg gyp variable which needs to be in top-level gypi so #define is consistent throughout project. Fixed minor issue in Cocoa key event handling. Fixed log message causing crashes when render target attachment fails. Chrome currently blacklists the O3D plugin's MIME type, so to enable support for O3D this blacklist entry needs to be removed from Chrome. Ran nearly all O3D samples in Chrome on Mac OS X. There are a couple of failures which will be fixed in subsequent bugs. Also ran samples in Safari and Firefox on Mac and verified no performance regressions. BUG=http://code.google.com/p/o3d/issues/detail?id=215 TEST=ran O3D samples in Chrome, Safari and Firefox Review URL: http://codereview.chromium.org/669220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41233 0039d316-1c4b-4281-b951-d872f2087c98
* Corrected the mismatch between the dimensions of vectors and matrices. The ↵alokp@chromium.org2010-03-103-5/+5
| | | | | | | | binary operations between vectors and matrices require that the dimensions match. Review URL: http://codereview.chromium.org/766001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41163 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Fix build break in r40786 due to file not ending with a newline. ↵tschmelcher@chromium.org2010-03-052-2/+2
| | | | | | | | | | | (Don't know why the trybot didn't catch that ...) Also fix a GCC signedness warning when compiling the domain whitelist code. TEST=built on Linux BUG=none Review URL: http://codereview.chromium.org/669206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40792 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce two new GYP variables:tschmelcher@chromium.org2010-03-0514-8/+327
| | | | | | | | | | | | | 1) plugin_domain_whitelist, which sets an optional domain whitelist. If specified, websites not in the list can't use the plugin. 2) plugin_enable_fullscreen_msg, which can be optionally unset to disable the Win/Mac fullscreen message. Also fix a bug in NPPluginProxy that this uncovered. TEST=built on Windows with a whitelist and without fullscreen message and verified correct behaviour in both IE and FF. Also, the whitelist logic comes almost verbatim from another Google product where it is already well-tested BUG=none Review URL: http://codereview.chromium.org/668078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40786 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for increasing the polygon offset with each successivekbr@google.com2010-03-034-11/+116
| | | | | | | | | | | | | | | | path parsed by the SVG loader. This allows the SVG butterfly sample to begin rendering, but there are still bugs in the orientation determination for some of the contours. In SVG loader, implemented scale function and fixed problem in the handling of tokens while parsing paths' data. BUG=none TEST=svg_butterfly.html Review URL: http://codereview.chromium.org/664005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40531 0039d316-1c4b-4281-b951-d872f2087c98
* Revert my change to the O3D plugin's description format, since it breaks the ↵tschmelcher@chromium.org2010-03-021-1/+1
| | | | | | | | | | | logic in o3djs.util.requiredVersionAvailable(). TEST=built and ran ping pong sample on Linux BUG=none Review URL: http://codereview.chromium.org/660019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40427 0039d316-1c4b-4281-b951-d872f2087c98
* When an o3d window does not belong to any monitor (off screen), instead of ↵zmo@google.com2010-03-011-7/+1
| | | | | | | | failing, use the default monitor/adapter instead. Review URL: http://codereview.chromium.org/661300 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40311 0039d316-1c4b-4281-b951-d872f2087c98
* Fix minor issues for some tests, and disable others.kkania@google.com2010-03-014-8/+16
| | | | | | Review URL: http://codereview.chromium.org/660152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40309 0039d316-1c4b-4281-b951-d872f2087c98
* Incorporating change missed in previous CLkbr@chromium.org2010-02-271-2/+2
| | | | | | | | (http://codereview.chromium.org/652016). Review URL: http://codereview.chromium.org/661232 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40191 0039d316-1c4b-4281-b951-d872f2087c98
* First check in of the o3d implimentation in webgl. Classes work well enough ↵petersont@google.com2010-02-2640-0/+8656
| | | | | | | | to run the hellocube sample. Review URL: http://codereview.chromium.org/561026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40133 0039d316-1c4b-4281-b951-d872f2087c98
* Thanks to apatrick, added missing support to GLSL ES grammar forkbr@chromium.org2010-02-2624-15/+746
| | | | | | | | | | | | | | | user-defined types in constructor calls and type names. Allows declarations of uniforms of struct types to parse. Added all shaders from WebGL demos; all parse successfully. Fixed Ant build targets. Attempted to make same changes to Bison version of grammar, but it is not working well (failing to parse some function calls the ANTLR version handles). Leaving it functionally unchanged. Cleaned up comments. Review URL: http://codereview.chromium.org/660160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40129 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed uninitialized variables breaking Linux build after checkin ofkbr@google.com2010-02-261-3/+3
| | | | | | | | | | | | http://codereview.chromium.org/652016 . BUG=none TEST=built and tested on Linux TBR=gman Review URL: http://codereview.chromium.org/661143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40084 0039d316-1c4b-4281-b951-d872f2087c98
* Added the bulk of the algorithm for GPU accelerated 2D vector curvekbr@chromium.org2010-02-2639-23/+5909
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rendering from "Rendering Vector Art on the GPU" by Loop and Blinn, GPU Gems 3, Chapter 25. The main entry point to the algorithm is the PathProcessor, which takes in a Skia path and converts it to two triangle meshes: one for the exterior region of the shape containing the curve segments, and one for the interior region of the shape which is filled with constant (1.0) alpha. The o3d.ProcessedPath class is the internal object which exposes the needed entry points to JavaScript. However, o3djs.gpu2d is the user-level entry point to the algorithm. This exposes a Path primitive to which line, quadratic curve and cubic curve segments can be added, and simple fills (currently only a solid color). An SVG loader in samples/gpu2d/svgloader.js illustrates how content might be imported at run time. Several samples and regression tests demonstrate the current state of the implementation. More work is planned. Some small generalizations to the O3D code were necessary to support two-dimensional vertices. Note that I plan to submit gpu2d.js and/or svgloader.js for JavaScript readability. I have run both through the JS compiler and have fixed as many of the doc generation errors as possible in svgloader.js without pulling this file into the o3djs namespace. Tested in O3D on Windows and Mac OS X. BUG=none TEST=various SVG based tests Review URL: http://codereview.chromium.org/652016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40079 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: make sure the fullscreen window always gets focustschmelcher@chromium.org2010-02-222-3/+11
| | | | | | | | | TEST=tested fullscreen on Linux with metacity, metacity + focus-follows-mouse, compiz, compiz + focus-follows-mouse BUG=none Review URL: http://codereview.chromium.org/652076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39651 0039d316-1c4b-4281-b951-d872f2087c98
* Make ActiveX CLSIDs and names into overridable variables too. Also make the ↵tschmelcher@chromium.org2010-02-2216-93/+265
| | | | | | | | | | | NPAPI plugin's filename overridable, since that's needed too in order to fully re-brand the NPAPI plugin. TEST=built on Windows with branding overrides and verified that the product worked in both FF 3.6 and IE7 with similarly modified JavaScript code BUG=none Review URL: http://codereview.chromium.org/646071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39630 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Implement cursor type NONE. Also ensure fullscreen windows are ↵tschmelcher@chromium.org2010-02-192-7/+39
| | | | | | | | created on the same X11 screen as the embedded window. Review URL: http://codereview.chromium.org/651066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39507 0039d316-1c4b-4281-b951-d872f2087c98
* Set the correct content window parameters for the "soft" fullscreen mode:zmo@google.com2010-02-191-1/+9
| | | | | | | | 1) make the window "topmost" (but still won't overide TaskManager) 2) add the ex-style of WS_EX_TOOLWINDOW so the content window won't show in the TaskBar when in "soft" fullscreen mode. Otherwise it shows, and when you click on it or press ctrl-del-alt, o3d will get out of fullscreen mode, but this content window will linger in the TaskBar. Review URL: http://codereview.chromium.org/651003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39500 0039d316-1c4b-4281-b951-d872f2087c98
* Added viewAll method to CameraController.kbr@chromium.org2010-02-191-2/+67
| | | | | | Review URL: http://codereview.chromium.org/651049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39475 0039d316-1c4b-4281-b951-d872f2087c98
* Requesting C++ readability review for these classes and unit tests.kbr@chromium.org2010-02-196-107/+102
| | | | | | | | | | | | | The arena allocator is designed for optimized allocation and deallocation of small temporary objects, and is used by the augmentable red-black tree. In a subsequent checkin, the red-black tree will be augmented into an interval tree, which is a key data structure for efficient implementation of one of the algorithms in the forthcoming code in this directory. Review URL: http://codereview.chromium.org/596093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39414 0039d316-1c4b-4281-b951-d872f2087c98
* Added a specialized triangulator which creates triangles filling thekbr@chromium.org2010-02-196-0/+808
| | | | | | | | | | | | | | convex hull of the four control points of a cubic curve segment. It also computes a path along the filled side of the curve segment, which will be used to fill the interior region of closed shapes with a general tessellation algorithm. BUG=none TEST=LocalTriangulatorTest Review URL: http://codereview.chromium.org/646048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39413 0039d316-1c4b-4281-b951-d872f2087c98