Skip to content

Instantly share code, notes, and snippets.

View Anteru's full-sized avatar

Matthäus G. Chajdas Anteru

View GitHub Profile
### Keybase proof
I hereby claim:
* I am anteru on github.
* I am anteru (https://keybase.io/anteru) on keybase.
* I have a public key whose fingerprint is 3F5A 1F1C A25A 839F E4DF 372C C7D8 9F4C C0D0 1974
To claim this, I am signing this object:
import sys
import re
import os
testCaseRegex = re.compile (r'TEST\s*\((\w+),\s*(\w+)\)')
expectRegex = re.compile (r'EXPECT_(\w+)\s*\((.*)\);')
assertRegex = re.compile (r'ASSERT_(\w+)\s*\((.*)\);')
leadingWhitespaceRegex = re.compile(r'^(\s*)')
module = "[unknown]"
@Anteru
Anteru / gist:8196972
Last active January 1, 2016 20:29
Swizzle texture access
// (Not tried) I would assume this gets ignored by OpenCL but it does affect OpenGL state.
// This affects how the shader reads from the texture, but doesn't change the format itself.
::glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED);
::glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_GREEN);
::glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_BLUE);
::glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA);