Skip to content

Commit

Permalink
remove double binding changed callback in numeric binding instance
Browse files Browse the repository at this point in the history
  • Loading branch information
lshoek committed Nov 2, 2022
1 parent ef922fe commit d9fae45
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions modules/naprender/src/bufferbindinginstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ namespace nap

protected:
const ShaderVariableValueArrayDeclaration* mDeclaration;
BufferBindingChangedCallback mBindingChangedCallback;
};


Expand Down Expand Up @@ -298,7 +297,7 @@ namespace nap
* Updates thebuffer from a resource.
* @param resource resource to set buffer from.
*/
void setBuffer(const TypedBufferBindingNumeric<T>& resource) { BufferBindingInstance::mBuffer = resource.mBuffer.get(); }
void setBuffer(const TypedBufferBindingNumeric<T>& resource);

/**
* @return buffer
Expand Down Expand Up @@ -344,4 +343,12 @@ namespace nap
BufferBindingInstance::mBuffer = &buffer;
raiseChanged();
}

template<class T>
void TypedBufferBindingNumericInstance<T>::setBuffer(const TypedBufferBindingNumeric<T>& resource)
{
assert(resource.mBuffer.getSize() == mDeclaration->mSize);
BufferBindingInstance::mBuffer = resource.mBuffer.get();
raiseChanged();
}
}

0 comments on commit d9fae45

Please sign in to comment.