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
Index: src/osgUtil/SceneView.cpp | |
=================================================================== | |
--- src/osgUtil/SceneView.cpp (revision 13031) | |
+++ src/osgUtil/SceneView.cpp (working copy) | |
@@ -424,6 +424,11 @@ | |
osg::Uniform* uniform = _localStateSet->getOrCreateUniform("osg_ViewMatrixInverse",osg::Uniform::FLOAT_MAT4); | |
uniform->set(osg::Matrix::inverse(getViewMatrix())); | |
} | |
+ if( _activeUniforms && getCamera() && getCamera()->getViewport() ) { | |
+ osg::Uniform* uniform = _localStateSet->getOrCreateUniform("osg_Viewport",osg::Uniform::FLOAT_VEC2); |
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
#if opencv was installed through home-brew on mac | |
#sys.path.append('/usr/local/lib/python2.7/site-packages') | |
import cv2 | |
#open window "Window" | |
cam = cv2.VideoCapture(0) | |
while True: | |
img = cam.read()[1] | |
cv2.imshow("Window",img) |
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 struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): | |
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
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
// use with qmetaobject-newinstance.cpp | |
#include <iostream> | |
#include <QObject> | |
#include <QString> | |
#include <QVariantMap> | |
#include <QVariantList> | |
#include <QList> | |
#include <QVector> |
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
cmake_minimum_required(VERSION 2.8) | |
project(qpy) | |
#Qt | |
find_package(Qt4 REQUIRED QtCore) | |
include(${QT_USE_FILE}) | |
#Python | |
find_package(PythonLibs) | |
include_directories( ${PYTHON_INCLUDE_DIRS} ${QT_INCLUDES} ) |
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
#look for a tag... | |
exec_program( | |
"git" | |
${CMAKE_CURRENT_SOURCE_DIR} | |
ARGS "describe" | |
OUTPUT_VARIABLE GIT_TAG ) | |
#...if not found get the SHA1 hash instead | |
if( ${GIT_TAG} MATCHES "fatal:.*" ) | |
exec_program( |
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
TEST_DRIVER=$1 | |
TEST_DIR=$2 | |
PASSED=0 | |
FAILED=0 | |
if [ -z $TEST_DRIVER ] || [ -z $TEST_DIR ]; then | |
echo "Usage: $0 <test driver> <test directory>" | |
else | |
for f in $( ls $TEST_DIR/*.py ); do | |
TOTAL=$[TOTAL+1] | |
echo "__________________________________" |
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
emcc ../../Common/*.c MultiTexture.c -o mm.html -I ../../Common -lGLESv2 -lEGL -lm -lX11 --preload-file basemap.tga --preload-file lightmap.tga |
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/bash | |
#Original script: | |
#http://www.linuxjournal.com/content/grabbing-your-music-youtube-do-it-your-way | |
#modified to work with avconv | |
#Ubuntu >= 13.04: requires youtube-dl and the following packages: | |
#sudo apt-get install python-pip | |
#pip install youtube-dl | |
#sudo apt-get install libavcodec-extra-53 libav-tools | |
address=$1 | |
regex='v=(.*)' |
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
youtube-dl -x -o "$(youtube-dl --get-filename -o "%(title)s.%(ext)s" $VIDEO_URL)" $VIDEO_URL |
OlderNewer