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?
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.
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?
I had thought I might do a thing like that, but I guess what threw me was that I could use units like .001 when assigning vertices and other glXXX3d() functions.
glEnable(GL_LINE_SMOOTH) was supposed to allow for a Line Width less than 1.0f, but when I tried the width, it seemed to fail.