hello everybody…
when i need to draw line by one of line algorithms using glvertix3f , it seemed to be as number of points in a Straight line , but my problem is that there is many of free pixels appeared between each two adjacent point , So how can I exceed this problem and make each two adjacent points be Convergent , also the Straight line appear smooth ??
You might want to post an image if you can. In general consumer cards are not up to nice looking line drawing nowadays. You need a workstation card (more expensive) to do that, or you can draw chunky lines made out of triangles. There may be other techniques depending on what needs to be done.
EDITED: BTW you are not doing glBegin(GL_LINE…) ? That would be a problem if so.
Non of them … I need to apply the bresenham algorithm that calculate the pixels and draw it using glvertex3f command …
The idea that in 3D there is many of free pixels appear between any two adjacent points , how can i process it ??
for acknowledge while using the same algorithm in C++ the line appear smooth___________________________________[/QUOTE]
So you’re drawing the line using GL_POINTS? Why are you doing this? For educational purposes?
Does your algorithm handle the bresenham algorithm correctly in all 8 octants? If your algorithm doesn’t handle all octants correctly it’s possible to get gaps between the points generated.
If you’re drawing points with size > 1.0 + anti-aliasing is on, then perhaps that could cause problems too when drawing points that overlap.