mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 23:12:16 +02:00
adjusting page size but still seeing a perf drop
This commit is contained in:
parent
85b3b883f9
commit
215818e313
3 changed files with 5 additions and 5 deletions
|
@ -24,7 +24,7 @@ Material::Material() :
|
|||
{
|
||||
// created from nothing: create the Buffer to store the properties
|
||||
Schema schema;
|
||||
_schemaBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Schema), (const gpu::Byte*) &schema));
|
||||
_schemaBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Schema), (const gpu::Byte*) &schema, sizeof(Schema)));
|
||||
}
|
||||
|
||||
Material::Material(const Material& material) :
|
||||
|
@ -34,7 +34,7 @@ Material::Material(const Material& material) :
|
|||
{
|
||||
// copied: create the Buffer to store the properties, avoid holding a ref to the old Buffer
|
||||
Schema schema;
|
||||
_schemaBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Schema), (const gpu::Byte*) &schema));
|
||||
_schemaBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Schema), (const gpu::Byte*) &schema, sizeof(Schema)));
|
||||
_schemaBuffer.edit<Schema>() = material._schemaBuffer.get<Schema>();
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ Material& Material::operator= (const Material& material) {
|
|||
|
||||
// copied: create the Buffer to store the properties, avoid holding a ref to the old Buffer
|
||||
Schema schema;
|
||||
_schemaBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Schema), (const gpu::Byte*) &schema));
|
||||
_schemaBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Schema), (const gpu::Byte*) &schema, sizeof(Schema)));
|
||||
_schemaBuffer.edit<Schema>() = material._schemaBuffer.get<Schema>();
|
||||
|
||||
return (*this);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
LightingModel::LightingModel() {
|
||||
Parameters parameters;
|
||||
_parametersBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Parameters), (const gpu::Byte*) ¶meters));
|
||||
_parametersBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Parameters), (const gpu::Byte*) ¶meters, sizeof(Parameters)));
|
||||
}
|
||||
|
||||
void LightingModel::setUnlit(bool enable) {
|
||||
|
|
|
@ -1721,7 +1721,7 @@ void Model::initializeBlendshapes(const FBXMesh& mesh, int index) {
|
|||
// Mesh has blendshape, let s allocate the local buffer if not done yet
|
||||
if (_blendshapeBuffers.find(index) == _blendshapeBuffers.end()) {
|
||||
QVector<BlendshapeOffset> blendshapeOffset;
|
||||
blendshapeOffset.fill(BlendshapeOffset(), 3 * mesh.vertices.size());
|
||||
blendshapeOffset.fill(BlendshapeOffset(), mesh.vertices.size());
|
||||
const auto blendshapeOffsetsSize = blendshapeOffset.size() * sizeof(BlendshapeOffset);
|
||||
_blendshapeBuffers[index] = std::make_shared<gpu::Buffer>(blendshapeOffsetsSize, (const gpu::Byte*) blendshapeOffset.constData(), blendshapeOffsetsSize);
|
||||
_blendshapeOffsets[index] = blendshapeOffset;
|
||||
|
|
Loading…
Reference in a new issue