mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
Avoid pointers on temp var
This commit is contained in:
parent
79bcf95792
commit
612acbc6d5
1 changed files with 2 additions and 1 deletions
|
@ -188,9 +188,10 @@ void DrawBounds::run(const SceneContextPointer& sceneContext, const RenderContex
|
|||
float numItems = (float) items.size();
|
||||
float itemNum = 0.0f;
|
||||
for (const auto& item : items) {
|
||||
glm::vec4 color(glm::vec3(itemNum / numItems), 1.0f);
|
||||
batch._glUniform3fv(_cornerLocation, 1, (const float*)(&item.bound.getCorner()));
|
||||
batch._glUniform3fv(_scaleLocation, 1, (const float*)(&item.bound.getScale()));
|
||||
batch._glUniform4fv(_colorLocation, 1, (const float*)(&glm::vec4(glm::vec3(itemNum / numItems), 1.0f)));
|
||||
batch._glUniform4fv(_colorLocation, 1, (const float*)(&color));
|
||||
|
||||
static const int NUM_VERTICES_PER_CUBE = 24;
|
||||
batch.draw(gpu::LINES, NUM_VERTICES_PER_CUBE, 0);
|
||||
|
|
Loading…
Reference in a new issue