Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am kneeko on github.
  • I am nicoprins (https://keybase.io/nicoprins) on keybase.
  • I have a public key ASDT9YzyU3krtmDn6IdBc5CNi5xovHS7M2_pPB3BnqtimAo

To claim this, I am signing this object:

@kneeko
kneeko / triangle-metal.c
Created January 20, 2018 02:25
Running out of resources when creating and destroying buffers with the Metal backend
//------------------------------------------------------------------------------
// triangle-metal.c
//------------------------------------------------------------------------------
#include "osxentry.h"
#include "sokol_gfx.h"
sg_pass_action pass_action = {0};
sg_draw_state draw_state = {0};
void init(const void* mtl_device) {
@kneeko
kneeko / atlas.lua
Created September 14, 2016 05:35
LÖVE exporter for TexturePacker
local quads = {}
{% for sprite in allSprites %}quads['{{ sprite.fullName }}'] = love.graphics.newQuad({{ sprite.frameRect.x }}, {{ sprite.frameRect.y }},{{ sprite.frameRect.width }}, {{ sprite.frameRect.height }},{{ texture.size.width }}, {{ texture.size.height }})
{% endfor %}
return quads
#import <GameKit/GameKit.h>
#import "GameCenterManager.h"
@interface GameKitHelper : NSObject <GameCenterManagerDelegate>
@property (nonatomic, readonly) UIViewController *window;
@property (nonatomic, readonly) UIViewController *topViewController;
@property (nonatomic, readonly) UIViewController *authenticationViewController;
+ (instancetype)sharedGameKitHelper;