Fix coloring issue.
This commit is contained in:
parent
442e5a12b2
commit
26d654cb61
@ -41,7 +41,7 @@ cube::cube() {
|
|||||||
&indices[0], GL_STATIC_DRAW);
|
&indices[0], GL_STATIC_DRAW);
|
||||||
|
|
||||||
srand(static_cast<unsigned int>(time(0)));
|
srand(static_cast<unsigned int>(time(0)));
|
||||||
for(size_t i = 0; i < vertices.size(); i += 3)
|
for(size_t i = 0; i < vertices.size(); ++i)
|
||||||
{
|
{
|
||||||
colors.push_back(static_cast<float>(rand()) /
|
colors.push_back(static_cast<float>(rand()) /
|
||||||
static_cast<float>(RAND_MAX));
|
static_cast<float>(RAND_MAX));
|
||||||
|
Loading…
Reference in New Issue
Block a user