Hello, Dear community! I have a group of pixels (x,y,z). My mission is to draw my texture on that pixels. As i understand for doing this i must use GL_Triangles, but at this moment i have only pixels that are not combined in triangles. What i need to do to complete my mission? Thank You.
Extracting surfaces from point clouds can be done with the “marching cubes” algorithm and variations of it.
AFAIK you can also have OpenGL texture GL_POINTS if you enable texturing and assign texture coordinates to each vertex - of course that will not fill the areas between points only the points themselves will have a colour based on the texture.
As i understand with “assign texture coordinates to each vertex” you mean:
glTexCoord2f (X, Y);
glVertex3f(X, Y, Z);
If not information is provided, you may implement Delauny triangulation to get triangles. Of course you may have to pick a starting point.