Automatic Rendering function or library

Hi all,

Does anyone know of a function in OpenGL OR an library related to OpenGL that can automatically render an object given a set of points?

For example: When I read data from a text file that contains a set of vertices in a sequential order generated by a 3rd party software, I will have to store those data into an array which will be fed into the function that will automatically render the object.

This is the same as drawing an object in OpenGL, where you declare a set of vertices and then OpenGL would just connect them thus creating a polygon. I want to find a function out there or a library that would do this without me actually creating the vertices… The general idea is that the points would be generated by a 3rd party software and then when it is fed to the program the object would be rendered in OpengGL.

Thanks in advance.

Regards,

Generating faces from a set of points is not trivial, and is well outside the domain of OpenGL. There are a number of libraries and programs that will do this for you - have a search around for combinations of “point cloud”, “surface reconstruction” and “triangulation”.

Its depends on how the points are ordered. If they are unordered, then as Mikkel noted, its probably a point-cloud that will require surface-reconstruction before display. Have a look at QSplat. It should do that for you.

However, if the vertices have some order to them (like a height-field, range-map etc) then it should be trivial to construct a surface of connected triangles/faces from your set of points.

Without knowing more about the source data-set, im afrid we cannot really help.

Kind regards,
Fugi

Thank you for your kind replies. I will check out your advice:)