Urgent glHelp( )!!

Hi all,

I am having trouble with glePolyCylinder.
glePolyCylinder (n, dpts,dcol,.006);
I am trying to replace GL_LINES with the poly extrusion to emulate a tool path with a radius of 6 thousandths. Here is were it gets a bit rediculas. I think I have to use a width of 1.0f or height, so that last parameter would have to be at least 1.0f.

What can be done to scale graphics with OpenGL to some real size…so that it is at least proportional?

SpaceGhost

Never used the gle stuff, but scale is all about how you define it. There’s nothing that says you need to have polys that are greater than 1. You could for instance, set an orhtographic projection where the left plane is -0.1, and the right plane is 0.1, and then draw a line from -0.004 to 0.004.

Obviously, as you use smaller numbers like this, you are more likely to run into rounding errors in floating point numbers, though. It might be better to multiply everything by 100, or some other multiple of 10.

Is there a polyline command, or something that is not part of gle32 that I do not know about? I just need some sort command I can use to generate a cylindrical path.

Thanks SG

-SG

GL_LINE_STRIP or GL_LINE_LOOP

Originally posted by shinpaughp:
GL_LINE_STRIP or GL_LINE_LOOP

Ok, great!
…and how do you suggest I show a line width of .006? would glLineWidth(.006)work?

Thanks Shin,
-SG

Scale up by a thousand! so you have line width of 6

First openGL size should be treated as relative size and scale.

If this is for a CAD program, you convert you exact measurements to relative for drawing to the screen.

X line maybe 0.006 thick, but since your monitor’s resolution will not let you draw a line that size you just draw the line relative to other lines.

So a 0.006 maybe 6 gl units in width and a 0.010 would be 10 gl units to show diffrence in size.

You just store in a seperate variable what each line real value is, when the user draws the line on the screen.

data example:

line // What we are drawing.
X1,Y1,Z1 //Starting point of line in real terms
X2,Y2,Z2 // Ending point of line in real terms.
0.006 // Real width of line.

Note when displaying the line, screen size will very based on zoom and scaling, but not the real size.

Hope this helps.

Originally posted by SpaceGhost:
[b] Ok, great!
…and how do you suggest I show a line width of .006? would glLineWidth(.006)work?

Thanks Shin,
-SG[/b]