Skip to content

Instantly share code, notes, and snippets.

@chinmaygarde
chinmaygarde / FlutterEmbedderGLFW.cc
Last active November 23, 2023 16:26
Flutter Embedder API Example (GLFW with OpenGL)
#include <assert.h>
#include <chrono>
#include <embedder.h>
#include <glfw3.h>
#include <iostream>
static_assert(FLUTTER_ENGINE_VERSION == 1, "");
static const size_t kInitialWindowWidth = 800;
@attilaz
attilaz / gist:d75fc7d4ab75388a42720f97a7075c81
Created November 26, 2016 18:45
metal transient object lifetime
From metal documentation:
"Command buffer and command encoder objects are transient and designed for a single use.
They are very inexpensive to allocate and deallocate, so their creation methods return autoreleased objects."
https://developer.apple.com/library/content/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/Cmd-Submiss/Cmd-Submiss.html
Autorelease example:
NSAutoreleasePool* autoreleasePool = [[NSAutoreleasePool alloc] init];
//c is an autoreleased object
@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 19, 2024 23:17
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@stollcri
stollcri / ReplayKitExample.m
Last active May 9, 2018 18:11
Created a "Single View Application" project and added ReplayKit code to the ViewController files
//
// ViewController.h
// ReplayKitExample
//
// Created by Christopher Stoll on 6/11/15.
// Copyright © 2015 Christopher Stoll. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <ReplayKit/ReplayKit.h>