Commit 1f2e13b9 authored by Sabrina Templeton's avatar Sabrina Templeton
Browse files

found the bug

parent 45e47fd2
......@@ -180,8 +180,8 @@ void calc_poly(vec3 zi, vec3 zj, inout vec3[MAX_VERTS] curr_poly, inout int cspa
vec3 b0;
vec3 b1;// initialize b0 and b1
if (i == nspace-1){
b0 = curr_poly[nspace -1];
if (i == cspace-1){
b0 = curr_poly[cspace -1];
b1 = curr_poly[0];
}
else{
......@@ -243,7 +243,7 @@ main() {
// lookup the seed points, taking in glPrimitiveIDIn
vec3 p0 = vec3(texelFetch( seeds , gl_PrimitiveIDIn ).xy, 0);
//vec3 p1 = vec3(texelFetch( seeds , 0 ).xy, 0);
render_square(p0, .01);
render_square(p0, .03);
if (gl_PrimitiveIDIn == 0){ // this is for debugging purposes: REMOVE ONCE WE WANT TO EXPAND TO ACTUALLY COMPUTE FOR MORE THAN ONE SEED
// but also when we do that we will need to fix the nearest neighbors which right now are hardcoded in
//this is the initial poly
......@@ -277,7 +277,7 @@ main() {
//************************************************************************************************
// this will obviously change once we are actually fetching from the nearest neighbor instead of the seed
for (int i = 1; i < 3; i ++){//super hardcoded for now
for (int i = 1; i < 5; i ++){//super hardcoded for now
//works when i < 2 but not otherwise
vec3 nn0 = vec3(texelFetch( seeds, i).xy, 0);
......@@ -297,7 +297,7 @@ main() {
render_poly(curr_poly, p0, space);
//}
render_square(p0, .03);
}
......
......@@ -255,6 +255,7 @@ UT_TEST_CASE( test1 )
GL_CALL( glDrawArrays(GL_POINTS, 0 , 7 ) );
// swap buffers and wait for user input
glfwSwapBuffers(window);
glfwPollEvents();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment