diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 20:50:58 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 20:50:58 +0000 |
commit | 3762aeb6b417e032ff7d97acaf02670fd2b83248 (patch) | |
tree | 036429340f2ee065c8e3b320d9bfe56947178f29 /o3d/standalone | |
parent | 3b18461e5a1e8e35b7e1a8d5c2e5b3bf08f2d63f (diff) | |
download | chromium_src-3762aeb6b417e032ff7d97acaf02670fd2b83248.zip chromium_src-3762aeb6b417e032ff7d97acaf02670fd2b83248.tar.gz chromium_src-3762aeb6b417e032ff7d97acaf02670fd2b83248.tar.bz2 |
Step 1 in Adding GLES2 renderer to O3D.
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
Diffstat (limited to 'o3d/standalone')
-rw-r--r-- | o3d/standalone/standalone.cc | 5 | ||||
-rw-r--r-- | o3d/standalone/standalone.gyp | 150 |
2 files changed, 155 insertions, 0 deletions
diff --git a/o3d/standalone/standalone.cc b/o3d/standalone/standalone.cc new file mode 100644 index 0000000..2b6fc72 --- /dev/null +++ b/o3d/standalone/standalone.cc @@ -0,0 +1,5 @@ +#include <stdio.h> + +int main(int argc, const char** argv) { + printf("Hello World\n"); +} diff --git a/o3d/standalone/standalone.gyp b/o3d/standalone/standalone.gyp new file mode 100644 index 0000000..3e0c61c --- /dev/null +++ b/o3d/standalone/standalone.gyp @@ -0,0 +1,150 @@ +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'chromium_code': 1, + }, + 'includes': [ + '../build/common.gypi', + ], + 'target_defaults': { + 'include_dirs': [ + '..', + '../..', + ], + # TODO(rlp): remove this after fixing signed / unsigned issues in + # command buffer code and tests. + 'target_conditions': [ + ['OS == "mac"', + { + 'xcode_settings': { + 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO' + }, + }, + ], + ], + }, + 'targets': [ + { + 'target_name': 'standalone', + 'type': 'executable', + 'dependencies': [ + '../../<(antlrdir)/antlr.gyp:antlr3c', + '../../<(fcolladadir)/fcollada.gyp:fcollada', + '../../<(jpegdir)/libjpeg.gyp:libjpeg', + '../../<(pngdir)/libpng.gyp:libpng', + '../../<(zlibdir)/zlib.gyp:zlib', + '../../base/base.gyp:base', + '../../skia/skia.gyp:skia', + '../../native_client/src/shared/imc/imc.gyp:google_nacl_imc', + '../compiler/technique/technique.gyp:o3dTechnique', + '../core/core.gyp:o3dCore', + '../core/core.gyp:o3dCorePlatform', + '../utils/utils.gyp:o3dUtils', + ], + 'sources': [ + 'standalone.cc', + ], + 'conditions' : [ + ['renderer == "gl"', + { + 'dependencies': [ + '../build/libs.gyp:cg_libs', + '../build/libs.gyp:gl_libs', + ], + }, + ], + ['renderer == "gles2"', + { + 'dependencies': [ + '../build/libs.gyp:cg_libs', + '../build/libs.gyp:gles2_libs', + ], + }, + ], + ['OS == "mac"', + { + 'include_dirs': [ + '../../third_party/glew/files/include', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/AGL.framework', + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/GLUT.framework', + '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', + '../../third_party/cg/files/mac/Cg.framework', + '../../third_party/glew/files/lib/libMacStaticGLEW.a', + ], + }, + }, + ], + ['OS == "win"', + { + 'msvs_settings': { + 'VCLinkerTool': { + 'AdditionalDependencies': [ + 'rpcrt4.lib', + '../../<(cgdir)/lib/cg.lib', + '../../<(cgdir)/lib/cgGL.lib', + ], + # Set /SUBSYSTEM:WINDOWS for unit_tests.exe, since + # it is a windows app. + 'SubSystem': '2', + # Don't optimize away unreferenced symbols when + # linking. If we didn't do this, then none of the + # tests would auto-register. + 'OptimizeReferences': '1', + }, + }, + # We switch it to console post-build so that we have a + # windows app that can output to the console and still + # open windows. + 'msvs_postbuild': + 'editbin /SUBSYSTEM:CONSOLE $(OutDir)/$(TargetFileName)', + }, + ], + ['OS == "win" and renderer == "d3d9"', + { + 'include_dirs': [ + '"$(DXSDK_DIR)/Include"', + ], + 'link_settings': { + 'libraries': [ + '"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"', + 'd3d9.lib', + '"$(DXSDK_DIR)/Lib/x86/DxErr.lib"', + ], + }, + }, + ], + ['OS == "win" and renderer == "gl"', + { + 'dependencies': [ + '../build/libs.gyp:gl_libs', + ], + }, + ], + ['OS == "win" and renderer == "gles2"', + { + 'dependencies': [ + '../build/libs.gyp:gles2_libs', + ], + }, + ], + ['OS == "linux"', + { + }, + ], + ], + }, + ], +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: |