mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fixed errors in examples after switching to sf::Time
This commit is contained in:
parent
10cd729296
commit
4488f7f345
@ -39,8 +39,8 @@ void Initialize(sf::Window& window)
|
|||||||
/// Draw the OpenGL scene (a rotating cube) into
|
/// Draw the OpenGL scene (a rotating cube) into
|
||||||
/// the specified view
|
/// the specified view
|
||||||
///
|
///
|
||||||
/// \param Window Target window for rendering
|
/// \param window Target window for rendering
|
||||||
/// \param ElapsedTime Time elapsed since the last draw
|
/// \param elapsedTime Time elapsed since the last draw
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void Draw(sf::Window& window, float elapsedTime)
|
void Draw(sf::Window& window, float elapsedTime)
|
||||||
|
@ -97,9 +97,9 @@ int main()
|
|||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glTranslatef(x, y, -100.f);
|
glTranslatef(x, y, -100.f);
|
||||||
glRotatef(clock.GetElapsedTime().AsSeconds() * 0.05f, 1.f, 0.f, 0.f);
|
glRotatef(clock.GetElapsedTime().AsSeconds() * 50.f, 1.f, 0.f, 0.f);
|
||||||
glRotatef(clock.GetElapsedTime().AsSeconds() * 0.03f, 0.f, 1.f, 0.f);
|
glRotatef(clock.GetElapsedTime().AsSeconds() * 30.f, 0.f, 1.f, 0.f);
|
||||||
glRotatef(clock.GetElapsedTime().AsSeconds() * 0.09f, 0.f, 0.f, 1.f);
|
glRotatef(clock.GetElapsedTime().AsSeconds() * 90.f, 0.f, 0.f, 1.f);
|
||||||
|
|
||||||
// Draw a cube
|
// Draw a cube
|
||||||
float size = 20.f;
|
float size = 20.f;
|
||||||
|
Loading…
Reference in New Issue
Block a user