Friday, February 14, 2014

Using chrome/firefox with nvidia gpu on optimus

"https://superuser.com/questions/645918/how-to-run-google-chrome-with-nvidia-card-optimus" gives the answser.


chrome disable nvidia gpu on optimus by default. The workaround in the post works for me too. Create hard links for browsers, and run it with nvidia by right clicking. At least I can see the it in the GPU monitor. It should work, as I tested it with webgl and saw the fps difference.


Here is the command for chrome.
C:\Program Files (x86)\Google\Chrome\Application>mklink /H gpu-chrome.exe chrome.exe
Hardlink created for gpu-chrome.exe <<===>> chrome.exe

This trick also works on firefox.

Thursday, February 6, 2014

android sdl static link

Follow the readme of android, it should work, but there is two tricks I have to mention.

1. You can put SDL folder anywhere but not in jni, otherwise you will get redefine error of NDK as "Trying to define local module".
2. You have to define main as "int main(int argc, char *argv[])".  "char **argv" will not work, and leads to undefined SDL_main linking error.