예제 #1
0
void init()
{
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_SMOOTH);
  glEnable(GL_DEPTH_TEST);

  auto error_ = glewInit();
  std::cout << error_ << std::endl;

  counter.start();

  /* check the OpenGL version */
  char *buff = (char*)glGetString(GL_VERSION);
  std::cout << buff << std::endl;

  /* check the vendor and the graphics card */
  buff = (char*)glGetString(GL_VENDOR);
  std::cout << buff << std::endl;
  buff = (char*)glGetString(GL_RENDERER);
  std::cout << buff;

  gm.reset(new GameManager());
  gm->init();

  for(int i=0; i<30; i++)
    keyPressed[i]=false;
}
예제 #2
0
파일: main.cpp 프로젝트: MonkeyLOL/project
void init()
{
    GLenum err = glewInit();
    if (GLEW_OK != err) std::cout<<"Error: "<< glewGetErrorString(err);
    std::cout<<"Status: Using GLEW "<< glewGetString(GLEW_VERSION);

  glClearColor(0.3, 0.3, 0.3, 0.0);
  glShadeModel(GL_SMOOTH);
  glEnable(GL_DEPTH_TEST);

  counter.start();

  gm.reset(new GameManager());
  gm->init();


  for(int i=0; i<30; i++)
    keyPressed[i]=false;

  glEnable(GL_NORMALIZE);
}