summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
authorrlp@google.com <rlp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 18:42:32 +0000
committerrlp@google.com <rlp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 18:42:32 +0000
commitce42ccee72841c8a9ad975712c39e6ede84feb61 (patch)
treedbee7b83a94e092b101e964f975564fb9473e155 /o3d/core
parente06984d41804a00d62c0ea1f61f56733d9a095ab (diff)
downloadchromium_src-ce42ccee72841c8a9ad975712c39e6ede84feb61.zip
chromium_src-ce42ccee72841c8a9ad975712c39e6ede84feb61.tar.gz
chromium_src-ce42ccee72841c8a9ad975712c39e6ede84feb61.tar.bz2
Fixing unit_test bugs. One of hte fixes is for the texture param. This quiets the unit test, but has a todo under the actual code. To make all examples run, this should be completed, but if we're going ot eliminate the texture path in favor of the sampler path, then it doesn't make sense to fill this in if we'll delete it shortly.
Review URL: http://codereview.chromium.org/146133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core')
-rw-r--r--o3d/core/cross/buffer.cc7
-rw-r--r--o3d/core/cross/command_buffer/effect_cb.cc4
2 files changed, 8 insertions, 3 deletions
diff --git a/o3d/core/cross/buffer.cc b/o3d/core/cross/buffer.cc
index acb6b31..d467d987 100644
--- a/o3d/core/cross/buffer.cc
+++ b/o3d/core/cross/buffer.cc
@@ -199,7 +199,6 @@ bool Buffer::ReshuffleBuffer(unsigned int new_stride, Field* field_to_remove) {
}
}
}
-
// Copy the reorganized data into a new buffer.
{
ConcreteFree();
@@ -210,7 +209,11 @@ bool Buffer::ReshuffleBuffer(unsigned int new_stride, Field* field_to_remove) {
<< " for Buffer '" << name() << "'";
return false;
}
-
+ // stride_ must be set before GetData is called so that the proper size
+ // buffer is allocated. We also need to set it after this function is
+ // is completed (see CreateField, RemoveField) for when we create a new
+ // buffer with no fields yet.
+ stride_ = new_stride;
BufferLockHelper helper(this);
void* destination = helper.GetData(Buffer::WRITE_ONLY);
if (!destination) {
diff --git a/o3d/core/cross/command_buffer/effect_cb.cc b/o3d/core/cross/command_buffer/effect_cb.cc
index 7a5d11b..afa9e0f 100644
--- a/o3d/core/cross/command_buffer/effect_cb.cc
+++ b/o3d/core/cross/command_buffer/effect_cb.cc
@@ -166,6 +166,8 @@ static const ObjectBase::Class* CBTypeToParamType(
return ParamMatrix4::GetApparentClass();
case effect_param::SAMPLER:
return ParamSampler::GetApparentClass();
+ case effect_param::TEXTURE:
+ return ParamTexture::GetApparentClass();
default : {
DLOG(ERROR) << "Cannot convert command buffer type "
<< type
@@ -199,7 +201,7 @@ void EffectCB::GetParameterInfo(EffectParameterInfoArray *array) {
}
void EffectCB::GetStreamInfo(EffectStreamInfoArray *array) {
- // To be filled in
+ // TODO(rlp)
}
} // namespace o3d