fix transform commit shader

This commit is contained in:
2018-11-23 14:19:59 +01:00
parent 86656cc7e3
commit a124d19bdc
11 changed files with 90 additions and 29 deletions

View File

@@ -62,7 +62,7 @@ protected:
for (int i = 0; i < 4; i++)
{
float q = (d[i] + d[(i + 2) % 4]) / d[(i + 2) % 4];
v[i]->uvs = glm::vec2(v[i]->uvs) * q;
v[i]->uvs2 = v[i]->uvs = glm::vec2(v[i]->uvs) * q;
v[i]->pos.w = q;
}
}
@@ -78,8 +78,8 @@ public:
count[1] = 2;
ioff[0] = (GLvoid*)0;
ioff[1] = (GLvoid*)0;
vertices[0] = { { 0, 0, 0, 1 },{ 0, 0 } }; // A
vertices[1] = { { 0, 0, 0, 1 },{ 0, 1 } }; // B
vertices[0] = { { 0, 0, 0, 1 }, { 0, 0 }, { 0, 0 } }; // A
vertices[1] = { { 0, 0, 0, 1 }, { 0, 1 }, { 0, 1 } }; // B
return create_buffers(vertices, sizeof(vertices));
}
void update_vertices(const glm::vec4 data[2]);