Category Archives: Kobald

Small presentation of my cross-platform engine for mobile and desktop applications

I made small presentation about my cross-platform engine for mobile and desktop applications. Codename Kobald. Click on image to play it in new window (use arrows and space to move through):

Screenshot 2015-01-21 21.53.14

This is not-so-technical presentation and main info about engine will come later as separate post.

Stackblur – C++ multi-threaded version of fast blur algorithm

I found nice algorithm for blurring images – Stackblur by Mario Klingemann. It could do the job relatively fast and gives decent quality. You can check it here – web demonstration. As you can see it can be usable even in web projects.

stackblursample

As i wanted to include it to my cross-platform engine i found two c++ implementations: 

First is SSE friendly, second contains some division optimization via static tables. However, both are not using all cpu cores. I took second one as foundation for my implementation, as i expected my code to work on mobile devices with no SSE support. Single-core processing of 1920×1200 rgba image with 100 px radius took only 219 ms (Intel Q9550, Windows 7).

I improved stackblur code to multi-threaded version – on my quad-core cpu speed results as expected showed 4x improvement – 63ms for the same task. You can download the part my lib below and use it as a foundation to your needs.

Download multi-threaded 32bit-color (RGBA) version of StackBlur:  stackblur.cpp

I believe algorithm can be optimized even further – any suggestions are welcome.

Alive Numbers 2 – android release of my minimalistic live wallpaper with embedded widgets

Brand new version of live wallpaper –  Alive Numbers 2 for Android devices. Enjoy smooth OpenGl ES 2.0 animation of minimalistic animated background in couple with customisable embedded widgets. New version has adjustable color schemes and ability to hand-tune widget layout. You can choose from set of base animations and play with a lot of options for every widget.

Alive Numbers 2

It can be found by name ‘Alive numbers 2’ or here: https://play.google.com/store/apps/details?id=com.calibvr.minimal

This topic contains screens and details…

Continue reading

Perfomance of complex GL ES 2.0 shaders on mobile devices

There is very nice site http://glsl.heroku.com/, where you can find the gallery of complex GLSL shaders (from very simple gradients to very complex rendering systems). You can modify their code at real-time using provided editor:

heroku

Current implementation of WebGL is using GL ES 2.0 – the same as all mordern android / iOS phones/tablets. So i decided to test if i can use these shaders at mobile applications – and tested their performance on Sumsung Galaxy Note II. Of course i tested only relatively simple shaders expecting them to run slow…

Continue reading

Live Wallpaper under Android can be powered by my cross-platform engine now

After my recent modifications of android part of my cross-platform engine, it is possible to make application also run as android live background. I plan to implement the same feature as well for iOS 7, but a bit later. Here is working example (https://play.google.com/store/apps/details?id=com.calibvr.synctimer):

Synctimer as live background

Android live wallpaper is not a general Activity application – it is special WallpaperService. And you cant implement it in pure C++ using NativeActivity. All my core is cross-platform C++ so i implemented two-way communication between C++ and JAVA. From C++ NativeActivity you can call JAVA classes through JNI and from java service you can call native (c++) methods of engine core.

The tricky part that all this communication involves a lot of different threads. Wallpaper service has its own thread, but rendering should be performed in another one. My native C++ core is launched as third thread and spawns other async threads which could call some java methods. But i got through all this nightmare using mutexed queues of events. As result i got full functionality of my engine at the background of android launcher.

When i only started working with android i wrote small live wallpaper in pure java (with no OpenGL). Wasted only couple of evenings and even lost the source code. But recently i was surprised when discovered that it has more than 100.000 downloads (https://play.google.com/store/apps/details?id=back.livenumbers). It does not even work properly on my Note 2 now.

But the point is that now i have smooth OpenGl ES 2.0 animations/effects in couple with engine functionality. Probably, i will create couple of stylish backs fused with some in-code widgets (like battery indicator, weather forecast, clock, calendar date or something else) as implementation will be relatively easy now using my engine. Any suggestions on this matter are welcome.

Manual decoding of ICO file format – small c++ cross-platform decoder lib

This post is related to one simple task – decode ICO file format from C++ manually (I needed this for one of my projects where i wanted to display fav icons related to web sites and decoder has to be part of my cross-platform framework). As a result you can download small c++ code below (ico.cpp). The description of ICO format you can find here – http://www.daubnet.com/en/file-format-ico. Image data is stored uncompressed so we don’t need to implement some smart decompression algorithms – just read some headers, get data and apply bit mask to fill alpha channel.

icons

As solution i wanted a function like this:  

bool IcoDecoder::decode(unsigned charbuffer,///< input buffer data

    int size,///< size of buffer

    unsigned intwidth,///< output – width

    unsigned intheight,///< output – height

    std::vector<unsigned char>&image///< output – image data

) 

and this function should extract the largest possible image from multiresolution icon.

Continue reading

SyncTimer – stylish multiplatform timer with synchronization between devices

My newly developped cross-platform engine finally goes to markets. Current platfroms are iOS, Android and Windows desktop.

SyncTimer icon

Download stylish multiplatform timer with synchronization between devices. 
You can control your timer from your PC, your iPhone or iPad, your android tablet and more. 
And even get more fun sharing timer with your friends.

http://synctimer.calibvr.com/