From 1f4dd6d26bc1a1548a270c0ad94b58321637e7a0 Mon Sep 17 00:00:00 2001 From: "piman@google.com" Date: Wed, 11 Nov 2009 01:59:36 +0000 Subject: 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/371078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31642 0039d316-1c4b-4281-b951-d872f2087c98 --- o3d/core/cross/ddsurfacedesc.h | 2 +- o3d/core/cross/gl/effect_gl.cc | 3 ++- o3d/core/cross/gl/renderer_gl.cc | 6 ++++-- o3d/core/cross/gl/sampler_gl.cc | 3 ++- o3d/core/cross/pointer_utils.h | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) (limited to 'o3d/core') 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(t->GetTextureHandle()); + GLuint handle = static_cast(reinterpret_cast( + 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(surface); Texture *texture = gl_surface->texture(); + GLuint handle = static_cast(reinterpret_cast( + texture->GetTextureHandle())); if (texture->IsA(Texture2D::GetApparentClass())) { ::glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, - reinterpret_cast(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(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(texture_object->GetTextureHandle()); + GLuint handle = static_cast(reinterpret_cast( + 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 -T AddPointerOffset(T pointer, unsigned offset) { +T AddPointerOffset(T pointer, int offset) { return reinterpret_cast( const_cast(reinterpret_cast(pointer) + offset)); } // Creates a typed pointer from a void pointer and an offset. template -T PointerFromVoidPointer(const void* pointer, unsigned offset) { +T PointerFromVoidPointer(const void* pointer, int offset) { return reinterpret_cast( const_cast(reinterpret_cast(pointer) + offset)); } -- cgit v1.1