I use OpenGL for drawing with mouse in view. Everythings looks OK, but when i draw mouse fast it does not draws in every pixel, there shows up some spacing. I add image link here. My current mouseDragged code is very simple:
- (void) mouseDragged:(NSEvent *)event
{
location = [self convertPoint: [event locationInWindow] fromView:self];
NSLog(@"current location (%g,%g)\n",location.y,location.x);
[self drawSomething];
}
Any solution for more correctly registering mouse location? Or maby some way to register currentMouseLocation and previousMouseLocation? Something like iOS function previousLocationInView:, so that i could tell OpenGL to draw line between every two points?
try this: