summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 02:47:52 +0000
committerpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 02:47:52 +0000
commit7978508d53990b762518d993a1f42dbd3dfc429a (patch)
tree3ca60b437795532555867dd8be567458dc1c1245 /o3d
parentfc6fb7fbf9aca6b58f8c99a08a6c376b95bbc1a3 (diff)
downloadchromium_src-7978508d53990b762518d993a1f42dbd3dfc429a.zip
chromium_src-7978508d53990b762518d993a1f42dbd3dfc429a.tar.gz
chromium_src-7978508d53990b762518d993a1f42dbd3dfc429a.tar.bz2
Revert "linux: 64-bit"
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
Diffstat (limited to 'o3d')
-rw-r--r--o3d/DEPS4
-rw-r--r--o3d/build/common_global.gypi25
-rwxr-xr-xo3d/build/gyp_o3d2
-rw-r--r--o3d/build/libs.gyp48
-rw-r--r--o3d/core/cross/ddsurfacedesc.h2
-rw-r--r--o3d/core/cross/gl/effect_gl.cc3
-rw-r--r--o3d/core/cross/gl/renderer_gl.cc6
-rw-r--r--o3d/core/cross/gl/sampler_gl.cc3
-rw-r--r--o3d/core/cross/pointer_utils.h4
-rw-r--r--o3d/samples/samples_gen.py9
10 files changed, 28 insertions, 78 deletions
diff --git a/o3d/DEPS b/o3d/DEPS
index c4f7e29..6533d01 100644
--- a/o3d/DEPS
+++ b/o3d/DEPS
@@ -2,9 +2,9 @@ vars = {
"chromium_trunk": "http://src.chromium.org/svn/trunk",
"nixysa_rev": "56",
"chromium_rev": "28829",
- "o3d_code_rev": "166",
+ "o3d_code_rev": "161",
"skia_rev": "376",
- "gyp_rev": "742",
+ "gyp_rev": "725",
"gtest_rev": "329",
"gflags_rev": "30",
"breakpad_rev": "391",
diff --git a/o3d/build/common_global.gypi b/o3d/build/common_global.gypi
deleted file mode 100644
index e3b5429..0000000
--- a/o3d/build/common_global.gypi
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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.
-
-# This file contains flags that are specific to o3d, but affect the build as a
-# whole (e.g. build flags that change the ABI).
-# For example, on linux amd64, all the libraries that will be linked into the
-# plugin (skia, v8, ...) need to be compiled with -fPIC but we don't want to do
-# that generally in Chrome (so it can't be lumped into the top-level
-# build/common.gypi).
-{
- 'target_defaults': {
- 'conditions': [
- [ 'OS == "linux" and target_arch=="x64"', {
- 'cflags': [
- '-m64',
- '-fPIC',
- ],
- 'ldflags': [
- '-m64',
- ],
- }],
- ],
- },
-}
diff --git a/o3d/build/gyp_o3d b/o3d/build/gyp_o3d
index 229b4bc..598dd70 100755
--- a/o3d/build/gyp_o3d
+++ b/o3d/build/gyp_o3d
@@ -11,7 +11,6 @@ import os
import sys
chrome_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir, os.pardir)
-o3d_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir)
try:
import gyp
@@ -25,7 +24,6 @@ if __name__ == '__main__':
# Always include common.gypi
args += ['--depth', '.',
'-I', os.path.join(chrome_src, 'build', 'common.gypi'),
- '-I', os.path.join(o3d_src, 'build', 'common_global.gypi'),
'-D', 'mac_deployment_target=10.4']
# Off we go...
diff --git a/o3d/build/libs.gyp b/o3d/build/libs.gyp
index 0695316..122c6d6 100644
--- a/o3d/build/libs.gyp
+++ b/o3d/build/libs.gyp
@@ -27,9 +27,11 @@
'defines': [
'GL_GLEXT_PROTOTYPES',
],
- 'ldflags': [
- '-L<(PRODUCT_DIR)',
- ],
+ 'scons_variable_settings': {
+ 'LIBPATH': [
+ '../../<(glewdir)/lib',
+ ],
+ },
'libraries': [
'-lGL',
'-lGLEW',
@@ -80,9 +82,11 @@
[ 'OS=="linux"',
{
'all_dependent_settings': {
- 'ldflags': [
- '-L<(PRODUCT_DIR)',
- ],
+ 'scons_variable_settings': {
+ 'LIBPATH': [
+ '<(PRODUCT_DIR)',
+ ],
+ },
'libraries': [
"-lCg",
"-lCgGL",
@@ -121,21 +125,9 @@
[ 'OS=="linux"',
{
'destination': '<(PRODUCT_DIR)',
- 'conditions': [
- [ 'target_arch=="x64"',
- {
- 'variables': { 'libdir': 'lib64' }
- }, {
- 'variables': { 'libdir': 'lib' }
- }
- ],
- ],
'files': [
- '../../<(glewdir)/<(libdir)/libGLEW.so',
- '../../<(glewdir)/<(libdir)/libGLEW.so.1.5',
- '../../<(glewdir)/<(libdir)/libGLEW.so.1.5.1',
- "../../<(cgdir)/<(libdir)/libCg.so",
- "../../<(cgdir)/<(libdir)/libCgGL.so",
+ "../../<(cgdir)/lib/libCg.so",
+ "../../<(cgdir)/lib/libCgGL.so",
"../../<(cgdir)/bin/cgc",
],
},
@@ -162,22 +154,6 @@
],
],
},
- {
- 'conditions' : [
- [ 'OS=="linux"',
- {
- 'destination': '<(SHARED_LIB_DIR)',
- 'files': [
- '<(PRODUCT_DIR)/libGLEW.so',
- '<(PRODUCT_DIR)/libGLEW.so.1.5',
- '<(PRODUCT_DIR)/libGLEW.so.1.5.1',
- "<(PRODUCT_DIR)/libCg.so",
- "<(PRODUCT_DIR)/libCgGL.so",
- ],
- },
- ],
- ]
- }
],
},
],
diff --git a/o3d/core/cross/ddsurfacedesc.h b/o3d/core/cross/ddsurfacedesc.h
index adc8ffd..1742c16 100644
--- a/o3d/core/cross/ddsurfacedesc.h
+++ b/o3d/core/cross/ddsurfacedesc.h
@@ -210,7 +210,7 @@ struct DDSURFACEDESC2 {
};
DWORD dwAlphaBitDepth; // depth of alpha buffer requested
DWORD dwReserved; // reserved
- DWORD lpSurface; // pointer to the associated surface memory
+ LPVOID lpSurface; // pointer to the associated surface memory
union {
DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay
DWORD dwEmptyFaceColor; // color for empty cubemap faces
diff --git a/o3d/core/cross/gl/effect_gl.cc b/o3d/core/cross/gl/effect_gl.cc
index b8eabcc..4a61e37 100644
--- a/o3d/core/cross/gl/effect_gl.cc
+++ b/o3d/core/cross/gl/effect_gl.cc
@@ -561,8 +561,7 @@ void EffectGL::SetTexturesFromEffect(ParamCacheGL* param_cache_gl) {
if (param != NULL) {
Texture *t = param->value();
if (t) {
- GLuint handle = static_cast<GLuint>(reinterpret_cast<intptr_t>(
- t->GetTextureHandle()));
+ GLuint handle = reinterpret_cast<GLuint>(t->GetTextureHandle());
cgGLSetTextureParameter(cg_param, handle);
cgGLEnableTextureParameter(cg_param);
}
diff --git a/o3d/core/cross/gl/renderer_gl.cc b/o3d/core/cross/gl/renderer_gl.cc
index e4de52f..8568de1 100644
--- a/o3d/core/cross/gl/renderer_gl.cc
+++ b/o3d/core/cross/gl/renderer_gl.cc
@@ -202,21 +202,19 @@ bool InstallFramebufferObjects(const RenderSurface* surface,
const RenderSurfaceGL *gl_surface =
down_cast<const RenderSurfaceGL*>(surface);
Texture *texture = gl_surface->texture();
- GLuint handle = static_cast<GLuint>(reinterpret_cast<intptr_t>(
- texture->GetTextureHandle()));
if (texture->IsA(Texture2D::GetApparentClass())) {
::glFramebufferTexture2DEXT(
GL_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_2D,
- handle,
+ reinterpret_cast<GLuint>(texture->GetTextureHandle()),
gl_surface->mip_level());
} else if (texture->IsA(TextureCUBE::GetApparentClass())) {
::glFramebufferTexture2DEXT(
GL_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0_EXT,
gl_surface->cube_face(),
- handle,
+ reinterpret_cast<GLuint>(texture->GetTextureHandle()),
gl_surface->mip_level());
}
}
diff --git a/o3d/core/cross/gl/sampler_gl.cc b/o3d/core/cross/gl/sampler_gl.cc
index 0dc3ab7..5dacf0b 100644
--- a/o3d/core/cross/gl/sampler_gl.cc
+++ b/o3d/core/cross/gl/sampler_gl.cc
@@ -144,8 +144,7 @@ void SamplerGL::SetTextureAndStates(CGparameter cg_param) {
}
}
- GLuint handle = static_cast<GLuint>(reinterpret_cast<intptr_t>(
- texture_object->GetTextureHandle()));
+ GLuint handle = reinterpret_cast<GLuint>(texture_object->GetTextureHandle());
if (handle) {
cgGLSetTextureParameter(cg_param, handle);
cgGLEnableTextureParameter(cg_param);
diff --git a/o3d/core/cross/pointer_utils.h b/o3d/core/cross/pointer_utils.h
index e246deb..b16ed5c 100644
--- a/o3d/core/cross/pointer_utils.h
+++ b/o3d/core/cross/pointer_utils.h
@@ -41,14 +41,14 @@ namespace o3d {
// Adds an arbitrary byte offset to a typed pointer.
template <typename T>
-T AddPointerOffset(T pointer, int offset) {
+T AddPointerOffset(T pointer, unsigned offset) {
return reinterpret_cast<T>(
const_cast<uint8*>(reinterpret_cast<const uint8*>(pointer) + offset));
}
// Creates a typed pointer from a void pointer and an offset.
template <typename T>
-T PointerFromVoidPointer(const void* pointer, int offset) {
+T PointerFromVoidPointer(const void* pointer, unsigned offset) {
return reinterpret_cast<T>(
const_cast<uint8*>(reinterpret_cast<const uint8*>(pointer) + offset));
}
diff --git a/o3d/samples/samples_gen.py b/o3d/samples/samples_gen.py
index 94ca89d..cb999c1 100644
--- a/o3d/samples/samples_gen.py
+++ b/o3d/samples/samples_gen.py
@@ -99,7 +99,6 @@ for asset in assets:
output_file.write(" {\n")
output_file.write(" 'action_name': '%s',\n" % name)
output_file.write(" 'inputs': [\n")
- output_file.write(" '<(PRODUCT_DIR)/o3dConverter',\n")
output_file.write(" '../o3d_assets/samples/%s',\n" % asset['path'])
output_file.write(" ],\n")
output_file.write(" 'outputs': [\n")
@@ -113,10 +112,16 @@ for asset in assets:
output_file.write(" '../samples/%s',\n" % output)
output_file.write(" ],\n")
output_file.write(" 'action': [\n")
+ if sys.platform[:5] == 'linux':
+ output_file.write(" 'LD_LIBRARY_PATH=<(PRODUCT_DIR):"
+ ":<(PRODUCT_DIR)/lib"
+ ":../../<(glewdir)/lib"
+ ":../../<<(PRODUCT_DIR)/lib"
+ "',\n")
output_file.write(" '<(PRODUCT_DIR)/o3dConverter',\n")
output_file.write(" '--no-condition',\n")
output_file.write(" '--up-axis=%s',\n" % asset['up'])
- output_file.write(" '../o3d_assets/samples/%s',\n" % asset['path'])
+ output_file.write(" '<(_inputs)',\n")
output_file.write(" '<(_outputs)',\n")
output_file.write(" ],\n")
output_file.write(" },\n")