- QueryPerformanceCounter(QPCStartCount);
- glLoadIdentity;
- glRotatef(xwinkel, 1, 0, 0);
- glTranslatef(0, -1.01, 0);
- glPushMatrix;
- glPopMatrix;
- glRotatef(winkel, 0, 1, 0);
- glCallList(SBox);
- glTranslatef(tx, 0, z);
- DrawObject;
- QueryPerformanceCounter(QPCEndCount);
- ZeitFaktor := QPCEndCount - QPCStartCount;
- ZeitFaktor := Zeitfaktor / PerfCountFreq * 100;
- sw := Zeitfaktor * GW;
- gwinkel := WNKL * Zeitfaktor;
- if (keys[VK_UP]) then
- begin
- z := z + (sw * cos(-winkel * PI / 180));
- tx := tx + (sw * sin(-winkel * PI / 180));
- end;
- if (keys[VK_DOWN]) then
- begin
- z := z - (sw * cos(-winkel * PI / 180));
- tx := tx - (sw * sin(-winkel * PI / 180));
- end;
- if (keys[VK_LEFT]) then
- begin
- winkel := winkel - gwinkel;
- end;
- if (keys[VK_RIGHT]) then
- begin
- winkel := winkel + gwinkel;
- end;