View Full Version : Ratio -> inch to 3Dscreen
How to send data in inch towards instruction GLU ?
09-28-2001, 04:53 AM
You mean what units is opengl in? Whatever you want. So send your data in in inches and it will be shown in inches. If this is what you mean? It may not be represented in inches on the screen (as in if you were to measure it with a ruler across the screen) but that depends on your perspective setup etc..
09-28-2001, 05:44 PM
Its impossible due to different monitor sizes everyone has. I suppose if you only wanted to make it for personal reasons on only your monitor, you could indeed measure it, or guess and check.
In fact I shall like to initialize the perspective to send my coordinates in inch for example. Can you help me?
OpenGL doesn't deal with units. Whether you pass your values in inches or meters is irrelevant.
Consider this. I draw a line from (0,0) to (0,2), how long is that line? Two meters? Two cm? Or maybe two inches?
Now, say that I, in my head, think of 1 'unit' as one meter, that will make my line, in my head, two meters long, or 200 cm, or 79 inches (hope I got the conversion right).
To your problem, if you consider 1 'unit' as one inch, you don't have to do anything to convert your data into inches or any other unit. Just pass the numbers as they are.
If you want one inch of data to be one inch when rendered on the screen, you must know the physical size of the window (take a ruler and measure it on your monitor) and it's logical size (pixels). Don't ask me what to do when you have those values, cause I don't (know at the moment http://www.opengl.org/discussion_boards/ubb/biggrin.gif ).
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.