本文整理汇总了C++中Console::draw方法的典型用法代码示例。如果您正苦于以下问题:C++ Console::draw方法的具体用法?C++ Console::draw怎么用?C++ Console::draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console::draw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleDisplay
void handleDisplay() {
// Clear the window
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
console.draw();
coordinates.draw();
// Swap buffers (color buffers, makes previous render visible)
glutSwapBuffers();
}
示例2: update
void update(void) {
switch (currKey) {
case Input::KEY_LEFT:
if (cursor->x > 0) {
--cursor->x;
console->draw(cursor);
bufferDirty = true;
}
break;
case Input::KEY_UP:
if (cursor->y > 0) {
--cursor->y;
console->draw(cursor);
bufferDirty = true;
}
break;
case Input::KEY_RIGHT:
if (cursor->x < width) {
++cursor->x;
console->draw(cursor);
bufferDirty = true;
}
break;
case Input::KEY_DOWN:
if (cursor->y < height) {
++cursor->y;
console->draw(cursor);
bufferDirty = true;
}
break;
case Input::KEY_CONTROL_C:
exit(0);
break;
default:
key->content = currKey;
console->draw(key);
bufferDirty = true;
break;
}
}
示例3: draw
// -------------------------------------------------------------- //
void GameApp::draw()
{
ofBackground( 0, 0, 0 );
hmd.beginDraw();
Environment* activeEnv = getActiveEnvironment();
if( activeEnv )
activeEnv->draw();
hmd.endDraw();
console.draw();
}