Showing posts with label N9. Show all posts
Showing posts with label N9. Show all posts

Monday, November 28, 2011

Tree collision demo - getting the texture and color to N9

I didn't use textures from demo http://opengles20study.blogspot.com/2011/01/cel-shading-toon-shading-silhouette-how.html after porting to N9: http://opengles20study.blogspot.com/2011/08/meego.html
To get the textures work if using jpeg library (if not using iPhone SDK to generate images - code under #ifdef USE_IPHONE_SDK_JPEGLIB) it is needed to change m_pixelColorComponents from GL_RGBA to GL_RGB here.
It seemed like a good idea not to texture the tree, but to supply color via uniform value when rendering the  tree per instance. I plan to check how the tree looks with very few leaves and for that ngPlant leaves group probably would be better to use textures (billboards). For example about how to use uniform color value in shader, just grep the code for u_Color - there are several available.
This is how it looks on N9 - sorry for the poor video quality.


Saturday, August 6, 2011

Porting to Linux (MeeGo)

Video corresponds to the first version of Linux (EGL, XLib, OpenGL ES 2.0) port. N900 is used for the demo and I plan to provide comparable video on N9 later, after sales start.

Pushed the source code to branch portToMeego. It uses EGL and XLib to create window and initialize GL surface. Used Qt project files, and run the code from Qt Creator. Qt SDK 1.1.2 includes support for N9 (MeeGo Harmattan), MeeGo and N900.

There is a nice example on wiki.maemo.org demonstrating how to use EGL, XLib and OpenGL ES 2.0. To run it on MeeGo devices, you'll just need to remove N900 specific call to XChangeProperty with "_HILDON_NON_COMPOSITED_WINDOW".
Comparing to iOS's EAGLContext::presentRenderBuffer (example behind the link includes also initialization), with EGL swap renderbuffer using  eglSwapBuffers, like here.