예제 #1
0
파일: main.cpp 프로젝트: dasaro77/OGLText
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
0
파일: alole.cpp 프로젝트: sndyuk/alole
	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
0
// -------------------------------------------------------------- //
void GameApp::draw()
{
  ofBackground( 0, 0, 0 );

  hmd.beginDraw();

    Environment* activeEnv = getActiveEnvironment();
    if( activeEnv )
      activeEnv->draw();

  hmd.endDraw();

  console.draw();
}