File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,8 @@ FastTMXLayer::~FastTMXLayer()
130130void FastTMXLayer::draw (Renderer *renderer, const Mat4& transform, uint32_t flags)
131131{
132132 updateTotalQuads ();
133-
134- bool isViewProjectionUpdated = true ;
135- auto visitingCamera = Camera::getVisitingCamera ();
136- auto defaultCamera = Camera::getDefaultCamera ();
137- if (visitingCamera == defaultCamera) {
138- isViewProjectionUpdated = visitingCamera->isViewProjectionUpdated ();
139- }
140133
141- if ( flags != 0 || _dirty || _quadsDirty || isViewProjectionUpdated )
134+ if ( flags != 0 || _dirty || _quadsDirty)
142135 {
143136 Size s = Director::getInstance ()->getVisibleSize ();
144137 const Vec2 &anchor = getAnchorPoint ();
@@ -284,7 +277,7 @@ void FastTMXLayer::updateIndexBuffer()
284277 if (!_indexBuffer)
285278 {
286279 auto device = backend::Device::getInstance ();
287- _indexBuffer = device->newBuffer (indexBufferSize, backend::BufferType::INDEX, backend::BufferUsage::STATIC );
280+ _indexBuffer = device->newBuffer (indexBufferSize, backend::BufferType::INDEX, backend::BufferUsage::DYNAMIC );
288281 }
289282 _indexBuffer->updateData (&_indices[0 ], indexBufferSize);
290283}
You can’t perform that action at this time.
0 commit comments