Texture on primitive_points not rendering

#1

Hi all!

I received some help from Roy, but I am still running into an issue with texturing my mesh. I have a contour, coming live from the Kinect, that I feed into a polyline, and from the polyline, I feed it into a mesh with its mode set to OF_PRIMITIVE_POINTS. I am trying to bind a texture to the mesh, although the texture is not showing up…

In my update() function, after I add the vertices from my polyline to my lineMesh, I have this piece of code to add the texture coordinates:

 for(auto & v: lineMesh.getVertices()){
        lineMesh.addTexCoord(texture.getTextureReference().getCoordFromPoint(v.x,v.y));
    }

Then in my draw() function, I bind and unbind the texture and I also call ofDisableArbTex(), in my setup.

I am unsure as to why my mesh is not getting textured, at this point. I do call glScalef(-1.5,1.5,1.5) and ofTranslate(-700, 0, 0) in my draw() function, but even when I removed those two, the texture is still not showing up…

Any pointers as to why my texture is not rendering? Am I setting the texture coordinates incorrectly?

Thank you guys so much. Y’all are awesome.

#2

Just to check expectations, you won’t see a full continuous texture image if you are using OF_PRIMITIVE_POINTS. Rather each point in your point cloud will take its color from the texture tex coordinate associated with the mesh point or mesh index.