Exemple #1
0
void drawInfo()
{
	static int frame = 0;

#ifdef __ANDROID__	
	if (frame++ == 0)
#else
	if ((frame++ % 60) == 0)
#endif
		refreshLocalIPs();

    drawIP("V", 4, 2, 2);
    drawIP("I", 4, 2, 2+3+7);

	int x = 6;
	int y = 2+3+7+7;

	for (std::size_t i = 0; i < ips.size(); ++i)
	{
		if (ips[i] == "0.0.0.0")
			continue;
        drawIP(ips[i].c_str(), 4, x, y);
		y = y + 7;
	}
}
Exemple #2
0
void drawInfo()
{
	static int frame = 0;

#ifdef __ANDROID__	
	if (frame++ == 0)
#else
	if ((frame++ % 60) == 0)
#endif
		refreshLocalIPs();

    // set background color of opengl canvas to black and clear the buffer to render again
	ShaderEngine::Engine->clearColor(1,1,1,1);

    drawIP(GIDEROS_VERSION, 3, 2, 2);
    drawIP("I", 3, 2, 2+7+3+7+3+7+3);

	int x = 6;
    int y = 2+7+3+7+3+7+1;

	for (std::size_t i = 0; i < ips.size(); ++i)
	{
		if (ips[i] == "0.0.0.0")
			continue;
        drawIP(ips[i].c_str(), 4, x, y);
		y = y + 7;
	}
}
Exemple #3
0
void drawInfoResolution(int width, int height, int scale, int lWidth, int lHeight, bool drawRunning, float canvasColor[3], float infoColor[3]){
    static int frame = 0;

    #ifdef __ANDROID__
        if (frame++ == 0)
    #else
        if ((frame++ % 60) == 0)
    #endif

    refreshLocalIPs();

    infoColor_[0] = infoColor[0];
    infoColor_[1] = infoColor[1];
    infoColor_[2] = infoColor[2];

    if(!drawRunning){
    	ShaderEngine::Engine->clearColor(canvasColor[0], canvasColor[1], canvasColor[2], 1);
    }

    int y = 1;
    drawIP(GIDEROS_VERSION, 2, 1, y);

    y = y + 8;
    drawIP("I", 2, 1, y);

    y = y + 8;
    for (std::size_t i = 0; i < ips.size(); ++i)
    {
        if (ips[i] == "0.0.0.0")
            continue;

        drawIP(ips[i].c_str(), 2, 4, y);

        y = y + 8;
    }

    // draw the hardware label and value on non running canvas
    drawIP("H", 2, 1, y);

    std::ostringstream oWidth;
    std::ostringstream oHeight;
    oWidth << width;
    oHeight << height;
    std::string hardware = oWidth.str() + " X " + oHeight.str();

    y = y + 8;
    drawIP(hardware.c_str(), 2, 4, y);

    // draw the resolution label and value on non running canvas
    if(drawRunning){
        y = y + 8;
        drawIP("R", 2, 1, y);

        std::ostringstream logWidth;
        std::ostringstream logHeight;
        logWidth << lWidth;
        logHeight << lHeight;
        std::string resolution = logWidth.str() + " X " + logHeight.str();

        y = y + 8;
        drawIP(resolution.c_str(), 2, 4, y);
    }

    // draw zoom label and value passed as parameters
    y = y + 8;
    drawIP("Z", 2, 2, y);

    std::ostringstream oScale;
    oScale << scale;
    std::string zoom = oScale.str() + "%";

    y = y + 8;
    drawIP(zoom.c_str(), 2, 4, y);
}