Finally fixing the issue where the bezier curve drawn while creating a link between two logic bricks doesn't match the mouse cursor location. The issue was the last line segment for the bezier curve was not getting drawn. This is why the error increased as the curve got longer.
This commit is contained in:
@@ -2319,7 +2319,7 @@ void ui_draw_link_bezier(const rcti *rect)
|
||||
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_FLOAT, 0, coord_array);
|
||||
glDrawArrays(GL_LINE_STRIP, 0, LINK_RESOL);
|
||||
glDrawArrays(GL_LINE_STRIP, 0, LINK_RESOL+1);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
Reference in New Issue
Block a user