phil67rpg

Members
  • Content count

    1394
  • Joined

  • Last visited

Community Reputation

444 Excellent

About phil67rpg

  • Rank
    Advanced Member
  1. I am using #include <chrono> which seems to be working. this is the error: 8 IntelliSense: no operator "-" matches these operands operand types are: int - std::chrono::time_point<std::chrono::system_clock, std::chrono::system_clock::duration> c:\Users\phil6_000\Desktop\main.cpp 644 35 space5
  2. here is the code I am using void drawScene() { glClear(GL_COLOR_BUFFER_BIT); drawScene_bug(); auto timeStampNow = chrono::high_resolution_clock::now(); auto elapsed = timeStampPrevious - timeStampNow; eraseScene_bug(); // drawScene_bug_two(); // eraseScene_bug_two(); drawScene_ship(); drawScene_bullet(); auto timeStampPrevious = timeStampNow; glutSwapBuffers(); } [code] sorry void drawScene() { glClear(GL_COLOR_BUFFER_BIT); drawScene_bug(); auto timeStampNow = chrono::high_resolution_clock::now(); auto elapsed = timeStampPrevious - timeStampNow; eraseScene_bug(); // drawScene_bug_two(); // eraseScene_bug_two(); drawScene_ship(); drawScene_bullet(); auto timeStampPrevious = timeStampNow; glutSwapBuffers(); }
  3. I get an error with the minus sign(-) no operand matches these operators
  4. lactose I am having a problem with the wait period
  5. also I want to erase the sprite after I draw it.
  6. sorry but the question is how do I draw a sprite and then wait for a period of time and then draw another sprite over it.
  7. void TimerFunction(int value) { glutPostRedisplay(); glutTimerFunc(1000, TimerFunction, 1); } void drawScene() { glClear(GL_COLOR_BUFFER_BIT); drawScene_bug(); TimerFunction(1); eraseScene_bug(); // drawScene_bug_two(); // eraseScene_bug_two(); drawScene_ship(); drawScene_bullet(); glutSwapBuffers(); }
  8. actually I used windows.h and it works just fine
  9. well I have looked up the sleep() command on the net but have not found an answer, all I want to know is what #include command do I use to use the sleep command. I have tried dos.h and thread but they do not work. I know this is a very simple question but like I said I have already done some research but with no luck.