From b04a424313a92a370993072db73e54e07e9cfa54 Mon Sep 17 00:00:00 2001 From: "fransiskusx@google.com" Date: Thu, 5 Aug 2010 00:21:07 +0000 Subject: Initial version rendering 2D path for O3D. This will eventually allow O3D apps to fall back to 2D logic on systems without (working) GPUs. Incorporated 2D library Cairo to O3D. Currently only support Linux and compiled when renderer = cairo. TEST= I compiled with renderer = cairo and it worked. Also I compiled with renderer = gl and it worked. BUG=none Review URL: http://codereview.chromium.org/2825074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55008 0039d316-1c4b-4281-b951-d872f2087c98 --- o3d/import/cross/collada_conditioner.cc | 4 ++++ o3d/import/import.gyp | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'o3d/import') diff --git a/o3d/import/cross/collada_conditioner.cc b/o3d/import/cross/collada_conditioner.cc index b5fef31..796c199 100644 --- a/o3d/import/cross/collada_conditioner.cc +++ b/o3d/import/cross/collada_conditioner.cc @@ -542,6 +542,7 @@ bool ColladaConditioner::CompileCg(const FilePath& filename, const String& shader_source, const String& vs_entry, const String& ps_entry) { +#if !defined(RENDERER_CAIRO) bool retval = false; String shader_source_cg = shader_source; shader_source_cg += @@ -574,5 +575,8 @@ bool ColladaConditioner::CompileCg(const FilePath& filename, } cgDestroyContext(context); return retval; +#else + return false; +#endif } } // namespace o3d diff --git a/o3d/import/import.gyp b/o3d/import/import.gyp index 9c43b72..08fb4da 100644 --- a/o3d/import/import.gyp +++ b/o3d/import/import.gyp @@ -29,7 +29,6 @@ '../../<(jpegdir)/libjpeg.gyp:libjpeg', '../../<(pngdir)/libpng.gyp:libpng', '../../<(zlibdir)/zlib.gyp:zlib', - '../build/libs.gyp:cg_libs', '../compiler/technique/technique.gyp:o3dTechnique', ], 'sources': [ @@ -50,6 +49,16 @@ 'cross/zip_archive.h', ], + 'conditions' :[ + ['renderer != "cairo"', + { + 'dependencies': [ + '../build/libs.gyp:cg_libs', + ], + }, + ], + ], + 'conditions' : [ ['OS == "win"', { -- cgit v1.1