This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int maxAASamplesConst; // gles2 img/apple/ext extensions all use different constants (facepalm) | |
int halfConst; // gles2 and gles3 have different constants for half float type | |
int texSRGBAConst; // gles2 (without 'internal format' ext) and gles3 have different constants for SRGB RGBA texture type | |
int texSRGBConst; // gles2 (without 'internal format' ext) and gles3 have different constants for SRGB RGB texture type | |
int etcFormatConst; // gles2/gles3 have different standard etc formats | |
bool isPvrGpu; | |
bool isMaliGpu; | |
bool isAdrenoGpu; | |
bool isTegraGpu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _SDL_opengl_load_h | |
#define _SDL_opengl_load_h | |
extern PFNGLBLENDCOLORPROC SDL_glBlendColor; | |
#define glBlendColor SDL_glBlendColor | |
extern PFNGLBLENDEQUATIONPROC SDL_glBlendEquation; | |
#define glBlendEquation SDL_glBlendEquation | |
extern PFNGLDRAWRANGEELEMENTSPROC SDL_glDrawRangeElements; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <intrin.h> // __rdtsc | |
#include <stdio.h> | |
typedef unsigned int uint; | |
typedef unsigned short uint16; | |
typedef unsigned long long uint64; | |
// ISPC functions: | |
extern "C" void half_to_float_test(const uint16 * vin, float * vout, int count); | |
extern "C" void half_to_float_test_fast(const uint16 * vin, float * vout, int count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// References | |
// | |
// [1] Sloan, P.-P., Luna, B., and Snyder, J. 2005. | |
// Local, deformable precomputedradiance transfer. | |
// ACM Trans. Graph. 24, 3, 1216–1223 | |
// | |
// [2] Stupid Spherical Harmonics (SH) Tricks | |
// Peter-Pike Sloan, Microsoft Corporation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 | |
redirect: https://observablehq.com/@mbostock/raster-reprojection-ii |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FileLoader } from './FileLoader'; | |
import { DataTexture } from '../textures/DataTexture'; | |
import { DefaultLoadingManager } from './LoadingManager'; | |
import { _Math } from '../math/Math'; | |
function IESLoader(manager) { | |
this.manager = (manager !== undefined) ? manager : DefaultLoadingManager; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void parse_expr(Value *dest); | |
Sym *parse_ident(void) { | |
if (tok != TOK_IDENT) { | |
error("Expected identifier"); | |
} | |
Sym *ident = tok_sym; | |
next(); | |
return ident; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <string.h> | |
#define streq(a, b) (!strcmp((a), (b))) | |
#ifndef __USE_GNU | |
#define __USE_GNU |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# THIS VERSION TAKES A WEBCAM PIC AND BLENDS IT WITH SCREENSHOT | |
### | |
### THIS IS MACOS VERSION, linux commands commented out below. | |
### | |
# *************************************** | |
# ******OMPD - One Minute Per Day - Voluntary Anthropology | |
# ******public timelapse wall | |
# need to install ffmpeg and imagemagick for this to work |
OlderNewer