Adjusted PySFML to work with the current SFML2 branch.
Note that it's just compatible. A lot of the new functionality is still in the pipeline. git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1308 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
fb7470cbc3
commit
839c80556d
29 changed files with 544 additions and 354 deletions
|
@ -11,7 +11,7 @@ def main():
|
|||
|
||||
# Create main window
|
||||
App = sf.RenderWindow(sf.VideoMode(800, 600), "SFML OpenGL")
|
||||
App.PreserveOpenGLStates(True)
|
||||
App.SetActive()
|
||||
|
||||
# Create a sprite for the background
|
||||
BackgroundImage = sf.Image()
|
||||
|
@ -73,7 +73,11 @@ def main():
|
|||
|
||||
# Draw background
|
||||
App.Draw(Background)
|
||||
App.Flush()
|
||||
|
||||
# Active window to be able to perform OpenGL commands.
|
||||
App.SetActive()
|
||||
|
||||
# Clear depth buffer
|
||||
glClear(GL_DEPTH_BUFFER_BIT)
|
||||
|
||||
|
@ -145,7 +149,7 @@ def main():
|
|||
glEnd()
|
||||
|
||||
# Draw some text on top of our OpenGL object
|
||||
Text = sf.String("This is a rotating cube")
|
||||
Text = sf.Text("This is a rotating cube")
|
||||
Text.SetPosition(230., 300.)
|
||||
Text.SetColor(sf.Color(128, 0, 128))
|
||||
App.Draw(Text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue