summaryrefslogtreecommitdiffstats
path: root/o3d
Commit message (Collapse)AuthorAgeFilesLines
* Fix for param array support in effects for GLgman@google.com2009-09-011-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25022 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes for texture locking.gman@google.com2009-09-014-11/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25018 0039d316-1c4b-4281-b951-d872f2087c98
* Update samples to use more utility functions wheregman@google.com2009-09-0131-633/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate. A few places used pseudoRandom. That is in math.js now so they use that. Other places there is now o3djs.material.createBasicMaterial and o3djs.material.createMaterialFromFile that save 10-20 lines per sample. This CL will require new reference images. There are 2 other things I'd like to consider. #1) Changing every sample that uses shaders/texture-only.shader to use o3djs.material.createConstantMaterial or some variation. The problem with o3djs.material.createConstantMaterial is it requires you pass it a texture if you want a constant textured material. All the samples create the material first, then later add the texture. So, I could add a new o3djs.material.createTextureOnlyMaterial. At the same time that would mean changing those samples from setting stuff on 'texSampler0' to 'emissive' #2) I'd like to change the shader builder so it stops adding "Sampler" to textured materials. As it is if the material uses a color it makes the param called "diffuse" but if it's a texture it makes it "diffuseSampler". That sucks because it means the code has to do crap like var param = material.getParam('diffuse'); if (param) { // it's a color } else { param = material.getParam('diffuseSampler'); if (param) { // it's a texture. } } If we stopped that silliness we could just do var param = material.getParam('diffuse'); if (param) { if (param.isA('o3d.ParamTexture')) { // it's textured. } else { // it's not. } } Unfortunately to fix this requires changing the o3dConverter as well since it uses those conventions. Should we do this? Review URL: http://codereview.chromium.org/182024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25015 0039d316-1c4b-4281-b951-d872f2087c98
* Update Texture::Lock to take an AccessMode.gman@google.com2009-09-0114-326/+395
| | | | | | | | | | | | | | | | | | Also, split Lock/Unlock into common and platform specific parts. This is needed to work around an apparent bug in mac drivers where glGetTexImage apparently doesn't always work. This doesn't solve the issue unless we disallow READ completely. Not sure what to about that except make a small GL sample and report the bug to Apple. Review URL: http://codereview.chromium.org/173640 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25012 0039d316-1c4b-4281-b951-d872f2087c98
* Switching DISPLAY_MODE_DEFAULT to create to a non-full-screen window at the ↵vangelis@google.com2009-08-311-7/+15
| | | | | | | | | | | current display resolution. This makes switching in and out of full screen smoother. A followup CL will allow the application code to specify the max backbuffer size to get cheaper (from the GPU/pixel shader perspective) full screen rendering. Review URL: http://codereview.chromium.org/177007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24940 0039d316-1c4b-4281-b951-d872f2087c98
* up cullingzsort stress test pdiff thresholdgman@google.com2009-08-311-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24926 0039d316-1c4b-4281-b951-d872f2087c98
* Prep for ascii only converter optiongman@google.com2009-08-313-5/+17
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24921 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for Canvas::DrawBitmap that I broke when addinggman@google.com2009-08-311-1/+1
| | | | | | | | adding pitch to Texture2D::Lock Review URL: http://codereview.chromium.org/177029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24907 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for archive request. It turns out this thinggman@google.com2009-08-316-36/+54
| | | | | | | | | | | | | | can be called recursively. Because of that ArchiveRequest::raw_data_ would be invalid when the outer call came back. This way we mostly don't use that field. Also updated the docs so it can me marked as deprecated. Review URL: http://codereview.chromium.org/173620 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24906 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for mac setRect?gman@google.com2009-08-291-0/+4
| | | | | | Review URL: http://codereview.chromium.org/180030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24849 0039d316-1c4b-4281-b951-d872f2087c98
* Fix syntax accessing enum scoped to class, to fix GCC builds.maf@google.com2009-08-281-1/+1
| | | | | | Review URL: http://codereview.chromium.org/183007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24832 0039d316-1c4b-4281-b951-d872f2087c98
* Adding in render surfaces for command buffers. Fixing SetRect as well.rlp@google.com2009-08-2821-501/+1820
| | | | | | Review URL: http://codereview.chromium.org/160401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24825 0039d316-1c4b-4281-b951-d872f2087c98
* increase threshold setting for culling testsgman@google.com2009-08-281-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24815 0039d316-1c4b-4281-b951-d872f2087c98
* Adding back in breakpad upload.bradnelson@google.com2009-08-282-0/+14
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/175016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24814 0039d316-1c4b-4281-b951-d872f2087c98
* Bump version to 0.1.42gman@google.com2009-08-282-2/+2
| | | | | | | | | | This is partly so video can distinguish between 0.1.41 which they pushed internally and 0.1.42 which will be our next push. Review URL: http://codereview.chromium.org/179015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24782 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes toDataURL for GL by making it all work throughgman@google.com2009-08-2822-380/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | O3D. What happens is client.toDataURL creates a RenderSurface and DepthSurface, sets those as the current Surface then renders. It then calls Surface::GetBitmap to get the pixels in the bitmap. The complications are 1) I needed to make Renderer::StartRendering / Renderer::FinishRendering be nestable because the Renderer::SetRenderSurface required StartRendering to already have been called. I didn't see a cleaner way to do this but I'm happy to change it if you have a better idea. 2) Since we can only create POT RenderSurfaces I added a clip_width / clip_height to render surfaces. Renderer::SetViewport uses these values so we end up rendering correctly to the top/left area of the POT render surface. 3) Doing it this way means that screenshots are NOT anti-aliased. I feel like that issue can be handled later. It's more important that toDataURL work now than it have the ultimate best results. (I hope). It probably means I'll need to create all new reference images. 4) I was wondering we we should expose SetClipWidth to JavaScript. Given that we require POT render surfaces they should always get the same results on all hardware. Or, rather, we could just allow the user to create NPOT RenderSurfaces. Under the hood they'd get a POT surface but the clip_width/clip_height would be set to the size the requested. There would have to be a note that texture wrapping only works if the size if POT. 5) I had to split FinishRendering into FinishRendering and Present since when taking a screenshot nothing will be drawn to the backbuffer and so I don't want a present to happen. Review URL: http://codereview.chromium.org/174594 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24781 0039d316-1c4b-4281-b951-d872f2087c98
* up the threshold for hellocube-texturegman@google.com2009-08-281-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24707 0039d316-1c4b-4281-b951-d872f2087c98
* Bump the revision number in DEPS so we get new pdiff.maf@google.com2009-08-271-1/+1
| | | | | | Review URL: http://codereview.chromium.org/177011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24687 0039d316-1c4b-4281-b951-d872f2087c98
* o3d plugin was mistakenly being built as a static library when built outside ↵bradnelson@google.com2009-08-271-10/+1
| | | | | | | | | | | | | | of chrome. This was preventing the installer from baking it in. BUG=None TEST=None TBR=gspencer Review URL: http://codereview.chromium.org/173591 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24666 0039d316-1c4b-4281-b951-d872f2087c98
* Move the build group addition out of the AddMacDebugSettings function.maf@google.com2009-08-271-3/+9
| | | | | | | | This was adding all Mac debug builds to the default build group, so we were trying to build the work-in-progress command buffer version and failing. Review URL: http://codereview.chromium.org/174628 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24665 0039d316-1c4b-4281-b951-d872f2087c98
* Fix code in effect_helper.cc that does not compile in GCC. maf@google.com2009-08-271-3/+6
| | | | | | Review URL: http://codereview.chromium.org/174597 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24639 0039d316-1c4b-4281-b951-d872f2087c98
* temp fix for bug with compressed texture clearinggman@google.com2009-08-271-19/+20
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24631 0039d316-1c4b-4281-b951-d872f2087c98
* Clear textures on creation for D3D because it gman@google.com2009-08-271-0/+41
| | | | | | | | does not Review URL: http://codereview.chromium.org/174530 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24603 0039d316-1c4b-4281-b951-d872f2087c98
* bug fixgman@google.com2009-08-271-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24592 0039d316-1c4b-4281-b951-d872f2087c98
* Security fix for DDS files.gman@google.com2009-08-271-0/+9
| | | | | | | | | This CL make it check that the mip_count in the file is a reasonable size. Review URL: http://codereview.chromium.org/174583 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24587 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a RENDER message to the O3D IMC.gman@google.com2009-08-264-0/+141
| | | | | | | | | | | | | | | | | Normally O3D renders as fast as it can but you can put O3D in a render-on-demand mode in which case it will only render when it has to, like when part of the window is uncovered, or when you explicit tell it. Asking it to render does not render immediately, it just marks the plugin in a state of "need to render". The plugin will render at the next available chance. Review URL: http://codereview.chromium.org/174465 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24531 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes for OSX float differences from Windows.gman@google.com2009-08-261-7/+21
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24515 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the build by fixing a typo in plugin.gypgspencer@google.com2009-08-261-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24481 0039d316-1c4b-4281-b951-d872f2087c98
* Changes needed to get everything packaged for Mac.maf@google.com2009-08-264-4/+44
| | | | | | Review URL: http://codereview.chromium.org/173453 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24478 0039d316-1c4b-4281-b951-d872f2087c98
* Created new build target for opengl command buffer service, fixed various ↵petersont@google.com2009-08-2622-131/+923
| | | | | | | | bugs in opengl command buffers service code until unit tests passed on windows. Review URL: http://codereview.chromium.org/165279 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24415 0039d316-1c4b-4281-b951-d872f2087c98
* Added a compiler flag to include precompile.h on command line in core on ↵petersont@google.com2009-08-261-0/+1
| | | | | | | | unix builds. Review URL: http://codereview.chromium.org/174485 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24389 0039d316-1c4b-4281-b951-d872f2087c98
* Moved include of precompiled header out of cc files in core to me more in ↵petersont@google.com2009-08-25104-118/+6
| | | | | | | | accordance with styleguide. Review URL: http://codereview.chromium.org/173327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24375 0039d316-1c4b-4281-b951-d872f2087c98
* Added GPU plugin object, an NPObject to which a plugin instance's NPP calls ↵apatrick@google.com2009-08-2522-354/+1183
| | | | | | | | | | | are forwarded. TEST=none BUG=none Review URL: http://codereview.chromium.org/173386 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24364 0039d316-1c4b-4281-b951-d872f2087c98
* fix commentgman@google.com2009-08-251-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24354 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for osx Lanzcos scale test.gman@google.com2009-08-251-1/+13
| | | | | | | Apparently it's off by like 1 bit. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24337 0039d316-1c4b-4281-b951-d872f2087c98
* This adds the gyp tools to the regular build so that the o3d-internal gyp buildgspencer@google.com2009-08-251-1/+4
| | | | | | | | doesn't cause the regular pulse builds to fail. Review URL: http://codereview.chromium.org/174445 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24312 0039d316-1c4b-4281-b951-d872f2087c98
* Add license information to our shell scripts.agl@chromium.org2009-08-252-0/+7
| | | | | | | | | | Downstream packagers are (rightly) careful about the license of code that they distribute and so we want to dot our i's. http://codereview.chromium.org/174372 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24311 0039d316-1c4b-4281-b951-d872f2087c98
* fix typogman@google.com2009-08-251-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24294 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing frameworks to plugin project. maf@google.com2009-08-253-1/+64
| | | | | | | | Adjust a lot of build voodoo to get things set correctly for a mach-o bundled plugin. Create scripts to install private frameworks and modify the plugin to use the private copies. Review URL: http://codereview.chromium.org/173329 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24291 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix a couple problems that Lintian reports for the .deb file:tschmelcher@google.com2009-08-258-41/+16
| | | | | | | | | | | - Eliminate useless call to ldconfig (see Debian bug #364436) - Eliminate spurious rpath. We were setting the rpath equal to the build output directory for libs, which is wrong. The rpath is the _run-time_ library search path for the resulting binary, i.e. the one used by ld.so at load time. Setting it equal to the path to build output on the build machine is nonsense. Also: - Use new-found knowledge of rpath to eliminate the need to symlink into /usr/lib(32) by instead setting rpath to /opt/google/o3d/lib and putting our three dependent libs there. Review URL: http://codereview.chromium.org/174369 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24250 0039d316-1c4b-4281-b951-d872f2087c98
* changes the js docs from js_0_1_ to js_1_0_gman@google.com2009-08-251-1/+1
| | | | | | Review URL: http://codereview.chromium.org/174401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24247 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup Renderer.gman@google.com2009-08-2525-381/+470
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I believe there were some mis-understandings about the code. It's supposed to work StartRendering(); BeginDraw(); EndDraw(); BeginDraw(); EndDraw(); BeginDraw(); EndDraw(); FinishRendering(); To try to enforce correct usage I separated some platform dependant stuff from shared stuff and added a few flags. Also in this CL I made Texture::GetRenderSurface not require a pack. This is so I because it feels cleaner that way but also because I wanted to use surfaces without a pack to take a screenshot. Finally I put some screenshot code in for GL. Also fixed some bugs with locking textures. 1) I thought it was x, y, width, height but it's actually x1, y1, x2, y2 2) I was using width in places I should have been using mip_width Review URL: http://codereview.chromium.org/174199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24188 0039d316-1c4b-4281-b951-d872f2087c98
* Added DispatchedNPObject.apatrick@google.com2009-08-2418-23/+1671
| | | | | | | | | | | | Automatically invokes member functions on C++ NPObjects for NPAPI methods. See comment in DispatchedNPObject. Utilities for invoking the methods of an NPAPI object using C++ typed arguments and return values. BUG=none TEST=none Review URL: http://codereview.chromium.org/173237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24177 0039d316-1c4b-4281-b951-d872f2087c98
* Make Mac also look for O3D_FORCE_SOFTWARE_RENDERERgman@google.com2009-08-245-10/+35
| | | | | | | | | | | | | | environment variable. In the Mac version, the place it's added lets one instance use the hardware renderer and another instance use the software renderer. The windows version does this as well. Review URL: http://codereview.chromium.org/173248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24127 0039d316-1c4b-4281-b951-d872f2087c98
* docs fixes for simple.jsgman@google.com2009-08-211-5/+12
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24018 0039d316-1c4b-4281-b951-d872f2087c98
* update deps to grab new pdiff and mac reference imagesgman@google.com2009-08-213-45/+322
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24014 0039d316-1c4b-4281-b951-d872f2087c98
* Make selenium pass in 1.0 for alphaThresholdgman@google.com2009-08-211-3/+12
| | | | | | | | | | It seems like short of writing a new diff program the original idea of multiplying the alpha in as RGB * (0.5 + alpha * 0.5) would give a better test. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24012 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the Windows backbuffer to RGBA mode.gman@google.com2009-08-213-89/+63
| | | | | | | | | | Note: This requires all new sample reference files which are in another CL and that requires a new pdiff which is in yet another CL Review URL: http://codereview.chromium.org/173182 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23983 0039d316-1c4b-4281-b951-d872f2087c98
* Add IO functions for Bitmap and change other utilitesgman@google.com2009-08-212-25/+142
| | | | | | | | | to use them. Review URL: http://codereview.chromium.org/174236 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23982 0039d316-1c4b-4281-b951-d872f2087c98
* Updates the bitmap and skinning samples and gets the gman@google.com2009-08-219-48/+64
| | | | | | | | latest reference images. Review URL: http://codereview.chromium.org/173183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23977 0039d316-1c4b-4281-b951-d872f2087c98