Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKraecker

Posted 24 October 2013 - 12:39 PM

Hey Mercury Filter,

 

first thing I see is:

you are using sizeof(verticies) and sizeof(elements) this returns the size of a pointer.

You should be using something like sizeof(float)*15 (15 Floats for verticies) and sizeof(float)*3 (3 Floats for elements)

 

You also can use a vector for this (i like doing that :D)

Which would result in something like that:

glBufferData(GL_ARRAY_BUFFER, sizeof(vertice_vector[0])*vertice_vector.size(), &vertice_vector[0], GL_STATIC_DRAW);


#1Kraecker

Posted 24 October 2013 - 12:36 PM

Hey Mercury Filter,

 

first thing I see is:

you are using sizeof(verticies) and sizeof(elements) this returns the size of a pointer.

You should be using something like sizeof(float)*15 (15 Floats for verticies) and sizeof(float)*3 (3 Floats for elements)


PARTNERS