PDA

View Full Version : opengl draw lines doubt



franciscoBiaso
05-02-2015, 03:31 AM
Hello,

I was creating a rectangle and i saw that the left bottom corner does not had a filled pixel. To correct it i drawed a pixel with GL_POINTS on the left bottom corner. Why this corner didnt display that pixel? I am using opengl 3.3 core profile under windows 7 with glfw framework.

Image:
https://www.opengl.org/discussion_boards/attachment.php?attachmentid=1775&stc=1
Code:
http://pastebin.com/szPdu9mc


Thank you,
Francisco Neto

Yandersen
05-02-2015, 10:40 AM
Where one line ends another should start. Do not start or end two lines at the same spot, I guess, and the extra pixel will not be needed - just reverse direction of some lines.

franciscoBiaso
05-02-2015, 12:37 PM
Thank you but didn't work!

Yandersen
05-03-2015, 07:51 AM
You are welcome, but it should. :)
Would you post a line-drawing part of code?

GClements
05-03-2015, 08:57 AM
I was creating a rectangle and i saw that the left bottom corner does not had a filled pixel.

Use GL_LINE_LOOP if the start and end points are the same.