[Ubuntu]

ISSUE: Nvidia display driver problem on a two graphics card PC.

[EE] No devices detected. No screen found.

SOLUTION:

lspci -v

Get PCI bus number for graphics cards, 1:0:0 and 6:0:0 for instance.

sudo vi /etc/X11/xorg.conf

Under section “Device”, add

BusID “PCI:1:0:0″

Restart X and everything works like a charm.

http://wiki.linuxquestions.org/wiki/Using_multiple_monitors

[CUDA]

ISSUE: “error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory”

SOLUTION:

sudo vim /etc/ld.so.conf

Add “/usr/local/cuda/lib”

Save and quit.

ld config -v | grep cuda

山寨的联通3G网卡,无型号,隆信通,在Ubuntu 11.10下使用:

lsusb信息如下:

Bus 003 Device 003: ID 05c6:6000 Qualcomm, Inc. Mass Storage Device.

使用如下命令切换到modem模式:

usb_modeswitch -v 05c6 -p 1000 -M 5553424312345678000000000000061b000000020000000000000000000000 -R 1
切换成功后可ls /dev/tty*看到ttyUSBx的设备。

打开网络配置用户名和密码都为any,pin码为1234,网络为3gnet,其余默认。

Tricks

1. Compile PTAM

1). Install TooN lib.

Download Toon.

->  cvs -z3 -d:pserver:anoncvs@cvs.savannah.nongnu.org:/cvsroot/toon co TooN

Make and install.

-> ./configure

-> make

-> make install

2). Install libcvd(32bit).

a) Download libcvd.

-> cvs -z3 -d:pserver:anoncvs@cvs.savannah.nongnu.org:/cvsroot/libcvd co libcvd

b) Edit cvd/gl_helpers.h. Use OpenGL/gl.h and OpenGL/glu.h.

c) Edit progs/calibrate.cxx. Replace GL_TEXTURE_RECTANGLE_NV with GL_TEXTURE_RECTANGLE_ARB.

d) Edit cvd_src/OSX/qtbuffer.cpp. Add #include <vector>

e) Create a new configure script configure_mac.sh:

#!/bin/bash

SDK="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
SDKLIB="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk"
export MACOSX_DEPLOYMENT_TARGET="10.5"

ARCH="-arch i386"

export CFLAGS="$ARCH $SDK -mmacosx-version-min=10.5 -I /usr/local/include"
export CXXFLAGS="$ARCH $SDK -mmacosx-version-min=10.5 -I /usr/local/include"
export CPPFLAGS="$ARCH $SDK -mmacosx-version-min=10.5 -I /usr/local/include"
export LDFLAGS="$ARCH $SDKLIB -mmacosx-version-min=10.5 -I /usr/local/include"

CC="/usr/bin/gcc-4.2"
CXX="/usr/bin/g++-4.2"
OBJC="/usr/bin/gcc-4.2"

./configure $1 $2 $3 $4 $5 $6 $7 $8 $9
f) Configure.
-> ./configure_mac.sh --without-ffmpeg --x-libraries=/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/ --x-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include

g)  Edit makefile.

Move all -L/opt/local/lib to the end of the argument list, giving priority to OSX10.5.sdk version of X11

h) Make and Install

-> make

-> install

3). Install gvars3

a) Download gvars3

-> cvs -z3 -d:pserver:anoncvs@cvs.savannah.nongnu.org:/cvsroot/libcvd co gvars3

b) Copy the previous configure_mac.sh.
-> sh configure_mac.sh --disable-widgets
-> make
-> make install

4). Compile PTAM

a) Copy /Build/OSX/Makefile and VideoSource_OSX.cc to source root directory.
b) Edit makefile. Compile 32bit.
-> CC = g++ -g -O3 -arch i386
-> make
-> make install

2. Compile PTAMM

a. Install lib3ds. Download the source. Copy configure_mac.sh. Do the same as above.

b. Copy PTAM/VideoSource_OSX.cc to PTAMM.

c. Copy PTAMM/Build/Linux/Makefile to PTAMM.

d. Edit VideoSource_OSX.cc. Add “namespace PTAMM{” after the includes and “}” at the end.

e. Edit makefile.

Change “LINKFLAGS = -L MY_CUSTOM_LINK_PATH -lGVars3 -lcvd $(3DSLIB)” => “LINKFLAGS = -framework OpenGL -framework VecLib -lGVars3 -lcvd $(3DSLIB)”.

Change “VIDEOSOURCE = VideoSource_Linux_DV.o” => “VIDEOSOURCE = VideoSource_OSX.o”

f. make and install.

Have fun:)

CODE

<Window x:Class=”WpfApplication1.MainWindow”
       xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation
       xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml
       x:Name=”Window”
       Title=”Path Opacity Mask Animation Demo”
       Width=”640″ Height=”480″ xmlns:System=”clr-namespace:System;assembly=mscorlib”>

       <Window.Resources>
              <Storyboard x:Key=”Timeline1″>
                     <DoubleAnimationUsingKeyFrames BeginTime=”00:00:00″ Storyboard.TargetName=”path1″      Storyboard.TargetProperty=”(Shape.StrokeDashOffset)”>
                           <SplineDoubleKeyFrame KeyTime=”00:00:01″ Value=”25″/>
                           <SplineDoubleKeyFrame KeyTime=”00:00:02″ Value=”0″/>
                     </DoubleAnimationUsingKeyFrames>
                     <DoubleAnimationUsingKeyFrames BeginTime=”00:00:00″ Storyboard.TargetName=”path2″  Storyboard.TargetProperty=”(Shape.StrokeDashOffset)”>
                           <SplineDoubleKeyFrame KeyTime=”00:00:03″ Value=”25″/>
                           <SplineDoubleKeyFrame KeyTime=”00:00:04″ Value=”0″/>
                     </DoubleAnimationUsingKeyFrames>
    </Storyboard>
       </Window.Resources>
       <Window.Triggers>
              <EventTrigger RoutedEvent=”FrameworkElement.Loaded”>
                     <BeginStoryboard Storyboard=”{StaticResource Timeline1}”/>
              </EventTrigger>
       </Window.Triggers>

       <Grid x:Name=”LayoutRoot”>
              <Image Source=”Hydrangeas.jpg” Stretch=”Fill”>
      <Image.OpacityMask>
    <VisualBrush>
             <VisualBrush.Visual>
               <Path x:Name=”path1″ Stretch=”Fill” Stroke=”#FF000000″ StrokeDashOffset=”1000″ StrokeEndLineCap=”Round” StrokeStartLineCap=”Round” StrokeThickness=”20″ HorizontalAlignment=”Left” Margin=”228,145.336,0,188.972″ Width=”71″ Data=”M294,171 C289,162 283,147 268,151 253,155 244,164.99992 244,177.00008 244,189.00024 284,196.00033 287,207.00047 290,218.00062 286,249.00103 259,250.00104 232,251.00105 235,225.00071 233,219.00063″ StrokeDashArray=”25 1000″/>
             </VisualBrush.Visual>
           </VisualBrush>
    </Image.OpacityMask>
     </Image>
    
    <Path x:Name=”path2″ Stretch=”Fill” Stroke=”#FF000000″ StrokeDashOffset=”1000″ StrokeEndLineCap=”Round” StrokeStartLineCap=”Round” StrokeThickness=”20″ HorizontalAlignment=”Left” Margin=”228,145.336,0,188.972″ Width=”71″ Data=”M294,171 C289,162 283,147 268,151 253,155 244,164.99992 244,177.00008 244,189.00024 284,196.00033 287,207.00047 290,218.00062 286,249.00103 259,250.00104 232,251.00105 235,225.00071 233,219.00063″ StrokeDashArray=”25 1000″/>
          
  </Grid>
</Window>


Here it goes. Build Unity 3D multitouch application on Windows 7 machines.

This video demonstrates an application built with Unity 3D with Windowns 7 multitouch input.

Thanks to Unity explosion framework Detonator. Nice work!

This is part of a tutorial in  the book “Unity Game Development Essentials”

Use mouse and keyboard to control walk through.

Up/W: Forward

Down/S: Backward

Left/A: Left

Right/D: Right

Mouse: Look around and turn the player

Unity 3D First Try