Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Dec 15, 2024
1 parent b612e92 commit 0bb4f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rts/Rendering/Common/ModelDrawer.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CModelDrawerBase : public CModelDrawerConcept {
static bool CanDrawDeferred() { return modelDrawerState->CanDrawDeferred(); }
static bool SetTeamColor(int team, const float alpha = 1.0f) { return modelDrawerState->SetTeamColor(team, alpha); }
static void SetNanoColor(const float4& color) { modelDrawerState->SetNanoColor(color); }
static const ScopedTransformMemAlloc& GetMatricesMemAlloc(const ObjType* o) { return const_cast<const TDrawerData*>(modelDrawerData)->GetObjectTransformMemAlloc(o); }
static const ScopedTransformMemAlloc& GetTransformMemAlloc(const ObjType* o) { return const_cast<const TDrawerData*>(modelDrawerData)->GetObjectTransformMemAlloc(o); }
public:
virtual void Update() const = 0;
// Draw*
Expand Down
4 changes: 2 additions & 2 deletions rts/Rendering/ModelsDataUploader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ std::size_t TransformsUploader::GetElemOffsetImpl(const CUnit* unit) const
return TransformsMemStorage::INVALID_INDEX;
}

if (std::size_t offset = CUnitDrawer::GetMatricesMemAlloc(unit).GetOffset(false); offset != TransformsMemStorage::INVALID_INDEX) {
if (std::size_t offset = CUnitDrawer::GetTransformMemAlloc(unit).GetOffset(false); offset != TransformsMemStorage::INVALID_INDEX) {
return offset;
}

Expand All @@ -235,7 +235,7 @@ std::size_t TransformsUploader::GetElemOffsetImpl(const CFeature* feature) const
return TransformsMemStorage::INVALID_INDEX;
}

if (std::size_t offset = CFeatureDrawer::GetMatricesMemAlloc(feature).GetOffset(false); offset != TransformsMemStorage::INVALID_INDEX) {
if (std::size_t offset = CFeatureDrawer::GetTransformMemAlloc(feature).GetOffset(false); offset != TransformsMemStorage::INVALID_INDEX) {
return offset;
}

Expand Down

0 comments on commit 0bb4f3f

Please sign in to comment.