const int TIME_OUT = 10;
const float PI = 3.1415926535897932384626433832795f;
//#define DISPLAY_FPS
+const int MAX_DRAW_COUNT = 1;
const char* VERTEX_TEXT =
"uniform mat4 uPositionMatrix;\n"
, __pCanvas(null)
, __pFont(null)
, __needUpdateTexture(false)
+ , __drawCount(0)
{
}
{
__needUpdateTexture = false;
__pCanvas->Show();
+ __drawCount = 0;
}
glBindTexture(GL_TEXTURE_2D, __textureId);
void
GlesCanvasTexture::DrawEllipse(Point position, Color color)
{
- if (__pCanvas != null)
+ if (__pCanvas != null && __drawCount < MAX_DRAW_COUNT)
{
int size = 10 + Math::Rand() % 40;
Rectangle rect(position.x - size, position.y -size, size * 2, size * 2);
__pCanvas->FillEllipse(color, rect);
DrawText(L"Touch the screen");
__needUpdateTexture = true;
+ __drawCount++;
}
}