Skip to content

Instantly share code, notes, and snippets.

@natxopedreira
natxopedreira / ofxGstreamer osx
Last active August 29, 2015 14:01
gstreamer on mac
ofxGstreamer
descargar addon
https://github.com/arturoc/ofxGStreamer
- http://mknod.jp/?cat=13
descargar e instalar
+ http://gstreamer.freedesktop.org/data/pkg/osx/1.2.2/gstreamer-1.0-1.2.2-universal.pkg
+ http://gstreamer.freedesktop.org/data/pkg/osx/1.0.8/gstreamer-1.0-1.0.8-universal.pkg
+ http://gstreamer.freedesktop.org/data/pkg/osx/1.2.1/gstreamer-1.0-1.2.1-universal-packages.dmg
@natxopedreira
natxopedreira / average color from ofPixels
Created May 16, 2014 09:11
average color from ofPixels
ofColor getAverageColor(const ofPixels & pix) {
int pixelSize = pix.size();
int r = 0, g = 0, b = 0;
for (int i=0; i<pixelSize; i++) {
ofColor c = pix[i];
r += (c >> 16) & 0xFF;
g += (c >> 8) & 0xFF;
cd /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns
sudo mv AppleUSBFTDI.kext AppleUSBFTDI.disabled
sudo touch /System/Library/Extensions
/// restart
-install driver
varying vec2 TexCoord;
void main(void)
{
TexCoord = gl_MultiTexCoord0.st;
gl_Position = ftransform();
}
///////
varying vec2 TexCoord;
#version 150
//precision mediump float;
uniform sampler2DRect tex0;
uniform sampler2DRect u_Texture2;
in vec2 v_TexCoordinate;
out vec4 fragColor;
#version 150
uniform mat4 projectionMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 modelViewProjectionMatrix;
in vec4 position;
in vec2 texcoord;
out vec2 v_TexCoordinate;
/*
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
void testApp::setup(){
ofBackground(0, 0, 0);
ofSetVerticalSync(true);
ofSetLogLevel(OF_LOG_VERBOSE);
ancho = 640;
alto = 480;
///// lo lleno al tuntun
for(int y = 0; y < alto ; y++){
for (int x=0; x<ancho; x++) {
@natxopedreira
natxopedreira / gist:8003749
Last active December 31, 2015 14:59
comando para usar serial con la raspuperry
stty raw crtscts -F /dev/ttyAMA0
http://smbjorklund.no/ssh-login-without-password-using-os-x