Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ - (void) fuffrConnected

- (void) touchesBegan: (NSSet*)touches
{
//NSLog(@"@@@ touchesBegan: %i", (int)touches.count);

for (FFRTouch* touch in touches)
{
[self.touches addObject: touch];
Expand All @@ -272,11 +274,15 @@ - (void) touchesBegan: (NSSet*)touches

- (void) touchesMoved: (NSSet*)touches
{
//NSLog(@"@@@ touchesMoved: %i", (int)touches.count);

[self redrawView];
}

- (void) touchesEnded: (NSSet*)touches
{
//NSLog(@"@@@ touchesEnded: %i", (int)touches.count);

for (FFRTouch* touch in touches)
{
[self.touches removeObject: touch];
Expand Down Expand Up @@ -306,10 +312,21 @@ - (void)drawImageView
{
self.glView.clearsContextBeforeDrawing = NO;
}

[self.glView drawViewWithTouches:self.touches paintMode:self.paintModeOn dotColors:self.dotColors];

NSString* message = [NSString stringWithFormat: @"Number of touches: %lu", self.touches.count];
// Copying set to prevent exception:
// *** Terminating app due to uncaught exception 'NSGenericException',
// reason: '*** Collection <__NSSetM: 0x178054460> was mutated while
// being enumerated.'
// from occuring in EAGLView in method drawViewWithTouches in the for-loop.
[self.glView
drawViewWithTouches:[NSSet setWithSet:self.touches]
paintMode:self.paintModeOn
dotColors:self.dotColors];

NSString* message = [NSString
stringWithFormat: @"Number of touches: %lu FPS: %i",
self.touches.count,
self.glView.framesPerSecond];
[self showMessage: message];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Note that setting the view non-opaque will only work if the EAGL surface has an
GLuint depthRenderbuffer;
}

@property (nonatomic, assign) int framesPerSecond;

- (void)drawView;
- (void)drawViewWithTouches:(NSSet*)touches paintMode:(BOOL)paintMode dotColors:(NSMutableDictionary*)dotColors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ - (id)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame])
{
self.framesPerSecond = 0;

CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;

self.contentScaleFactor = [UIScreen mainScreen].scale;
Expand Down Expand Up @@ -189,6 +191,7 @@ - (void)drawViewWithTouches:(NSSet*)touches paintMode:(BOOL)paintModeOn dotColor
sFrameCountLastSecond = sFrameCount;
sFPS = fps;
NSLog(@"FPS: %i", fps);
self.framesPerSecond = fps;
}
fps = sFPS;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions FuffrLib/FuffrLib/FuffrLib-Prefix.pch

This file was deleted.

27 changes: 0 additions & 27 deletions FuffrLib/FuffrLib/Touch/FFRTracker.h

This file was deleted.

78 changes: 0 additions & 78 deletions FuffrLib/FuffrLib/Touch/FFRTrackingManager.h

This file was deleted.

Loading