ThomasLengeling / KinectPV2

Kinect4W 2.0 library for Processing
MIT License
286 stars 105 forks source link

Issues with vertexAttribPointer() - none of the pointcloud examples are working #48

Closed paraclete-pizza closed 8 years ago

paraclete-pizza commented 8 years ago

Whenever I try to run any of the point cloud examples in the library, I get the following error:

The function "vertexAttribPointer()" expects parameters like: "vertexAttribPointer(int, int, int, boolean, int, int)"

Related to these lines of code:

  pgl.vertexAttribPointer(vertLoc, 3, PGL.FLOAT, false, 0, pointCloudBuffer);
  pgl.vertexAttribPointer(colorLoc, 3, PGL.FLOAT, false, 0, colorBuffer);

I've tried looking through the KinectPV2 Reference, but cannot find the functions involved, and am at a bit of a loss as to what to do.

paraclete-pizza commented 8 years ago

The issue seems to be with pointCloudBuffer and colorBuffer, neither of which are 'int' values.

I tried appending '.arrayOffset()' to the end of each, which should return an int, and (I thought) provide the 'offset' value vertexAttribPointer is looking for. However, while this allowed the program to compile, I got a runtime error:

unsuportedOperationException

ThomasLengeling commented 8 years ago

are you still having problems with the openGL examples?

paraclete-pizza commented 8 years ago

Since I updated from 0.7.5 to 0.7.7, the OpenGL point cloud examples both work fine!