summaryrefslogtreecommitdiffstats
path: root/o3d/core/cross
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/core/cross
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/core/cross')
-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
5 files changed, 7 insertions, 11 deletions
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));
}