summaryrefslogtreecommitdiffstats
path: root/o3d/core
Commit message (Collapse)AuthorAgeFilesLines
* Rename all GLES2 classes from ___GL to ___GLES2gman@chromium.org2009-12-1723-724/+761
| | | | | | Review URL: http://codereview.chromium.org/500086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34801 0039d316-1c4b-4281-b951-d872f2087c98
* Step 1 in Adding GLES2 renderer to O3D.gman@google.com2009-12-1628-0/+6747
| | | | | | | | | | | | | | | | | | | | | This step does only copies the GL files to a GLES2 folder. It's still actually the GL renderer at this point but it's the smallest step for getting something that builds and a place to start working. The next step will be to rename all the classes from xxxGL to xxxGLES2 At some point CG will be removed as well One other thing slipped in there. A standalone build path to help generate a C++ only example of using O3D. It's currently only a placeholder. Review URL: http://codereview.chromium.org/500070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34744 0039d316-1c4b-4281-b951-d872f2087c98
* linux: enabling fontspiman@chromium.org2009-12-102-30/+4
| | | | | | | | 'Cause, guess what, they work now. Review URL: http://codereview.chromium.org/492001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34274 0039d316-1c4b-4281-b951-d872f2087c98
* Check that texture being bound is not the currentgman@chromium.org2009-12-082-0/+15
| | | | | | | | render surface. Review URL: http://codereview.chromium.org/469011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34033 0039d316-1c4b-4281-b951-d872f2087c98
* Deleted gpu process and command buffer code from O3D tree. Now resides in ↵apatrick@google.com2009-11-2522-4537/+0
| | | | | | | | Chrome tree at src/gpu. Review URL: http://codereview.chromium.org/442013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33115 0039d316-1c4b-4281-b951-d872f2087c98
* Removed O3D command buffer protocol code and O3D comand buffer configuration.apatrick@google.com2009-11-203-43/+0
| | | | | | Review URL: http://codereview.chromium.org/415004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32576 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed CommandBuffer to CommandBufferServer and extracted CommandBuffer ↵apatrick@google.com2009-11-164-56/+36
| | | | | | | | | | | | | interface. Moved np_utils classes into new np_utils namespace. Removed some of the command_buffer dependencies on NPAPI. CommandBuffer(Server) is no longer an NPObject. Review URL: http://codereview.chromium.org/387063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32119 0039d316-1c4b-4281-b951-d872f2087c98
* Missed some files that should have been in 31811.apatrick@google.com2009-11-121-141/+141
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31813 0039d316-1c4b-4281-b951-d872f2087c98
* Made all line endings consistently LF and added svn:eol-style=LF property to ↵apatrick@google.com2009-11-126-929/+929
| | | | | | | | | | | | | | | | | | | | | | | | | | files with these names / extensions. c cc h mm txt idl py js html css gyp gypi xml shader json htm README DEPS git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31811 0039d316-1c4b-4281-b951-d872f2087c98
* Recomitting 31676 with fix.apatrick@google.com2009-11-1120-48/+48
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31692 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 31676.apatrick@google.com2009-11-1120-48/+48
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31682 0039d316-1c4b-4281-b951-d872f2087c98
* Reorganized command buffer and GPU plugin code into following structure:apatrick@google.com2009-11-1120-48/+48
| | | | | | | | | | | | gpu/gpu.gyp gpu/command_buffer/... gpu/gpu_plugin/... gpu/np_utils/... And fixed up paths and header sentry macros. Also merged command_buffer.gyp into gpu.gyp. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31676 0039d316-1c4b-4281-b951-d872f2087c98
* linux: 64-bitpiman@google.com2009-11-115-7/+11
| | | | | | | | | | | This CL enables a 64-bit of linux. Set target_arch='x64' in the gyp defines to enable. - fixes a few 64-bit issues - fixes some linux build issues on scons vs make - add rules to build 64-bit version Review URL: http://codereview.chromium.org/371078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31642 0039d316-1c4b-4281-b951-d872f2087c98
* Moved platform specific out of platform directories. This is the Chrome ↵apatrick@google.com2009-11-1018-35/+35
| | | | | | | | convention. Review URL: http://codereview.chromium.org/372077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31570 0039d316-1c4b-4281-b951-d872f2087c98
* Switched from NPObject shared memory wrapper to Chrome shared memory in ↵apatrick@google.com2009-11-104-126/+96
| | | | | | | | | | | preparation for moving from NPAPI to Chrome IPC for synchronous messages. Started work on an O3D configuration that will use Pepper 3D to connect to a remote GPU plugin. This is not building yet. Updated to latest NPAPI from nixysa. Review URL: http://codereview.chromium.org/371074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31519 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "linux: 64-bit"piman@google.com2009-11-075-11/+7
| | | | | | | | This reverts svn://chrome-svn/chrome/trunk/src/o3d@31356 Review URL: http://codereview.chromium.org/372043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31364 0039d316-1c4b-4281-b951-d872f2087c98
* linux: 64-bitpiman@google.com2009-11-075-7/+11
| | | | | | | | | | | This CL enables a 64-bit of linux. Set target_arch='x64' in the gyp defines to enable. - fixes a few 64-bit issues - fixes some linux build issues on scons vs make - add rules to build 64-bit version Review URL: http://codereview.chromium.org/376010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31356 0039d316-1c4b-4281-b951-d872f2087c98
* Removed core\cross\packing.h. Using approach consistent with Chrome. #pragma ↵apatrick@google.com2009-11-062-70/+2
| | | | | | | | | | pack works in both MSVC and GCC. http://gcc.gnu.org/onlinedocs/gcc/Structure_002dPacking-Pragmas.html Review URL: http://codereview.chromium.org/373005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31262 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing line endings to LF so trybot works.apatrick@google.com2009-11-061-404/+404
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31185 0039d316-1c4b-4281-b951-d872f2087c98
* Moved command_buffer and gpu_plugin code out of o3d namespace.apatrick@google.com2009-11-051-6/+8
| | | | | | | | | Changed header guard macros in preparation for move to Chrome gpu directory. Added svn:eol LF property. Review URL: http://codereview.chromium.org/375004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31171 0039d316-1c4b-4281-b951-d872f2087c98
* GL fix. Code was DCHECKing valid conditions andgman@google.com2009-11-041-3/+10
| | | | | | | | therefore asserting in debug mode. Review URL: http://codereview.chromium.org/360033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31038 0039d316-1c4b-4281-b951-d872f2087c98
* This change kills the SCons build, since we have switched completelygspencer@google.com2009-11-021-209/+0
| | | | | | | | | over to GYP. It also copies the contents of DEPS_gyp to DEPS, and removes the DEPS_gyp file. Review URL: http://codereview.chromium.org/354011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30729 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for GL unit_tests.gman@google.com2009-10-291-1/+1
| | | | | | | | | | | | | | | | | | Apparently there are issues with making a window off screen. We were creating a 512/512 window -1000 pixels off the screen. This worked before but recently it stopped working on my (gman) machine. I checked by building the release build 0.1.42.3 and that version fails as well where as it used to work. I don't know what changed on my machine. Also added CS_OWNDC in several places. Review URL: http://codereview.chromium.org/339057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30413 0039d316-1c4b-4281-b951-d872f2087c98
* Adding the o3d-internal include path before the others so that if ↵vangelis@google.com2009-10-271-0/+3
| | | | | | | | | o3d-internal is there it will be picked up first. This is how scons was setup. This is important for initializing swiftshader. Review URL: http://codereview.chromium.org/331002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30235 0039d316-1c4b-4281-b951-d872f2087c98
* move all O3D specific command buffer stuff to command_buffer::o3dgman@google.com2009-10-269-85/+85
| | | | | | | | | namespace. That's so I can add command_buffer::xxx namespace for different command buffer. Review URL: http://codereview.chromium.org/332036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30118 0039d316-1c4b-4281-b951-d872f2087c98
* Trying to fix the build. gman taking over.apatrick@google.com2009-10-231-0/+2
| | | | | | Review URL: http://codereview.chromium.org/329002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29855 0039d316-1c4b-4281-b951-d872f2087c98
* Use scoped_array (not scoped_ptr) with new[].kuchhal@chromium.org2009-10-231-1/+1
| | | | | | | | | BUG=24266 TEST=No functional change so make sure nothing changes. Review URL: http://codereview.chromium.org/307045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29843 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to get renderer=cb cb_service=gl to compilegman@google.com2009-10-2224-76/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | again. I was working on spliting some of the command buffer code in preparation for GL command buffers so those changes are in there as well. I didn't realize the gl command buffers were broken. I'm planning on sharing some of the command buffer code and commands so I thought about making the command buffers into 2 parts. The first N (256?) commands are common commands. Noop, SetToken, Jump Gosub. Those will be handled by common code. After that come the O3D or GL command buffer commands. I'm not sure that's a good idea but there is a significant amount of code in managing tokens and parsing etc and it seems like it would be nice to share it until/if we delete the O3D command buffers. Note: You'll see that SetToken is hardcoded to 1. I plan to fix that in the next CL when I split the command into shared vs specific. Review URL: http://codereview.chromium.org/307043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29831 0039d316-1c4b-4281-b951-d872f2087c98
* Removed workaround for Chrome 1.0 from o3djs library.apatrick@google.com2009-10-197-15/+15
| | | | | | | | Fix big causing Canvas sample to crash. Review URL: http://codereview.chromium.org/303008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29477 0039d316-1c4b-4281-b951-d872f2087c98
* Changed O3D to use CommandBuffer in-process. Still not connecting to the GPU ↵apatrick@google.com2009-10-198-304/+342
| | | | | | | | | | | | | | | | | | | | | plugin. I removed all the NaCl dependencies. Synchronous messages are now sent by NPAPI. Removed BufferSyncInterface and replaced it with CommandBuffer. CommandBufferHelper now uses NPAPI. Changed some unsigned ints to int32s because NPAPI doesn't support unsigned int. There are now two subclasses of RendererCB. RendererCBLocal is for use with an in-process CommandBuffer. RendererCBRemote is for use with an out-of-process CommandBuffer. I'm going to rearrange the locations of the source files under gpu_plugin next. CommandBuffer and GPUProcessor probably belong in the command_buffer_service library now. np_utils and system_services should be standalone libraries. TEST=none BUG=none Review URL: http://codereview.chromium.org/266068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29429 0039d316-1c4b-4281-b951-d872f2087c98
* Missing file from last checkinggman@google.com2009-10-151-0/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29161 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clearing render targets in D3D if theregman@google.com2009-10-151-16/+24
| | | | | | | | | | | | | is no associated depth buffer. There's something I don't get here. I thought the dimensions of the depth-stencil and the render target had to match but apparently they don't? Review URL: http://codereview.chromium.org/270100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29084 0039d316-1c4b-4281-b951-d872f2087c98
* Add a DLOG error to the command buffer and removegman@google.com2009-10-121-0/+34
| | | | | | | | | | | | | | | | | a little of the macro magic. Also, fix the build. Renderer_cb was missing some functions. I seems like it would be really good if we could add something like this to the non-debug version because developers need an easy way to check for errors. Maybe these errors can go to the chrome error console or something, at least in chrome. Review URL: http://codereview.chromium.org/267061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28753 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for canvas.drawBitmapgman@google.com2009-10-121-1/+2
| | | | | | Review URL: http://codereview.chromium.org/269055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28741 0039d316-1c4b-4281-b951-d872f2087c98
* Fx a GCC GYP release build problem. GCC (in release mode) wants to see a ↵maf@google.com2009-10-061-4/+6
| | | | | | | | test for the same object being passed into the override on operator =. This causing a compiler warning when this got invoked via std::vector::push_back. Review URL: http://codereview.chromium.org/257068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28164 0039d316-1c4b-4281-b951-d872f2087c98
* Add comments setting emacs and vim tab width and expansion variables.sgk@google.com2009-10-061-0/+6
| | | | | | | | BUG=none TEST=successful builds Review URL: http://codereview.chromium.org/256059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28089 0039d316-1c4b-4281-b951-d872f2087c98
* This fixes the GL build so it works.gspencer@google.com2009-10-051-0/+3
| | | | | | | Just add "-Drenderer=gl" to the hooks args. Review URL: http://codereview.chromium.org/242145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28048 0039d316-1c4b-4281-b951-d872f2087c98
* Implement fullscreen on Linux. No "Press Esc" message yet though. Also it's ↵tschmelcher@google.com2009-10-013-17/+66
| | | | | | | | | | DISPLAY_MODE_DEFAULT only for now (mode switching is evil anyways ;) ). Small bit of code cleanup in renderer.h. TESTED=entered and exited fullscreen; tested leaving with Esc, Alt+F4, click on region, and right-click on taskbare -> Close; all with both Compiz on and off, on gHardy. Review URL: http://codereview.chromium.org/258004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27732 0039d316-1c4b-4281-b951-d872f2087c98
* Added 32-bit float textures to command buffers, also changed the ↵petersont@google.com2009-09-301-3/+7
| | | | | | | | texture::Format enum to be more like Texture::Format in o3d. Review URL: http://codereview.chromium.org/227011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27644 0039d316-1c4b-4281-b951-d872f2087c98
* Quick fix for skinning translation bug.gman@google.com2009-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We weren't binding the transform of the skin to the base so the transform was getting applied twice and also the math was wrong in skinning. This is the shortest change to make this work but it is arguably not the *correct* change. The correct change would be to make the import code create Skin separate from ParamArray and SkinEval so that you can use the same Skin data multiple times in the same scene. I don't know enough about collada to know if that's possible to setup in collada but the way the code is structured currently it seems to assume it is even though the code does support this correctly. That would take some work to fix and require samples and it seems unlikely people will run into that issue so this smaller fix seems good enough for now. Review URL: http://codereview.chromium.org/235046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27447 0039d316-1c4b-4281-b951-d872f2087c98
* More work in Command Buffersgman@google.com2009-09-2617-252/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I think/hope this is the last big CL for this. *) Moved GAPIInterface enums to cmd_buffer_format.h The reason is you should not have to include CODE to make data. The fact that the enums were in GAPIInterface, a class, meant you had to include code if you wanted to make a command buffer. *) Typed arguments where I could. So for example Draw takes PrimitiveType instead of uint32. CreateVertexBuffer takes a ResourceId *) Renamed enums etc to match style guide. *) Moved BitFields into specific commands *) renamed arguments from id to type_id. Review URL: http://codereview.chromium.org/234002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27322 0039d316-1c4b-4281-b951-d872f2087c98
* Added command buffer unit tests to gyp.apatrick@google.com2009-09-242-1/+11
| | | | | | | | | | | | | | | | | | | Can optionally override default renderer with environment variable. One of: GYP_DEFINES = "renderer=d3d9" GYP_DEFINES = "renderer=gl" GYP_DEFINES = "renderer=cb cb_service=d3d9" GYP_DEFINES = "renderer=cb cb_service=gl" Fixed some warnings. Works on windows with D3D9 but not GL, mac or linux yet. TEST=none BUG=none Review URL: http://codereview.chromium.org/208037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27125 0039d316-1c4b-4281-b951-d872f2087c98
* Change command buffer client code to use structures.gman@google.com2009-09-2311-368/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't update the big_test although I'm happy to do that in another CL. I changed the CB renderer code to use this. The only place I didn't is the state handling code. I'll consider changing that in another CL. I changed DoCommand so it gets passed the entire command data including the command itself where as it used to get passed the command buffer entry after the command. I wanted to put the commands into the structures as I think it makes them easier to use since they can then correctly set their header. I could have left DoCommand as is but there would have been a lot of funky pointer math and I thought this change made it cleaner. Some questions I had while doing this. There are a few places in the code that use unsigned int instead of uint32. It seems we should use uint32 because unsigned int is not guarnteed to be 32bits. So for example ResourceID is unsigned int right now. The CMD::Set/CMD::Init/CommandBufferHelper commands are currently fairly untyped. For example DESTROY_TEXTURE takes a uint32 id. Should it take a ResourceID instead? DRAW should maybe take an enum for primitive_type? If we decide to do that I'd like to do it in another CL. There's no checking for overflow. We could add a bunch of DCHECK like DCHECK_LE(width, 65536) or DCHECK_LE(semantic_index, 16). I'd like to do those in another CL as well as I think we need to discuss what commands we want to change. All the code is in .h files because we want all of this code to inline. Theoretically this should be just as efficient as poking values into arrays in the opt builds. Review URL: http://codereview.chromium.org/212018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26886 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrote full-screen support on Windows. O3D now always creates its ownkbr@google.com2009-09-176-82/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | window in which to render, rather than rendering into either the browser's window or a separate full-screen window. The O3D window is removed from the browser's hierarchy and made top-level in order to go to full-screen mode via Direct3D. This solves fundamental focus fighting problems seen on Windows Vista. This change allowed the event forwarding code in the plugin's window message loop to be deleted, but a new workaround for a flicker upon the first mouse click in O3D in Firefox was required. Split the Renderer's fullscreen API into GoFullscreen and CancelFullscreen to solve chicken-and-egg problems with coming out of full-screen mode. Changed how the plugin detects resize events. Rather than responding to WM_SIZE messages, NPP_SetWindow is now responsible for propagating resize events to the client. Changed the ActiveX host control to call NPP_SetWindow in response to SetObjectRects. Fixed RendererGL::IsCurrent() on non-Mac platforms. Removed the bogus current_renderer_ static variable. Tested the following scenarios in IE and Firefox on Windows: - Full-screen involving display mode change, Escape to exit. - Full-screen involving display mode change, Alt-Tab to exit. - Full-screen involving display mode change, Alt-F4 to exit. - Full-screen involving display mode change, timeout to exit. - Full-screen with no display mode change, Escape to exit. - Full-screen with no display mode change, Alt-Tab to exit. - Full-screen with no display mode change, Alt-F4 to exit. - Full-screen with no display mode change, timeout to exit. - Beach demo, particle demo, other tests. Tested the following scenarios on the Mac in Safari (for which the code path didn't change): - Full-screen, escape to exit. - Full-screen, Alt-Tab to exit. - Full-screen, timeout to exit. When http://crbug.com/21921 is fixed, full-screen mode will work on Windows Vista with Aero on in Chrome. Review URL: http://codereview.chromium.org/210005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26489 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing gclient dependencies to .gitignore.maruel@chromium.org2009-09-176-631/+631
| | | | | | | | | | | | | | Fix the format of many directories so they don't show up in git status anymore. Run dos2unix on *.cc, caught many inconsistent and CRLF files. TBR=evan TEST=still build, git status shows nothing BUG=none Review URL: http://codereview.chromium.org/211010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26441 0039d316-1c4b-4281-b951-d872f2087c98
* This updated the GYP deps file to the last known good revision of Chrome,gspencer@google.com2009-09-151-1/+1
| | | | | | | | and all the associated third party packages. Review URL: http://codereview.chromium.org/203077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26283 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/176026rlp@google.com2009-09-153-44/+194
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26273 0039d316-1c4b-4281-b951-d872f2087c98
* Made gyp file for command buffer libraries.apatrick@google.com2009-09-155-13/+58
| | | | | | | | | | | | | | Gyp build works on Windows. Mac and linux won't work yet. Fixed some warnings. Switched from dxerr.lib to dxerr9.lib. Implemented a Texture::SetRect case for DXT compressed textures. Fixed division by zero for zero stride vertex buffers. TEST=none BUG=none Review URL: http://codereview.chromium.org/200127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26271 0039d316-1c4b-4281-b951-d872f2087c98
* Guess at getting linux build to work.gman@google.com2009-09-102-15/+9
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25948 0039d316-1c4b-4281-b951-d872f2087c98
* missed onegman@google.com2009-09-091-0/+7
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25815 0039d316-1c4b-4281-b951-d872f2087c98