diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 01:53:36 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 01:53:36 +0000 |
commit | daefca3e87d6d36f0e6a58e3b0ff60917f285acb (patch) | |
tree | bbb7a69c597c2d57b6427391ebbee4bf075c8025 /o3d/core | |
parent | 75f9c5ec2b230df2fae6dd6f372eb1eb8562ff01 (diff) | |
download | chromium_src-daefca3e87d6d36f0e6a58e3b0ff60917f285acb.zip chromium_src-daefca3e87d6d36f0e6a58e3b0ff60917f285acb.tar.gz chromium_src-daefca3e87d6d36f0e6a58e3b0ff60917f285acb.tar.bz2 |
linux: 64-bit
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
Diffstat (limited to 'o3d/core')
-rw-r--r-- | o3d/core/cross/ddsurfacedesc.h | 2 | ||||
-rw-r--r-- | o3d/core/cross/gl/effect_gl.cc | 3 | ||||
-rw-r--r-- | o3d/core/cross/gl/renderer_gl.cc | 6 | ||||
-rw-r--r-- | o3d/core/cross/gl/sampler_gl.cc | 3 | ||||
-rw-r--r-- | o3d/core/cross/pointer_utils.h | 4 |
5 files changed, 11 insertions, 7 deletions
diff --git a/o3d/core/cross/ddsurfacedesc.h b/o3d/core/cross/ddsurfacedesc.h index 1742c16..adc8ffd 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 - LPVOID lpSurface; // pointer to the associated surface memory + DWORD 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 4a61e37..b8eabcc 100644 --- a/o3d/core/cross/gl/effect_gl.cc +++ b/o3d/core/cross/gl/effect_gl.cc @@ -561,7 +561,8 @@ void EffectGL::SetTexturesFromEffect(ParamCacheGL* param_cache_gl) { if (param != NULL) { Texture *t = param->value(); if (t) { - GLuint handle = reinterpret_cast<GLuint>(t->GetTextureHandle()); + GLuint handle = static_cast<GLuint>(reinterpret_cast<intptr_t>( + 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 8568de1..e4de52f 100644 --- a/o3d/core/cross/gl/renderer_gl.cc +++ b/o3d/core/cross/gl/renderer_gl.cc @@ -202,19 +202,21 @@ 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, - reinterpret_cast<GLuint>(texture->GetTextureHandle()), + handle, gl_surface->mip_level()); } else if (texture->IsA(TextureCUBE::GetApparentClass())) { ::glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, gl_surface->cube_face(), - reinterpret_cast<GLuint>(texture->GetTextureHandle()), + handle, gl_surface->mip_level()); } } diff --git a/o3d/core/cross/gl/sampler_gl.cc b/o3d/core/cross/gl/sampler_gl.cc index 5dacf0b..0dc3ab7 100644 --- a/o3d/core/cross/gl/sampler_gl.cc +++ b/o3d/core/cross/gl/sampler_gl.cc @@ -144,7 +144,8 @@ void SamplerGL::SetTextureAndStates(CGparameter cg_param) { } } - GLuint handle = reinterpret_cast<GLuint>(texture_object->GetTextureHandle()); + GLuint handle = static_cast<GLuint>(reinterpret_cast<intptr_t>( + 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 b16ed5c..e246deb 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, unsigned offset) {
+T AddPointerOffset(T pointer, int 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, unsigned offset) {
+T PointerFromVoidPointer(const void* pointer, int offset) {
return reinterpret_cast<T>(
const_cast<uint8*>(reinterpret_cast<const uint8*>(pointer) + offset));
}
|