summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
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