Improve Your Graphics Development Workflow With Pico Pixel SDK

Pico Pixel Client SDK

As a graphics developer you work with a raw data in the form of texture, 3D arrays, cubemaps or even surfaces rendered by a GPU. To view image data created by a program you have to write the data to the disk, choosing a file and pixel format that you can open with your favorite image viewer.

We think this process is complex, inefficient and unnecessarily puts a burden on your workflow. Instead, we think have a better way for exporting images out of a running C++ program and also that our method should be as easy as using printf to output text to a console.

With our C++ SDK, Pico Pixel is more than an image viewer. It becomes the second screen where your program sends raw image data and the dashboard you use to control that process. From Pico Pixel, you can even save your images to files if you want.

The SDK only leverages multi-threading and networking technology to be simple and unobtrusive to your program. And with Pico Pixel support of OpenGL and GPU pixel formats, there are no limits to the type and format of images you can export out of your program.

The SDK is open source under the MIT license. You can use it in anyway you like and propose patches if you want.

SDK Integration in your programs

The files

The SDK is provided as source code. Build your program with all the SDK's files.
Include PicoPixelClient.h in the files where you use the SDK's main class.

#include "PicoPixelClient.h"

Initialization

PicoPixelClient is the SDK main class. After you create an instance PicoPixelClient, you may initiate the network connection between Pico Pixel and your program.

PicoPixelClient pico_pixel_client("LocalDeformablePRT");
pico_pixel_client.StartConnection();

Using PicoPixelClient

PicoPixelClient let you create data markers to identify the places in your code where you export raw image data to Pico Pixel.
A data marker has a name and integer value counter. Each time a marker is used, the counter decrements its value by one.
Data markers are reflected in Pico Pixel's user interface. You may reload the counter of a data marker through the Pico Pixel user interface.

To export raw data to Pico Pixel, you need to four things:
  • A pointer to the image's raw data
  • A name for the image to be displayed in Pico Pixel UI
  • A marker whose counter value is greater than 0
  • The width, height and pixel format of the image

This is everything your program needs to communicate with Pico Pixel desktop application.

If a marker's counter value as reached zero, then calling PixelPrintf with that marker has no effect. The data will not be sent to Pico Pixel. This is a really useful feature as it prevent the code from needlessly sending the image data over the network.

int marker = pico_pixel_client.CreateMarker("Color Framebuffer", 0);
pico_pixel_client.SendMarkersToPicoPixel();
// The image is sent if and only if the marker's counter
// value is > 0.
// A marker's counter value is decremented by 1 each time the
// marker is used.
pico_pixel_client.PixelPrintf(
  marker,               // data marker
  "color-framebuffer",  // image name
  PicoPixelClient::PIXEL_FORMAT_BGR8,// image pixel data format
  400,                  // image width
  300,                  // image height
  1200,                 // image row pitch in bytes
  FALSE,                // set to TRUE if the data is in srgb
  FALSE,                // set to TRUE to rotate the image
  raw_data              // char* pointer to the image raw data
  );

Pico Pixel

Before Pico Pixel can receive your images, you must open its network connection. Simply click the connection button on the interface to start or stop the network server.


Data Markers User Interface

Once a connection betwee your client and Pico Pixel is made, the gave to your program when you created PicoPixelClient instance will show up on Pico Pixel UI. Click on it to reveal or hide the data markers panel.

The data markers panel is the dashboard to control when and how many times your program exports images to Pico Pixel.

When you synchronize a marker, the counter value you have set for that marker is sent back to the PicoPixelClient instance in your program. Whenever your program execution make a call to PrintPixel, the counter value of the marker used for that call is tested and if is is greater than 0, the image raw data is sent to pico Pixel.


Improve your workflow and become more productive

Pico Pixel SDK is really easy to use. It as never been that easy to print raw image data out of your programs, and Pico Pixel gives you a lot of flexibility to do so. Since Pico Pixel uses standard socket communication, your program may run on any machine and sends images to a remote Pico Pixel desktop application.

Pico Pixel SDK saves you time and is the great companion application in your development toolset.

We are excited about the possibilities of Pico Pixel and we think you will be as well. Drop us a line with your comments and suggestions about what we can do to make it work even better for you.