Skip to content
Snippets Groups Projects
Commit 606467d0 authored by Philip Trettner's avatar Philip Trettner
Browse files

made Cube compatible with path drawing

parent 7f0a909c
No related branches found
No related tags found
No related merge requests found
#pragma once
#include <glm/common.hpp>
#include <glm/geometric.hpp>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <glm/geometric.hpp>
#include <glm/common.hpp>
#include <glow/common/shared.hh>
#include <glow/objects/VertexArray.hh>
#include <glow/objects/ArrayBuffer.hh>
#include <glow/objects/ElementArrayBuffer.hh>
#include <glow/objects/VertexArray.hh>
namespace glow
{
......@@ -108,16 +108,16 @@ public:
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid - left - top) * .5f + .5f), n, left, {0, 0});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid - left + top) * .5f + .5f), n, left, {0, 1});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid + left - top) * .5f + .5f), n, left, {1, 0});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid + left + top) * .5f + .5f), n, left, {1, 1});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid + left - top) * .5f + .5f), n, left, {1, 0});
indices[ii++] = baseIndex + 0;
indices[ii++] = baseIndex + 1;
indices[ii++] = baseIndex + 2;
indices[ii++] = baseIndex + 3;
indices[ii++] = baseIndex + 1;
indices[ii++] = baseIndex + 3;
indices[ii++] = baseIndex + 2;
indices[ii++] = baseIndex + 3;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment