Friday, May 18, 2018

Qt Project to MakeFile








qmake -spec macx-g++ x.pro on Mac OS X to generate Makefile
qmake x.pro on linux to generate Makefile (default behaviour)
qmake -spec win32-g++ x.pro on Windows to generate Makefile

References:
[1] https://stackoverflow.com/questions/8571687/how-to-get-a-makefile-from-qmake

Wednesday, May 16, 2018

Fluid SImulaton Source codes


Compile OceanSurface under Ubuntu 16 [2]
* Install dependences
libglm-dev
libglfw3-dev
libsoil-dev

$g++ -o OceanSurface main.cpp wave.cpp Record.cpp -lGL -lglfw -lGLEW -lfftw3 -lfftw3f -lSOIL


Resources:
[1] splishsplash http://melhorum.blogspot.com.br/2018/05/compile-splishsplash.html
[2] https://github.com/JiashuoLi/OceanSurface
[3] https://ttnghia.github.io/



Sunday, May 06, 2018

Ubuntu 16 Setting Screen Samsung SyncMaster T240M



$cvt 1600 1000 #get right values for this resolution

$gtf 1600 1000 60 #alternative


# 1600x1000 59.87 Hz (CVT 1.60MA) hsync: 62.15 kHz; pclk: 132.25 MHz
Modeline "1600x1000_60.00" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync
 

$ sudo xrandr --newmode "1600x1000" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync  #define

$ sudo xrandr --addmode DVI-I-1 "1600x1000" #register on system


$ xrandr
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 16384 x 16384
DVI-I-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95 +
1600x1200 60.00
1280x1024 75.02 60.02
1280x960 60.00
1152x864 75.00
1024x768 75.08 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 60.00
720x400 70.08
1600x900 59.95*
1600x1000 59.87
DVI-I-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
1600x900_60.00 (0x58e) 118.250MHz -HSync +VSync
h: width 1600 start 1696 end 1856 total 2112 skew 0 clock 55.99KHz
v: height 900 start 903 end 908 total 934 clock 59.95Hz


* Set permanent settings using ~/.xprofile (for example)
$vi ~/.xprofile
#
xrandr --newmode "1600x1000" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync 
xrandr --addmode DVI-I-1 "1600x1000"



* Problem: After nvidia drivers installation this doesn't works (crap)



$xrandr --fb 1600x1000 #show
xrandr: specified screen 1900x1000 not large enough for output DVI-I-3 (1920x1200+0+0)
xrandr: Configure crtc 0 failed
X Error of failed request:  BadValue (integer parameter out of range for operation)

#or
X Error of failed request:  BadMatch (invalid parameter attributes)

$xrandr --output DVI-I-3 --scale 1x0.85  #this solve  after nvidia drivers installation



References:

http://ubuntuhandbook.org/index.php/2017/04/custom-screen-resolution-ubuntu-desktop/



Friday, May 04, 2018

ARM Virtual Machine resources



[1] https://www.red-lang.org/2012/03/setting-up-arm-virtual-machine.html

Nvidia and Opengl doesn't works


libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast


Prepare removing
  • sudo apt-get purge nvidia* #This will remove your current nVidia drivers
  • sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
  • sudo dpkg-reconfigure xserver-xorg #This should fix Xorg
  • sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf
After this reïnstall nVidia software
  • sudo apt-add-repository ppa:xorg-edgers/ppa #provides the necessary repository
  • sudo apt-get update
  • sudo apt-get install bumblebee-nvidia nvidia-319 nvidia-settings-319

Animation online

Sketch to animation [1] https://sketch.metademolab.com/ Animate avatar from audio recorded [1] https://new.express.adobe.com/tools/animate-f...