Skip to content

Instantly share code, notes, and snippets.

@prife
prife / cmdbuild.sh
Created February 1, 2023 12:25 — forked from sinofool/cmdbuild.sh
A script to override xcode project configurations
#!/bin/bash
set -x
USAGE() {
cat << EOF
Usage: ${0##*/} <-i ident.p12> [-p password] <-m profile.mobileprovision> [-a com.example.app] [-n NewName] [-I Info.plist]
-i ident.p12 The signing identity file.
-p password The password of signing identity file.
-m profile.mobileprovision Signing provision profile
-a com.example.app Override CFBundleIdentifier
@prife
prife / hammerspoon.init.lua
Created January 21, 2017 06:36 — forked from rainyear/hammerspoon.init.lua
hammerspoon.init.lua
local hyper = {'shift', 'cmd'}
local hyper2 = {'ctrl', 'cmd'}
-- hyper + up maximize the current window
hs.hotkey.bind(hyper, 'up', function()
hs.grid.maximizeWindow()
end)
hs.hotkey.bind(hyper, "Left", function()
local win = hs.window.focusedWindow()
local f = win:frame()
1. The texture target needs to be GLES20.GL_TEXTURE_EXTERNAL_OES instead of GL_TEXTURE_2D, e.g. in the glBindTexture calls and glTexParameteri calls.
2. In the fragment shader define a requirement to use the extension:
#extension GL_OES_EGL_image_external : require
3. For the texture sampler used in the fragment shader, use samplerExternalOES instead of sampler2D.
Everything below here is all in the C code, no more Java.
4. In the C code, use glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, eglImage) to specify where the data is, instead of using glTexImage2D family of functions.