It could have something to do with git. Moving the whole folder to a sub folder solves the problem.
https://stackoverflow.com/questions/12677093/invalid-project-description-when-importing-project-into-eclipse
Saturday, March 15, 2014
Wednesday, March 12, 2014
cocos2d-x with custom gl es 2.0 code
cocos2d-x is a great 2D engine. It is based on ES 2.0. cocos2d-x has its own 2D wrappers on top of ES 2.0 to make it across platform. As long as there is already an EGL context, it is possible to add your own opengl code, or even other 3D engine.
The straight forward way is to override the draw function of a layer class and attach it to the scene. Just put all your gl code into function draw, such as shaders, VBO, and so on. It works. I just tested with a simple triangle though. Howerver, there problem is that my layer overrides everything. The original sprites and fonts are all covered. This is not what I need. I plan to re-use those GUI on top of my own 3D layer.
There is also a post in their forum talking about embedding horde3d to cocos2d-x.
The straight forward way is to override the draw function of a layer class and attach it to the scene. Just put all your gl code into function draw, such as shaders, VBO, and so on. It works. I just tested with a simple triangle though. Howerver, there problem is that my layer overrides everything. The original sprites and fonts are all covered. This is not what I need. I plan to re-use those GUI on top of my own 3D layer.
There is also a post in their forum talking about embedding horde3d to cocos2d-x.
Monday, March 10, 2014
flann 1.8.4 fails on win x64
I tried all I could, but failed.
mingw-64bit, vs 2012, vs 2013, with/without CUDA. 1.8.4 release or latest git. All failed.
Maybe I have to roll back to 1.7 on windows.
mingw-64bit, vs 2012, vs 2013, with/without CUDA. 1.8.4 release or latest git. All failed.
Maybe I have to roll back to 1.7 on windows.
Saturday, March 8, 2014
run bat file in msys
I tried to run android.bat from the android-sdk for windows within msys shell. But the windows bat syntax is not working. I found a way after googleing. The following commands work.
cmd /c "your.bat [args,...]"
cmd /c "your.bat [args,...]"
cocos2d-x ant debug error
If I follow the cocos2d-x tutorial, I receive an error while doing ant debug to generate the apk.
Setting the android sdk dir fixes it.
ant debug -Dsdk.dir= %ANDROID_SDK_ROOT%
or
ant debug -Dsdk.dir= $ANDROID_SDK_ROOT
Setting the android sdk dir fixes it.
ant debug -Dsdk.dir= %ANDROID_SDK_ROOT%
or
ant debug -Dsdk.dir= $ANDROID_SDK_ROOT
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.
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.
Subscribe to:
Posts (Atom)