Implemented the new graphics API:
- Removed the internal classes sf::Renderer and sf::Matrix3 - Split sf::Drawable into sf::Drawable and sf::Transformable - Added sf::Transform - Added sf::Vertex - Added sf::VertexArray - Types of shapes are now handled with their own derived class - Modified the Pong example
This commit is contained in:
parent
541509d2a7
commit
5bae08a2d8
65 changed files with 4756 additions and 3326 deletions
|
@ -4,7 +4,6 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <SFML/OpenGL.hpp>
|
||||
#include <iostream>
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Entry point of application
|
||||
|
@ -77,9 +76,9 @@ int main()
|
|||
}
|
||||
|
||||
// Draw the background
|
||||
window.SaveGLStates();
|
||||
window.PushGLStates();
|
||||
window.Draw(background);
|
||||
window.RestoreGLStates();
|
||||
window.PopGLStates();
|
||||
|
||||
// Activate the window before using OpenGL commands.
|
||||
// This is useless here because we have only one window which is
|
||||
|
@ -138,12 +137,12 @@ int main()
|
|||
glEnd();
|
||||
|
||||
// Draw some text on top of our OpenGL object
|
||||
window.SaveGLStates();
|
||||
window.PushGLStates();
|
||||
sf::Text text("SFML / OpenGL demo");
|
||||
text.SetPosition(250.f, 450.f);
|
||||
text.SetColor(sf::Color(255, 255, 255, 170));
|
||||
text.SetPosition(250.f, 450.f);
|
||||
window.Draw(text);
|
||||
window.RestoreGLStates();
|
||||
window.PopGLStates();
|
||||
|
||||
// Finally, display the rendered frame on screen
|
||||
window.Display();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue