XYZ points in OpenGL

A DXF file is being read in with real world X,Y,Z coordinates. Is there a good tutorial on how to go between these values and the OpenGL coordinates and planes?

Many thanks in advance.

There is no such thing as ‘OpenGL coordinates’. You decide what 1 OpenGL unit shall be in your application. It is up to you if 1 OpenGL unit is 1 mm, 1 km or 1 parsec.
Any reason why you cannot use the DXF coordinates directly?

No, it’s just that the documentation I have come across uses glut or another library to do the transformation mapping. A commented example or tutorial of how to apply the vertex extents to the viewport was what I was looking for further documentation on.

I don’t understand what you means with “transformation mapping” as Satan say there is not openGL units, the only convention is that the “UP” direction is on the Y axis and the left hand rules is used, so your coordinates are something like this.


   /\Y
   |
   |_____>X
   /
  /
|/Z

Here you can find some better explanation about openGL coordinate convention (it don’t speak about units :stuck_out_tongue: )
http://www.falloutsoftware.com/tutorials/gl/gl0.htm

Transformation mapping is used in the context of transforming the XYZ coordinates so that they map into the display window.

glOrtho() is the function that sets the buffer up correctly. Setting the min & max for each direction to be larger than the largest XYZ allows the entities to be displayed. I was able to use the glRotate() OK, but am still having issues with the gluLookAt().

Thanks for the link as I had not run across it before.