Creating a Rounded Rectangle in OpenGL

OpenGL is an extremely low level language, and is more or less only capable of drawing triangles. This means that many of the basic shapes that developers are used to having available in a drawing API are not present and must be created from scratch. The below code demonstrates how to draw a rounded rectangle in OpenGL.

static const GLfloat roundRect[] = {

static const GLfloat vbox[] =
    0.0f, 0.0f,
    1.0f, 0.0f,
    0.0f, 1.0f,
    1.0f, 1.0f,

void render()
    glVertexPointer(2, GL_FLOAT, 0, vbox);
    glScalef(.75, .75, 1.0f);
    glVertexPointer(2, GL_FLOAT, 0, roundRect);
    glDrawArrays(GL_TRIANGLE_FAN, 0, 40);

Careful observation of the code (especially the line glDrawArrays(GL_TRIANGLE_FAN, 0, 40);) will point out that that technically OpenGL is once again just drawing a collection of 40 triangles in order to create the rounded rectangle shape.

Hockey Scores updated for 2014-2015 season

Z10The Hockey Scores app has been updated to version 3.2 for the new NHL season. This app supports all BlackBerry phones running OS 5.0 or higher, including all BlackBerry 10 phones.

About Hockey Scores

This application provides the day’s hockey scores is an intuitive and easy to use format. It also includes additional game statistics such as start times, goal scorers, shots on net, hits, faceoff percentage, team Corsi numbers, and lists out the goal scorers.

New in version 3.2

This update adds some features to the BlackBerry 10 app that adds support for the BlackBerry Passport, adds a swipe down menu, and optimizes the screen layout for some devices.

Links & Information

Looking at who is currently using the Porsche Design phones

With last Wednesday’s announcement of the Porsche Design P’9983 BlackBerry it may be a good idea to take a look at who is currently using the previous iterations of these high priced phones. Based on data collected by BlackBerry World for downloads of the popular game Pixelated, it was possible to identify the countries that the P’9981 and P’9982 are currently being used in.


As with most things BlackBerry, the greatest support comes from Canada, with the majority of users in North America. The following countries mostly confirm the stereotype of Porsche targeting oil rich nations such as Saudi Arabia and the United Arab Emirates. In fact anytime that Bahrain accounts for over two percent of the market, you can safely assume that oil money is a contributing factor.

App sales plummeting for the Nook

A little over two years ago when I first began selling Android apps, the Barnes and Noble Nook was a powerful player. While this store did not get the same attention as Google Play and Amazon’s App Store, for many months I had more sales through the Nook Bookstore then the other two combined. This came as a bit of a surprise, but has certainly not lasted.

Once accounting for over 70% of Android app sales for me, the number has been on a long term downward trajectory and has been below 10% for most of 2014. The below chart shows the percentage of Android sales of Ebscer apps through the Nook Bookstore.


A few factors have contributed to this. First, the Nook (while often updated) has not kept pace with the other tablets on the market. More importantly Barnes and Noble has mostly given up on their platform, choosing the bundle Google Play on some of their newer devices, and have recently just launched the confusingly named “Samsung Galaxy Tab 4 Nook” as they try to get out of the electronics business altogether.

However, if you are still interested in buying some apps for your Nook visit

BBOS distribution unchanged in August

While the market share of OS 7 is up 13.1 percentage points from August 2013, there has been little to no change in the mix of BBOS devices used last month.


This data was collected by BlackBerry World for downloads of the free BlackBerry strategy game Pixelated. Data shown on the chart is from the beginning of August 2013 through the end of August 2014, and does not include BlackBerry 10 or PlayBook devices.

Processing .html files as PHP

In the interest of having cleaner URLs (or simply to maintain existing links) it is often desirable for webpages to end in a .html extension even if they need to be processed as PHP. On Apache servers this is very straight forwards and you just add the following lines of code to your .htaccess file

AddType x-mapp-php5 .php .htm .html

On Windows servers this is slightly more complicated (as are most things). You need the following code in your web.config file and the value for the scriptProcessor is based on the install location of your php-cgi.exe file. Finding the location of this file can often be teased out by looking at the results from the phpinfo(); command.

<?xml version="1.0" encoding="UTF-8"?>
            <add name="PHP_via_FastCG1" path="*.htm" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP5.5\php-cgi.exe" resourceType="Either" />
            <add name="PHP_via_FastCG2" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP5.5\php-cgi.exe" resourceType="Either" />

BlackBerry 10 device useage

As BlackBerry prepares to launch the Passport, the majority of users are still using the original BlackBerry 10 device, the Z10. The data below represents the 19,238 users who downloaded the Stuff I Need app in the month of August.


All of these statistics are based off of the data collected by BlackBerry World for downloads of the free check-list app Stuff I Need (which is also available for Windows Phone and Android users).

BlackBerry 10 sees a slight increase in use of newer OS versions

After leveling off in July, August saw a good uptake of newer versions of the operating system. Last month 89.1% of Pixelated users were running the newest version of the OS. Meanwhile 93.7% of Stuff I Need users were running OS 10.2.1 on their phones.



This data was collected by BlackBerry World for downloads of the free strategy game Pixelated and the free checklist app Stuff I Need. Data shown on the chart is from the beginning of August 2013 through the end of August 2014.

New version of Pixelated Shapes

IMG_00000136Pixelated Shapes has been updated to version 1.3 for Android, BlackBerry, and Windows 8. This updated reduces the file size by 7% for the BlackBerry 10 version of the app, while also adding support for the BlackBerry Passport that is due to be released next month. Meanwhile the Windows 8 version of the app got updated in order to better support the variable sized side by side apps supported by Windows 8.1

About Pixelated Shapes

Pixelated Shapes is a twist on the classic version of Pixelated that replaces the familiar squares with triangles and hexagons. The object of the game is to get the screen a single color by slowly growing a blob out of the upper left hand corner by matching it to the colors of the surrounding shapes. This is done repeatedly until either the game is won, or you run out of moves. Under the default settings you must clear the screen in 29 moves or less in order to win. A one time in-app upgrade can allow you to adjust the difficult, switch color schemes, change to different game modes, and get an indicator giving you the number of remaining moves.

Links & Information


Morse Code app updated for BlackBerry Passport

Q10The BlackBerry 10 Morse Code app has been updated to version 2.2 in BlackBerry AppWorld. This new version of the app includes a number of optimizations and also adds support for the BlackBerry Passport.

About Morse Code

This app will take your text, and translate it back to you in Morse Code. Any text can simply be entered, and then by pressing the “Play Morse Code” button, can be turned into an audible Morse Code signal. The application also allows you to adjust the speed of the playback in words per minute in order to accommodate different skill levels.

Links & Information

App released for the Champlain Canal

IMG_20140817_233813A brand new app has just been released in order to help you navigate the Champlain Canal in upstate New York. The app can be download from BlackBerry World, Google Play, and the Amazon Appstore.

With apps having already been released for the Erie Canal, Cayuga-Seneca Canal, and Oswego Canal there are now apps available for navigating the whole New York State canal system. These apps give you the ability to see the locations of all locks and boat launches along the canals. Additionally the apps also contain a map view to give a visual representation to where everything is.

Links & Information


Stuff I Need checklist app updated

CampingListCropThe Stuff I Need check list app has been updated to version 2.5 for BlackBerry and Android. For BlackBerry 10 users the app makes a few visual tweaks, support for the BlackBerry Passport, and has also been optimized to give the app a 15% reduction in file size. For Android users the newest version of the app allows you to set a custom text size, which is a feature that was added to the BlackBerry version of the app last summer.

Amazon Appstore

The Android version of the app is also now available in the Amazon Appstore.

About Stuff I Need

Originally conceived as a grocery list app, this minimalistic checklist app can be used to keep track of the stuff you need to get, or the stuff that you need to do. New items can be added to list with the ‘Add’ button on the bottom of the screen. Items on the list can be edited (or deleted) by giving them a long press. Lists can be switched by pulling down on the tab at the top of the screen. This will expose a spinner that shows all of your current lists. New lists can be added by using the “+” button on the right side of the expanded tab. Making use of three or more lists requires the use on a one time in-app purchase. Lists are automatically deleted if you delete all items in a list and restart the app.

Links & Information


Creating new projects to optimize BlackBerry 10 apps

Since first releasing the BlackBerry 10 SDK in early 2012, BlackBerry has continued to work on improving their tools. I have recently discovered that significant optimizations are made in newly created Cascades projects. I am currently working on an update to my Stuff I Need app, and have been able to get a 17% reduction in the app’s file size simply by recreating the project from scratch in Momentics. In addition to the smaller install size, the app also appears to be launching quicker. This was done with no changes at all to my code. Using all of the same assets, qml, and c++ files, I created a new project, and then copied my existing files in. The new project contains a few changes to the .pro and the bar-descriptor.xml files, but the majority of the changes seem to be taking place behind the scenes. So for anyone that has been writing BlackBerry Cascades apps for a while now, it may be worth it to recreate your apps and get some free optimizations to your code.

Starbeams gets another 10 levels

Z10Starbeams has been updated to version 1.8 for BlackBerry 10 and Windows 8. This update adds an additional ten levels, and also adds support for the soon to be released BlackBerry Passport.

About Starbeams

The object of the game is to assign colors to each star in order to ensure that none of the stars are connected to another star of the same color. The game starts off easy, but quickly gets more complex, adding more colors and seven pointed stars that can not be changed.

Links & Information


Update released for the Rotary Phone App

Q10-3The Rotary Phone app has just been updated to version 1.1 in BlackBerry World. This app sends your phone back in time, and gives you a classic rotary interface from which to dial out numbers. There is even a setting that allows you to automatically dial out after seven or ten digits have been entered. The new version of the app has an install size that is 14% smaller, and also adds support for the soon to be released BlackBerry Passport.


Links & Information