Wednesday, November 3, 2010

Teal Icosahedron: webOS PDK for Windows 7 and Visual Studio 2010

Starting with Windows 7 and Visual Studio 2010, go to the webOS PDK download page and get a copy of the SDK/PDK for 64-bit machines. The following steps can then get you to a rotating teal icosahedron.



1. open C:/Program Files(x86)/Palm/PDK/share/samples/simple/widows/simple.sln - allow the default conversion to 2010 project, this will create a backup of the original project.

2. instead of following the steps for earlier versions of Visual Studio, you will have to create create a project property sheet to provide path to lib & includes. This page has how to create a project property sheet and this page has how to edit one.

3. add pragma line at top of simple.cpp to link to win32 (or add it to the property sheet) or you'll get errors:

#pragma comment(lib, "ws2_32.lib")

4. Debug: start without debugging


5. should see sucessful build in Output panel rotating red icosahedron in SDL_app window.


6. to frost the cake, edit FragmentShader[] from:

lowp vec3 Color = vec3(1.0, 0.0, 0.0);

to:

lowp vec3 Color = vec3(0.20, 0.69, 0.66);


7. repeat step 5 and you should now have a rotating teal icosahedron.