Skip to content

Instantly share code, notes, and snippets.

View gashtio's full-sized avatar

Nikola Vasilev gashtio

View GitHub Profile
@gashtio
gashtio / facebook_makebutton.js
Created February 22, 2013 08:47
Displaying a button with a varying background image, depending on whether the user is logged in (in the Unity3D Facebook integration with Coherent UI sample)
var appID = '344764665598630';
var appURL = 'http://www.coherent-labs.com/sample.html';
if (window.location.hash.length == 0)
{
// Not logged in
$(function () {
var button = $('<div id="fbButton" class="fbLogoDisabled"></div>');
button.click(function () {
@gashtio
gashtio / d3d11device_vtableptrs.cpp
Created October 29, 2013 13:10
Getting the offsets of the IUnknown virtual functions for ID3D11Device.
#include <iostream>
#include <d3d11.h>
#pragma comment(lib, "d3d11.lib")
int main()
{
D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_0 };
ID3D11Device* device = nullptr;
ID3D11DeviceContext* context = nullptr;