2011年5月30日 星期一

xcode precompiler header

In your xcode proj. You can see a other sources group. there is a xxx_Prefix.PCH. In this *.PCH, If you write the cpp code, you should add
#if defined __cplusplus
#include "MUtils.h"
#endif


Then the precompiler header function would be worked.

Reference:
http://www.facebook.com/note.php?note_id=220473491312585
http://forum.soft32.com/mac/Xcode-precompiled-header-files-problem-ftopict47632.html

2011年5月26日 星期四

Titanium Appcelerator vs. PhoneGap vs. Adobe Air

http://savagelook.com/blog/portfolio/appcelerator-vs-phonegap-vs-adobe-air

2011年5月23日 星期一

C++ template in Objective C++

Vector3D.h
template(class Type)
class cMVector3D
{
public:
    Type x;
    Type y;
    Type z;
   
public:
    //--------------------------------
    // @breif: Constructor
    //--------------------------------
    cMVector3D(): x(0), y(0), z(0) {};
   
    //--------------------------------
    // @breif: Destructor
    //--------------------------------
    ~cMVector3D() {};
};



main.mm   --- if your program is objective c  hybrid with c++, you need to rename your file ext. from *.m to *.mm.

#import "MVector3D.h"

int main(int argc, char *argv[]) {
   
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
   
    cMVector3D(float)  testV;   ~~~template success
          
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;


Reference:
http://hi.baidu.com/184367426/blog/item/4324263a5ac76e2f71cf6c7c.html

2011年5月19日 星期四

Google style guide

google-styleguide
http://code.google.com/p/google-styleguide/

2011年5月16日 星期一

OpenGL ES Programming Guide for iOS

Apple provides different implementations of OpenGL ES for different hardware platforms.
http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html#//apple_ref/doc/uid/TP40008793-CH106-SW1

PowerVR Series5 Graphics
http://www.imgtec.com/powervr/insider/docs/PowerVR%20Series5%20Graphics.SGX%20architecture%20guide%20for%20developers.1.0.8.External.pdf

Fractal Lab

Fractal Lab is a WebGL based web application for rendering 2D and 3D fractal in real-time
http://www.creativeapplications.net/webapp/fractal-lab-webapp/

Chrome web app and first web app

    Chrome web store let you can publish your app and charge it.

Overview: 
http://code.google.com/intl/zh-TW/chrome/webstore/docs/index.html#charging
Build option: 
http://code.google.com/intl/zh-TW/chrome/webstore/articles/launching.html
  • HTML5 - HTML5, CSS, JavaScript
  • Native Client - C/C++ code in the sandbox, with Native Client SDK
  • Adobe Flash - depend on flash plug-in
  • A mix - mix these technologies
The first web app:
  1. Make a manifest.json
      write ---
     {
      "name": "Ellison's WebApp",
      "description": "First App on the chrome web.",
      "version": "1.0",
      "app": {
        "urls": [
            "http://coderellison.blogspot.com/"
        ],
      "launch": {
        "web_url": "http://coderellison.blogspot.com/"
        }
      },
       "icons": {
         "128": "logo.png"
       }
    }
  2.  Prepare a icon---
  3. Put them into a folder --- ellison-app
  4. Upload to Chrome extension
  5. Or pack to ZIP, and upload it to web  https://chrome.google.com/webstore/developer/dashboard
    You need to pay $5 dollar first to publish your app.
  6. Finally, you can click your app in the chrome application


      Reference:
      http://www.itwriting.com/blog/3562-creating-a-chrome-web-application.html
      http://ohboard.com/blog/chrome-web-app-development-guide/