summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/core')
-rw-r--r--o3d/core/cross/gl/texture_gl.cc6
-rw-r--r--o3d/core/win/d3d9/texture_d3d9.cc6
2 files changed, 8 insertions, 4 deletions
diff --git a/o3d/core/cross/gl/texture_gl.cc b/o3d/core/cross/gl/texture_gl.cc
index 31bb464..65a832f 100644
--- a/o3d/core/cross/gl/texture_gl.cc
+++ b/o3d/core/cross/gl/texture_gl.cc
@@ -333,7 +333,8 @@ Texture2DGL* Texture2DGL::Create(ServiceLocator* service_locator,
// If the hardware does not support npot textures, allocate a 0-initialized
// mip-chain here for use during Texture2DGL::Lock.
if (resize_to_pot) {
- texture->backing_bitmap_->AllocateData();
+ texture->backing_bitmap_->Allocate(format, width, height, levels,
+ Bitmap::IMAGE);
texture->has_levels_ = (1 << levels) - 1;
}
CHECK_GL_ERROR();
@@ -667,7 +668,8 @@ TextureCUBEGL* TextureCUBEGL::Create(ServiceLocator* service_locator,
// mip-chain here for use during TextureCUBEGL::Lock.
if (resize_to_pot) {
for (int face = 0; face < static_cast<int>(NUMBER_OF_FACES); ++face) {
- texture->backing_bitmaps_[face]->AllocateData();
+ texture->backing_bitmaps_[face]->Allocate(
+ format, edge_length, edge_length, levels, Bitmap::IMAGE);
texture->has_levels_[face] = (1 << levels) - 1;
}
}
diff --git a/o3d/core/win/d3d9/texture_d3d9.cc b/o3d/core/win/d3d9/texture_d3d9.cc
index 13c3d3b..3707c42 100644
--- a/o3d/core/win/d3d9/texture_d3d9.cc
+++ b/o3d/core/win/d3d9/texture_d3d9.cc
@@ -391,7 +391,8 @@ Texture2DD3D9* Texture2DD3D9::Create(ServiceLocator* service_locator,
resize_to_pot,
enable_render_surfaces);
if (resize_to_pot) {
- texture->backing_bitmap_->AllocateData();
+ texture->backing_bitmap_->Allocate(format, width, height, levels,
+ Bitmap::IMAGE);
}
return texture;
@@ -714,7 +715,8 @@ TextureCUBED3D9* TextureCUBED3D9::Create(ServiceLocator* service_locator,
enable_render_surfaces);
if (resize_to_pot) {
for (int ii = 0; ii < static_cast<int>(NUMBER_OF_FACES); ++ii) {
- texture->backing_bitmaps_[ii]->AllocateData();
+ texture->backing_bitmaps_[ii]->Allocate(
+ format, edge_length, edge_length, levels, Bitmap::IMAGE);
}
}