Changed provoking vertex.
This commit is contained in:
parent
8691d53b1a
commit
0fa249ca25
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
main.cpp
5
main.cpp
@ -36,7 +36,7 @@ int main() {
|
||||
// glfwSetCursorPosCallback(window, mouse_callback);
|
||||
|
||||
// Create Data
|
||||
unsigned int gridX = 20, gridY = 20;
|
||||
unsigned int gridX = 10, gridY = 3;
|
||||
float* tileCoords = makeGridPoints(gridX, gridY);
|
||||
unsigned int* tileIndices = makeGridIndex(gridX, gridY);
|
||||
|
||||
@ -62,11 +62,10 @@ int main() {
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, EBO);
|
||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, 6*(gridX-1)*(gridY-1)*sizeof(unsigned int), tileIndices, GL_STATIC_DRAW);
|
||||
|
||||
std::cout << "LOADED DATA\n";
|
||||
|
||||
myShader.use();
|
||||
glBindVertexArray(VAO);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
glProvokingVertex(GL_FIRST_VERTEX_CONVENTION);
|
||||
// Window loop
|
||||
while(!glfwWindowShouldClose(window)) {
|
||||
// Input checking
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user