├── .editorconfig ├── .gitattributes ├── CMakeLists.txt ├── CONTRIBUTING.md ├── changelog.md ├── cmake ├── Config.cmake ├── Macros.cmake ├── Modules │ ├── FindDRM.cmake │ ├── FindEGL.cmake │ ├── FindFLAC.cmake │ ├── FindFreetype.cmake │ ├── FindGLES.cmake │ ├── FindSFML.cmake │ ├── FindUDev.cmake │ └── FindVorbis.cmake └── toolchains │ └── android.toolchain.cmake ├── doc ├── CMakeLists.txt ├── doxyfile.in ├── doxygen.css ├── footer.html ├── header.html.in └── mainpage.hpp ├── examples ├── CMakeLists.txt ├── X11 │ ├── CMakeLists.txt │ └── X11.cpp ├── android │ ├── AndroidManifest.xml │ ├── assets │ │ ├── canary.wav │ │ ├── image.png │ │ ├── orchestral.ogg │ │ └── sansation.ttf │ ├── jni │ │ ├── Android.mk │ │ ├── Application.mk │ │ └── main.cpp │ └── res │ │ ├── drawable-hdpi │ │ └── sfml_logo.png │ │ ├── drawable-ldpi │ │ └── sfml_logo.png │ │ ├── drawable-mdpi │ │ └── sfml_logo.png │ │ ├── drawable-xhdpi │ │ └── sfml_logo.png │ │ ├── drawable-xxhdpi │ │ └── sfml_logo.png │ │ └── values │ │ └── strings.xml ├── cocoa │ ├── CMakeLists.txt │ ├── CocoaAppDelegate.h │ ├── CocoaAppDelegate.mm │ ├── MainMenu.xib │ ├── NSString+stdstring.h │ ├── NSString+stdstring.mm │ ├── main.m │ ├── readme.txt │ └── resources │ │ ├── Cocoa-Info.plist │ │ ├── Credits.rtf │ │ ├── blue.png │ │ ├── green.png │ │ ├── icon.icns │ │ ├── logo.png │ │ ├── red.png │ │ └── sansation.ttf ├── ftp │ ├── CMakeLists.txt │ └── Ftp.cpp ├── opengl │ ├── CMakeLists.txt │ ├── OpenGL.cpp │ └── resources │ │ ├── background.jpg │ │ ├── sansation.ttf │ │ └── texture.jpg ├── pong │ ├── CMakeLists.txt │ ├── Pong.cpp │ └── resources │ │ ├── ball.wav │ │ └── sansation.ttf ├── shader │ ├── CMakeLists.txt │ ├── Effect.hpp │ ├── Shader.cpp │ └── resources │ │ ├── background.jpg │ │ ├── billboard.frag │ │ ├── billboard.geom │ │ ├── billboard.vert │ │ ├── blink.frag │ │ ├── blur.frag │ │ ├── devices.png │ │ ├── edge.frag │ │ ├── logo.png │ │ ├── pixelate.frag │ │ ├── sansation.ttf │ │ ├── sfml.png │ │ ├── storm.vert │ │ ├── text-background.png │ │ └── wave.vert ├── sockets │ ├── CMakeLists.txt │ ├── Sockets.cpp │ ├── TCP.cpp │ └── UDP.cpp ├── sound │ ├── CMakeLists.txt │ ├── Sound.cpp │ └── resources │ │ ├── canary.wav │ │ ├── ding.flac │ │ └── orchestral.ogg ├── sound_capture │ ├── CMakeLists.txt │ └── SoundCapture.cpp ├── voip │ ├── CMakeLists.txt │ ├── Client.cpp │ ├── Server.cpp │ └── VoIP.cpp ├── win32 │ ├── CMakeLists.txt │ ├── Win32.cpp │ └── resources │ │ ├── image1.jpg │ │ └── image2.jpg └── window │ ├── CMakeLists.txt │ └── Window.cpp ├── extlibs ├── Android.mk ├── bin │ ├── x64 │ │ └── openal32.dll │ └── x86 │ │ └── openal32.dll ├── headers │ ├── AL │ │ ├── al.h │ │ ├── alc.h │ │ ├── alext.h │ │ ├── efx-creative.h │ │ ├── efx-presets.h │ │ └── efx.h │ ├── FLAC │ │ ├── all.h │ │ ├── assert.h │ │ ├── callback.h │ │ ├── export.h │ │ ├── format.h │ │ ├── metadata.h │ │ ├── ordinals.h │ │ ├── stream_decoder.h │ │ └── stream_encoder.h │ ├── freetype2 │ │ ├── config │ │ │ ├── ftconfig.h │ │ │ ├── ftheader.h │ │ │ ├── ftmodule.h │ │ │ ├── ftoption.h │ │ │ └── ftstdlib.h │ │ ├── freetype.h │ │ ├── ft2build.h │ │ ├── ftadvanc.h │ │ ├── ftautoh.h │ │ ├── ftbbox.h │ │ ├── ftbdf.h │ │ ├── ftbitmap.h │ │ ├── ftbzip2.h │ │ ├── ftcache.h │ │ ├── ftcffdrv.h │ │ ├── ftchapters.h │ │ ├── ftcid.h │ │ ├── fterrdef.h │ │ ├── fterrors.h │ │ ├── ftgasp.h │ │ ├── ftglyph.h │ │ ├── ftgxval.h │ │ ├── ftgzip.h │ │ ├── ftimage.h │ │ ├── ftincrem.h │ │ ├── ftlcdfil.h │ │ ├── ftlist.h │ │ ├── ftlzw.h │ │ ├── ftmac.h │ │ ├── ftmm.h │ │ ├── ftmodapi.h │ │ ├── ftmoderr.h │ │ ├── ftotval.h │ │ ├── ftoutln.h │ │ ├── ftpfr.h │ │ ├── ftrender.h │ │ ├── ftsizes.h │ │ ├── ftsnames.h │ │ ├── ftstroke.h │ │ ├── ftsynth.h │ │ ├── ftsystem.h │ │ ├── fttrigon.h │ │ ├── ftttdrv.h │ │ ├── fttypes.h │ │ ├── ftwinfnt.h │ │ ├── ftxf86.h │ │ ├── t1tables.h │ │ ├── ttnameid.h │ │ ├── tttables.h │ │ ├── tttags.h │ │ └── ttunpat.h │ ├── mingw │ │ ├── _mingw_dxhelper.h │ │ └── dinput.h │ ├── ogg │ │ ├── config_types.h │ │ ├── ogg.h │ │ └── os_types.h │ ├── stb_image │ │ ├── stb_image.h │ │ └── stb_image_write.h │ └── vorbis │ │ ├── codec.h │ │ ├── vorbisenc.h │ │ └── vorbisfile.h ├── libs-android │ ├── armeabi-v7a │ │ ├── libFLAC++.a │ │ ├── libFLAC.a │ │ ├── libfreetype.a │ │ ├── libogg.a │ │ ├── libopenal.so │ │ ├── libvorbis.a │ │ ├── libvorbisenc.a │ │ └── libvorbisfile.a │ ├── armeabi │ │ ├── libFLAC++.a │ │ ├── libFLAC.a │ │ ├── libfreetype.a │ │ ├── libogg.a │ │ ├── libopenal.so │ │ ├── libvorbis.a │ │ ├── libvorbisenc.a │ │ └── libvorbisfile.a │ ├── mips │ │ ├── libFLAC++.a │ │ ├── libFLAC.a │ │ ├── libfreetype.a │ │ ├── libogg.a │ │ ├── libopenal.so │ │ ├── libvorbis.a │ │ ├── libvorbisenc.a │ │ └── libvorbisfile.a │ └── x86 │ │ ├── libFLAC++.a │ │ ├── libFLAC.a │ │ ├── libfreetype.a │ │ ├── libogg.a │ │ ├── libopenal.so │ │ ├── libvorbis.a │ │ ├── libvorbisenc.a │ │ └── libvorbisfile.a ├── libs-ios │ ├── libflac.a │ ├── libfreetype.a │ ├── libogg.a │ └── libvorbis.a ├── libs-mingw │ ├── x64 │ │ ├── libFLAC.a │ │ ├── libfreetype.a │ │ ├── libogg.a │ │ ├── libopenal32.a │ │ ├── libvorbis.a │ │ ├── libvorbisenc.a │ │ └── libvorbisfile.a │ └── x86 │ │ ├── libFLAC.a │ │ ├── libfreetype.a │ │ ├── libogg.a │ │ ├── libopenal32.a │ │ ├── libvorbis.a │ │ ├── libvorbisenc.a │ │ └── libvorbisfile.a ├── libs-msvc-universal │ ├── x64 │ │ ├── flac.lib │ │ ├── freetype.lib │ │ ├── ogg.lib │ │ ├── openal32.lib │ │ ├── vorbis.lib │ │ ├── vorbisenc.lib │ │ └── vorbisfile.lib │ └── x86 │ │ ├── flac.lib │ │ ├── freetype.lib │ │ ├── ogg.lib │ │ ├── openal32.lib │ │ ├── vorbis.lib │ │ ├── vorbisenc.lib │ │ └── vorbisfile.lib ├── libs-msvc │ ├── x64 │ │ ├── flac.lib │ │ ├── freetype.lib │ │ ├── ogg.lib │ │ ├── openal32.lib │ │ ├── vorbis.lib │ │ ├── vorbisenc.lib │ │ └── vorbisfile.lib │ └── x86 │ │ ├── flac.lib │ │ ├── freetype.lib │ │ ├── ogg.lib │ │ ├── openal32.lib │ │ ├── vorbis.lib │ │ ├── vorbisenc.lib │ │ └── vorbisfile.lib └── libs-osx │ └── Frameworks │ ├── FLAC.framework │ ├── FLAC │ ├── Resources │ └── Versions │ │ ├── A │ │ ├── FLAC │ │ └── Resources │ │ │ └── Info.plist │ │ └── Current │ ├── OpenAL.framework │ ├── OpenAL │ ├── Resources │ └── Versions │ │ ├── A │ │ ├── OpenAL │ │ └── Resources │ │ │ └── Info.plist │ │ └── Current │ ├── freetype.framework │ ├── Resources │ ├── Versions │ │ ├── A │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ └── freetype │ │ └── Current │ └── freetype │ ├── ogg.framework │ ├── Resources │ ├── Versions │ │ ├── A │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ └── ogg │ │ └── Current │ └── ogg │ ├── vorbis.framework │ ├── Resources │ ├── Versions │ │ ├── A │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ └── vorbis │ │ └── Current │ └── vorbis │ ├── vorbisenc.framework │ ├── Resources │ ├── Versions │ │ ├── A │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ └── vorbisenc │ │ └── Current │ └── vorbisenc │ └── vorbisfile.framework │ ├── Resources │ ├── Versions │ ├── A │ │ ├── Resources │ │ │ └── Info.plist │ │ └── vorbisfile │ └── Current │ └── vorbisfile ├── include └── SFML │ ├── Audio.hpp │ ├── Audio │ ├── AlResource.hpp │ ├── Export.hpp │ ├── InputSoundFile.hpp │ ├── Listener.hpp │ ├── Music.hpp │ ├── OutputSoundFile.hpp │ ├── Sound.hpp │ ├── SoundBuffer.hpp │ ├── SoundBufferRecorder.hpp │ ├── SoundFileFactory.hpp │ ├── SoundFileFactory.inl │ ├── SoundFileReader.hpp │ ├── SoundFileWriter.hpp │ ├── SoundRecorder.hpp │ ├── SoundSource.hpp │ └── SoundStream.hpp │ ├── Config.hpp │ ├── Graphics.hpp │ ├── Graphics │ ├── BlendMode.hpp │ ├── CircleShape.hpp │ ├── Color.hpp │ ├── ConvexShape.hpp │ ├── Drawable.hpp │ ├── Export.hpp │ ├── Font.hpp │ ├── Glsl.hpp │ ├── Glsl.inl │ ├── Glyph.hpp │ ├── Image.hpp │ ├── PrimitiveType.hpp │ ├── Rect.hpp │ ├── Rect.inl │ ├── RectangleShape.hpp │ ├── RenderStates.hpp │ ├── RenderTarget.hpp │ ├── RenderTexture.hpp │ ├── RenderWindow.hpp │ ├── Shader.hpp │ ├── Shape.hpp │ ├── Sprite.hpp │ ├── Text.hpp │ ├── Texture.hpp │ ├── Transform.hpp │ ├── Transformable.hpp │ ├── Vertex.hpp │ ├── VertexArray.hpp │ ├── VertexBuffer.hpp │ └── View.hpp │ ├── Main.hpp │ ├── Network.hpp │ ├── Network │ ├── Export.hpp │ ├── Ftp.hpp │ ├── Http.hpp │ ├── IpAddress.hpp │ ├── Packet.hpp │ ├── Socket.hpp │ ├── SocketHandle.hpp │ ├── SocketSelector.hpp │ ├── TcpListener.hpp │ ├── TcpSocket.hpp │ └── UdpSocket.hpp │ ├── OpenGL.hpp │ ├── System.hpp │ ├── System │ ├── Clock.hpp │ ├── Err.hpp │ ├── Export.hpp │ ├── FileInputStream.hpp │ ├── InputStream.hpp │ ├── Lock.hpp │ ├── MemoryInputStream.hpp │ ├── Mutex.hpp │ ├── NativeActivity.hpp │ ├── NonCopyable.hpp │ ├── Sleep.hpp │ ├── String.hpp │ ├── String.inl │ ├── Thread.hpp │ ├── Thread.inl │ ├── ThreadLocal.hpp │ ├── ThreadLocalPtr.hpp │ ├── ThreadLocalPtr.inl │ ├── Time.hpp │ ├── Utf.hpp │ ├── Utf.inl │ ├── Vector2.hpp │ ├── Vector2.inl │ ├── Vector3.hpp │ └── Vector3.inl │ ├── Window.hpp │ └── Window │ ├── Context.hpp │ ├── ContextSettings.hpp │ ├── Event.hpp │ ├── Export.hpp │ ├── GlResource.hpp │ ├── Joystick.hpp │ ├── Keyboard.hpp │ ├── Mouse.hpp │ ├── Sensor.hpp │ ├── Touch.hpp │ ├── VideoMode.hpp │ ├── Window.hpp │ ├── WindowHandle.hpp │ └── WindowStyle.hpp ├── license.md ├── readme-original.md ├── readme.md ├── src └── SFML │ ├── Android.mk │ ├── Audio │ ├── ALCheck.cpp │ ├── ALCheck.hpp │ ├── AlResource.cpp │ ├── AudioDevice.cpp │ ├── AudioDevice.hpp │ ├── CMakeLists.txt │ ├── InputSoundFile.cpp │ ├── Listener.cpp │ ├── Music.cpp │ ├── OutputSoundFile.cpp │ ├── Sound.cpp │ ├── SoundBuffer.cpp │ ├── SoundBufferRecorder.cpp │ ├── SoundFileFactory.cpp │ ├── SoundFileReaderFlac.cpp │ ├── SoundFileReaderFlac.hpp │ ├── SoundFileReaderOgg.cpp │ ├── SoundFileReaderOgg.hpp │ ├── SoundFileReaderWav.cpp │ ├── SoundFileReaderWav.hpp │ ├── SoundFileWriterFlac.cpp │ ├── SoundFileWriterFlac.hpp │ ├── SoundFileWriterOgg.cpp │ ├── SoundFileWriterOgg.hpp │ ├── SoundFileWriterWav.cpp │ ├── SoundFileWriterWav.hpp │ ├── SoundRecorder.cpp │ ├── SoundSource.cpp │ └── SoundStream.cpp │ ├── CMakeLists.txt │ ├── Graphics │ ├── BlendMode.cpp │ ├── CMakeLists.txt │ ├── CircleShape.cpp │ ├── Color.cpp │ ├── ConvexShape.cpp │ ├── Font.cpp │ ├── GLCheck.cpp │ ├── GLCheck.hpp │ ├── GLExtensions.cpp │ ├── GLExtensions.hpp │ ├── GLExtensions.txt │ ├── GLLoader.cpp │ ├── GLLoader.hpp │ ├── Glsl.cpp │ ├── Image.cpp │ ├── ImageLoader.cpp │ ├── ImageLoader.hpp │ ├── RectangleShape.cpp │ ├── RenderStates.cpp │ ├── RenderTarget.cpp │ ├── RenderTexture.cpp │ ├── RenderTextureImpl.cpp │ ├── RenderTextureImpl.hpp │ ├── RenderTextureImplDefault.cpp │ ├── RenderTextureImplDefault.hpp │ ├── RenderTextureImplFBO.cpp │ ├── RenderTextureImplFBO.hpp │ ├── RenderWindow.cpp │ ├── Shader.cpp │ ├── Shape.cpp │ ├── Sprite.cpp │ ├── Text.cpp │ ├── Texture.cpp │ ├── TextureSaver.cpp │ ├── TextureSaver.hpp │ ├── Transform.cpp │ ├── Transformable.cpp │ ├── Vertex.cpp │ ├── VertexArray.cpp │ ├── VertexBuffer.cpp │ └── View.cpp │ ├── Main │ ├── CMakeLists.txt │ ├── MainAndroid.cpp │ ├── MainWin32.cpp │ ├── MainiOS.mm │ └── SFMLActivity.cpp │ ├── Network │ ├── CMakeLists.txt │ ├── Ftp.cpp │ ├── Http.cpp │ ├── IpAddress.cpp │ ├── Packet.cpp │ ├── Socket.cpp │ ├── SocketImpl.hpp │ ├── SocketSelector.cpp │ ├── TcpListener.cpp │ ├── TcpSocket.cpp │ ├── UdpSocket.cpp │ ├── Unix │ │ ├── SocketImpl.cpp │ │ └── SocketImpl.hpp │ └── Win32 │ │ ├── SocketImpl.cpp │ │ └── SocketImpl.hpp │ ├── System │ ├── Android │ │ ├── Activity.cpp │ │ ├── Activity.hpp │ │ ├── NativeActivity.cpp │ │ ├── ResourceStream.cpp │ │ └── ResourceStream.hpp │ ├── CMakeLists.txt │ ├── Clock.cpp │ ├── Err.cpp │ ├── FileInputStream.cpp │ ├── Lock.cpp │ ├── MemoryInputStream.cpp │ ├── Mutex.cpp │ ├── Sleep.cpp │ ├── String.cpp │ ├── Thread.cpp │ ├── ThreadLocal.cpp │ ├── Time.cpp │ ├── Unix │ │ ├── ClockImpl.cpp │ │ ├── ClockImpl.hpp │ │ ├── MutexImpl.cpp │ │ ├── MutexImpl.hpp │ │ ├── SleepImpl.cpp │ │ ├── SleepImpl.hpp │ │ ├── ThreadImpl.cpp │ │ ├── ThreadImpl.hpp │ │ ├── ThreadLocalImpl.cpp │ │ └── ThreadLocalImpl.hpp │ └── Win32 │ │ ├── ClockImpl.cpp │ │ ├── ClockImpl.hpp │ │ ├── MutexImpl.cpp │ │ ├── MutexImpl.hpp │ │ ├── SleepImpl.cpp │ │ ├── SleepImpl.hpp │ │ ├── ThreadImpl.cpp │ │ ├── ThreadImpl.hpp │ │ ├── ThreadLocalImpl.cpp │ │ └── ThreadLocalImpl.hpp │ └── Window │ ├── Android │ ├── InputImpl.cpp │ ├── InputImpl.hpp │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WindowImplAndroid.cpp │ └── WindowImplAndroid.hpp │ ├── CMakeLists.txt │ ├── Context.cpp │ ├── EGLCheck.cpp │ ├── EGLCheck.hpp │ ├── EglContext.cpp │ ├── EglContext.hpp │ ├── FreeBSD │ ├── JoystickImpl.cpp │ └── JoystickImpl.hpp │ ├── GlContext.cpp │ ├── GlContext.hpp │ ├── GlResource.cpp │ ├── InputImpl.hpp │ ├── Joystick.cpp │ ├── JoystickImpl.hpp │ ├── JoystickManager.cpp │ ├── JoystickManager.hpp │ ├── Keyboard.cpp │ ├── Mouse.cpp │ ├── OSX │ ├── AutoreleasePoolWrapper.h │ ├── AutoreleasePoolWrapper.mm │ ├── HIDInputManager.hpp │ ├── HIDInputManager.mm │ ├── HIDJoystickManager.cpp │ ├── HIDJoystickManager.hpp │ ├── InputImpl.hpp │ ├── InputImpl.mm │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── NSImage+raw.h │ ├── NSImage+raw.mm │ ├── SFApplication.h │ ├── SFApplication.m │ ├── SFApplicationDelegate.h │ ├── SFApplicationDelegate.m │ ├── SFContext.hpp │ ├── SFContext.mm │ ├── SFKeyboardModifiersHelper.h │ ├── SFKeyboardModifiersHelper.mm │ ├── SFOpenGLView+keyboard.mm │ ├── SFOpenGLView+keyboard_priv.h │ ├── SFOpenGLView+mouse.mm │ ├── SFOpenGLView+mouse_priv.h │ ├── SFOpenGLView.h │ ├── SFOpenGLView.mm │ ├── SFSilentResponder.h │ ├── SFSilentResponder.m │ ├── SFViewController.h │ ├── SFViewController.mm │ ├── SFWindow.h │ ├── SFWindow.m │ ├── SFWindowController.h │ ├── SFWindowController.mm │ ├── Scaling.h │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WindowImplCocoa.hpp │ ├── WindowImplCocoa.mm │ ├── WindowImplDelegateProtocol.h │ ├── cg_sf_conversion.hpp │ ├── cg_sf_conversion.mm │ ├── cpp_objc_conversion.h │ └── cpp_objc_conversion.mm │ ├── Sensor.cpp │ ├── SensorImpl.hpp │ ├── SensorManager.cpp │ ├── SensorManager.hpp │ ├── Touch.cpp │ ├── Unix │ ├── DRM │ │ ├── DRMContext.cpp │ │ ├── DRMContext.hpp │ │ ├── InputImplUDev.cpp │ │ ├── InputImplUDev.hpp │ │ ├── VideoModeImplDRM.cpp │ │ ├── WindowImplDRM.cpp │ │ ├── WindowImplDRM.hpp │ │ ├── drm-common.c │ │ └── drm-common.h │ ├── Display.cpp │ ├── Display.hpp │ ├── GlxContext.cpp │ ├── GlxContext.hpp │ ├── GlxExtensions.cpp │ ├── GlxExtensions.hpp │ ├── GlxExtensions.txt │ ├── InputImpl.cpp │ ├── InputImpl.hpp │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── RPi │ │ ├── VideoModeImplRPi.cpp │ │ ├── WindowImplRPi.cpp │ │ └── WindowImplRPi.hpp │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WindowImplX11.cpp │ └── WindowImplX11.hpp │ ├── VideoMode.cpp │ ├── VideoModeImpl.hpp │ ├── Win32 │ ├── InputImpl.cpp │ ├── InputImpl.hpp │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WglContext.cpp │ ├── WglContext.hpp │ ├── WglExtensions.cpp │ ├── WglExtensions.hpp │ ├── WglExtensions.txt │ ├── WindowImplWin32.cpp │ └── WindowImplWin32.hpp │ ├── Window.cpp │ ├── WindowImpl.cpp │ ├── WindowImpl.hpp │ └── iOS │ ├── EaglContext.hpp │ ├── EaglContext.mm │ ├── InputImpl.hpp │ ├── InputImpl.mm │ ├── JoystickImpl.hpp │ ├── JoystickImpl.mm │ ├── ObjCType.hpp │ ├── SFAppDelegate.hpp │ ├── SFAppDelegate.mm │ ├── SFMain.hpp │ ├── SFMain.mm │ ├── SFView.hpp │ ├── SFView.mm │ ├── SFViewController.hpp │ ├── SFViewController.mm │ ├── SensorImpl.hpp │ ├── SensorImpl.mm │ ├── VideoModeImpl.mm │ ├── WindowImplUIKit.hpp │ └── WindowImplUIKit.mm └── tools ├── android ├── clean_all.sh ├── compile_arm-v7a.sh ├── compile_arm.sh ├── compile_libs.sh ├── compile_mips.sh ├── compile_x86.sh ├── create_toolchains.sh ├── download_sources.sh ├── make_all.sh ├── patches │ └── remove-so-version-suffix.diff └── readme.txt ├── pkg-config ├── sfml-all.pc.in ├── sfml-audio.pc.in ├── sfml-graphics.pc.in ├── sfml-network.pc.in ├── sfml-system.pc.in └── sfml-window.pc.in └── xcode └── templates ├── SFML ├── SFML App.xctemplate │ ├── ResourcePath.hpp │ ├── ResourcePath.mm │ ├── TemplateIcon.icns │ ├── TemplateInfo.plist.in │ ├── cute_image.jpg │ ├── icon.png │ ├── main.cpp │ ├── nice_music.ogg │ └── sansation.ttf ├── SFML Base.xctemplate │ └── TemplateInfo.plist ├── SFML Bundle.xctemplate │ └── TemplateInfo.plist ├── SFML CLT.xctemplate │ ├── TemplateIcon.icns │ ├── TemplateInfo.plist │ ├── cute_image.jpg │ ├── icon.png │ ├── main.cpp │ ├── nice_music.ogg │ └── sansation.ttf ├── SFML Compiler.xctemplate │ └── TemplateInfo.plist.in └── SFML Linker.xctemplate │ └── TemplateInfo.plist └── readme.txt /.editorconfig: -------------------------------------------------------------------------------- 1 | # Configuration file for EditorConfig 2 | # More information is available under http://EditorConfig.org 3 | 4 | # Ignore any other files further up in the file system 5 | root = true 6 | 7 | # Configuration for all files 8 | [*] 9 | # Enforce Unix style line endings (\n only) 10 | end_of_line = lf 11 | # Always end files with a blank line 12 | insert_final_newline = true 13 | # Force space characters for indentation 14 | indent_style = space 15 | # Always indent by 4 characters 16 | indent_size = 4 17 | # Remove whitespace characters at the end of line 18 | trim_trailing_whitespace = true 19 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | extlibs/**/* -text -eol linguist-vendored 4 | cmake/toolchains/android.toolchain.cmake -text -eol 5 | 6 | *.png -text -eol 7 | *.jpg -text -eol 8 | *.wav -text -eol 9 | *.ogg -text -eol 10 | *.flac -text -eol 11 | *.tff -text -eol 12 | *.icns -text -eol 13 | *.rtf -text -eol 14 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | You would like to see a feature implemented or a bug fixed in SFML? Great! Contributions to SFML are highly appreciated, be it in the form of general ideas, concrete suggestions or code patches. 4 | 5 | [A few guiding rules have been set up on the SFML website](https://www.sfml-dev.org/contribute.php) that you should be aware of before opening an Issue or Pull Request. They will help you focus on the important stuff and prevent you from losing (y)our time with requests that are out of SFML's scope, known issues, and so on. 6 | 7 | Those rules cover the general scope defined for this project, a coding style, and a precise procedure to report bugs or suggest new features. 8 | -------------------------------------------------------------------------------- /cmake/Modules/FindDRM.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find X library and include path. 3 | # Once done this will define 4 | # 5 | # DRM_FOUND 6 | # DRM_INCLUDE_PATH 7 | # DRM_LIBRARY 8 | # 9 | 10 | FIND_PATH(DRM_INCLUDE_PATH 11 | NAMES 12 | drm.h 13 | PATHS 14 | ${CMAKE_INCLUDE_PATH}/include/libdrm/ 15 | ~/include/libdrm/ 16 | /usr/include/libdrm/ 17 | /usr/local/include/libdrm/ 18 | /sw/include/libdrm/ 19 | /opt/local/include/libdrm/ 20 | DOC "The directory where drm.h resides") 21 | FIND_LIBRARY(DRM_LIBRARY 22 | NAMES DRM drm 23 | PATHS 24 | ${CMAKE_LIBRARY_PATH}/lib/ 25 | ~/lib/ 26 | /usr/lib64 27 | /usr/lib 28 | /usr/local/lib64 29 | /usr/local/lib 30 | /sw/lib 31 | /opt/local/lib 32 | DOC "The DRM library") 33 | 34 | IF(DRM_INCLUDE_PATH) 35 | INCLUDE_DIRECTORIES(${DRM_INCLUDE_PATH}) 36 | SET(DRM_FOUND 1 CACHE STRING "Set to 1 if DRM is found, 0 otherwise") 37 | ELSE(DRM_INCLUDE_PATH) 38 | SET(DRM_FOUND 0 CACHE STRING "Set to 1 if DRM is found, 0 otherwise") 39 | ENDIF(DRM_INCLUDE_PATH) 40 | 41 | MARK_AS_ADVANCED(DRM_FOUND) 42 | 43 | IF (DRM_FOUND) 44 | MESSAGE(STATUS "Found DRM: ${DRM_LIBRARY}") 45 | MESSAGE(STATUS " include: ${DRM_INCLUDE_PATH}") 46 | ENDIF(DRM_FOUND) 47 | -------------------------------------------------------------------------------- /cmake/Modules/FindEGL.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find EGL library and include path. 3 | # Once done this will define 4 | # 5 | # EGL_FOUND 6 | # EGL_INCLUDE_PATH 7 | # EGL_LIBRARY 8 | # 9 | 10 | find_path(EGL_INCLUDE_DIR EGL/egl.h) 11 | find_library(EGL_LIBRARY NAMES EGL) 12 | 13 | include(FindPackageHandleStandardArgs) 14 | find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR) 15 | -------------------------------------------------------------------------------- /cmake/Modules/FindFLAC.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find FLAC libraries and include paths. 3 | # Once done this will define 4 | # 5 | # FLAC_FOUND 6 | # FLAC_INCLUDE_DIR 7 | # FLAC_LIBRARY 8 | # 9 | 10 | find_path(FLAC_INCLUDE_DIR FLAC/all.h) 11 | find_path(FLAC_INCLUDE_DIR FLAC/stream_decoder.h) 12 | 13 | find_library(FLAC_LIBRARY NAMES FLAC) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(FLAC DEFAULT_MSG FLAC_LIBRARY FLAC_INCLUDE_DIR) 17 | 18 | mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY) 19 | -------------------------------------------------------------------------------- /cmake/Modules/FindGLES.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find GLES library and include path. 3 | # Once done this will define 4 | # 5 | # GLES_FOUND 6 | # GLES_INCLUDE_PATH 7 | # GLES_LIBRARY 8 | # 9 | 10 | find_path(GLES_INCLUDE_DIR GLES/gl.h) 11 | find_library(GLES_LIBRARY NAMES GLESv1_CM) 12 | 13 | include(FindPackageHandleStandardArgs) 14 | find_package_handle_standard_args(GLES DEFAULT_MSG GLES_LIBRARY GLES_INCLUDE_DIR) 15 | -------------------------------------------------------------------------------- /cmake/Modules/FindUDev.cmake: -------------------------------------------------------------------------------- 1 | # Configure libudev environment 2 | # 3 | # UDEV_FOUND - system has a libudev 4 | # UDEV_INCLUDE_DIR - where to find header files 5 | # UDEV_LIBRARIES - the libraries to link against udev 6 | # UDEV_STABLE - it's true when is the version greater or equals to 143 - version when the libudev was stabilized in its API 7 | # 8 | # copyright (c) 2011 Petr Vanek 9 | # Redistribution and use of this file is allowed according to the terms of the BSD license. 10 | # 11 | 12 | FIND_PATH( 13 | UDEV_INCLUDE_DIR 14 | libudev.h 15 | /usr/include 16 | /usr/local/include 17 | ${UDEV_PATH_INCLUDES} 18 | ) 19 | 20 | FIND_LIBRARY( 21 | UDEV_LIBRARIES 22 | NAMES udev libudev 23 | PATHS ${ADDITIONAL_LIBRARY_PATHS} 24 | ${UDEV_PATH_LIB} 25 | ) 26 | 27 | IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) 28 | SET(UDEV_FOUND "YES") 29 | execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE) 30 | # retvale is 0 of the condition is "true" so we need to negate the value... 31 | if (UDEV_STABLE) 32 | set(UDEV_STABLE 0) 33 | else (UDEV_STABLE) 34 | set(UDEV_STABLE 1) 35 | endif (UDEV_STABLE) 36 | message(STATUS "libudev stable: ${UDEV_STABLE}") 37 | ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) 38 | 39 | IF (UDEV_FOUND) 40 | MESSAGE(STATUS "Found UDev: ${UDEV_LIBRARIES}") 41 | MESSAGE(STATUS " include: ${UDEV_INCLUDE_DIR}") 42 | ELSE (UDEV_FOUND) 43 | MESSAGE(STATUS "UDev not found.") 44 | MESSAGE(STATUS "UDev: You can specify includes: -DUDEV_PATH_INCLUDES=/opt/udev/include") 45 | MESSAGE(STATUS " currently found includes: ${UDEV_INCLUDE_DIR}") 46 | MESSAGE(STATUS "UDev: You can specify libs: -DUDEV_PATH_LIB=/opt/udev/lib") 47 | MESSAGE(STATUS " currently found libs: ${UDEV_LIBRARIES}") 48 | IF (UDev_FIND_REQUIRED) 49 | MESSAGE(FATAL_ERROR "Could not find UDev library") 50 | ENDIF (UDev_FIND_REQUIRED) 51 | ENDIF (UDEV_FOUND) 52 | 53 | -------------------------------------------------------------------------------- /cmake/Modules/FindVorbis.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find Ogg/Vorbis libraries and include paths. 3 | # Once done this will define 4 | # 5 | # VORBIS_FOUND 6 | # VORBIS_INCLUDE_DIRS 7 | # VORBIS_LIBRARIES 8 | # 9 | 10 | find_path(OGG_INCLUDE_DIR ogg/ogg.h) 11 | find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) 12 | 13 | find_library(OGG_LIBRARY NAMES ogg) 14 | find_library(VORBIS_LIBRARY NAMES vorbis) 15 | find_library(VORBISFILE_LIBRARY NAMES vorbisfile) 16 | find_library(VORBISENC_LIBRARY NAMES vorbisenc) 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(VORBIS DEFAULT_MSG VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY OGG_LIBRARY VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR) 20 | 21 | set(VORBIS_INCLUDE_DIRS ${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR}) 22 | set(VORBIS_LIBRARIES ${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) 23 | 24 | mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY) 25 | -------------------------------------------------------------------------------- /doc/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /doc/header.html.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SFML - Simple and Fast Multimedia Library 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 |
19 | -------------------------------------------------------------------------------- /doc/mainpage.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | /// \mainpage 3 | /// 4 | /// \section welcome Welcome 5 | /// Welcome to the official SFML documentation. Here you will find a detailed 6 | /// view of all the SFML classes and functions.
7 | /// If you are looking for tutorials, you can visit the official website 8 | /// at www.sfml-dev.org. 9 | /// 10 | /// \section example Short example 11 | /// Here is a short example, to show you how simple it is to use SFML: 12 | /// 13 | /// \code 14 | /// 15 | /// #include 16 | /// #include 17 | /// 18 | /// int main() 19 | /// { 20 | /// // Create the main window 21 | /// sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window"); 22 | /// 23 | /// // Load a sprite to display 24 | /// sf::Texture texture; 25 | /// if (!texture.loadFromFile("cute_image.jpg")) 26 | /// return EXIT_FAILURE; 27 | /// sf::Sprite sprite(texture); 28 | /// 29 | /// // Create a graphical text to display 30 | /// sf::Font font; 31 | /// if (!font.loadFromFile("arial.ttf")) 32 | /// return EXIT_FAILURE; 33 | /// sf::Text text("Hello SFML", font, 50); 34 | /// 35 | /// // Load a music to play 36 | /// sf::Music music; 37 | /// if (!music.openFromFile("nice_music.ogg")) 38 | /// return EXIT_FAILURE; 39 | /// 40 | /// // Play the music 41 | /// music.play(); 42 | /// 43 | /// // Start the game loop 44 | /// while (window.isOpen()) 45 | /// { 46 | /// // Process events 47 | /// sf::Event event; 48 | /// while (window.pollEvent(event)) 49 | /// { 50 | /// // Close window: exit 51 | /// if (event.type == sf::Event::Closed) 52 | /// window.close(); 53 | /// } 54 | /// 55 | /// // Clear screen 56 | /// window.clear(); 57 | /// 58 | /// // Draw the sprite 59 | /// window.draw(sprite); 60 | /// 61 | /// // Draw the string 62 | /// window.draw(text); 63 | /// 64 | /// // Update the window 65 | /// window.display(); 66 | /// } 67 | /// 68 | /// return EXIT_SUCCESS; 69 | /// } 70 | /// \endcode 71 | //////////////////////////////////////////////////////////// 72 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # add the examples subdirectories 3 | if(SFML_BUILD_NETWORK) 4 | add_subdirectory(ftp) 5 | add_subdirectory(sockets) 6 | endif() 7 | if(SFML_BUILD_NETWORK AND SFML_BUILD_AUDIO) 8 | add_subdirectory(voip) 9 | endif() 10 | if(SFML_BUILD_AUDIO) 11 | add_subdirectory(sound) 12 | add_subdirectory(sound_capture) 13 | endif() 14 | if(SFML_BUILD_WINDOW) 15 | add_subdirectory(window) 16 | endif() 17 | if(SFML_BUILD_GRAPHICS) 18 | add_subdirectory(opengl) 19 | add_subdirectory(shader) 20 | if(SFML_OS_WINDOWS) 21 | add_subdirectory(win32) 22 | elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD) 23 | add_subdirectory(X11) 24 | elseif(SFML_OS_MACOSX) 25 | add_subdirectory(cocoa) 26 | endif() 27 | endif() 28 | if(SFML_BUILD_GRAPHICS AND SFML_BUILD_AUDIO) 29 | add_subdirectory(pong) 30 | endif() 31 | -------------------------------------------------------------------------------- /examples/X11/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/X11) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/X11.cpp) 6 | 7 | # find OpenGL and X11 8 | find_package(OpenGL REQUIRED) 9 | include_directories(${OPENGL_INCLUDE_DIR}) 10 | find_package(X11 REQUIRED) 11 | include_directories(${X11_INCLUDE_DIR}) 12 | 13 | # define the X11 target 14 | sfml_add_example(X11 GUI_APP 15 | SOURCES ${SRC} 16 | DEPENDS sfml-window sfml-system ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) 17 | -------------------------------------------------------------------------------- /examples/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/android/assets/canary.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/assets/canary.wav -------------------------------------------------------------------------------- /examples/android/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/assets/image.png -------------------------------------------------------------------------------- /examples/android/assets/orchestral.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/assets/orchestral.ogg -------------------------------------------------------------------------------- /examples/android/assets/sansation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/assets/sansation.ttf -------------------------------------------------------------------------------- /examples/android/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := sfml-example 6 | 7 | LOCAL_SRC_FILES := main.cpp 8 | 9 | LOCAL_SHARED_LIBRARIES := sfml-system 10 | LOCAL_SHARED_LIBRARIES += sfml-window 11 | LOCAL_SHARED_LIBRARIES += sfml-graphics 12 | LOCAL_SHARED_LIBRARIES += sfml-audio 13 | LOCAL_SHARED_LIBRARIES += sfml-network 14 | LOCAL_WHOLE_STATIC_LIBRARIES := sfml-main 15 | 16 | include $(BUILD_SHARED_LIBRARY) 17 | 18 | $(call import-module,sfml) 19 | -------------------------------------------------------------------------------- /examples/android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | NDK_TOOLCHAIN_VERSION := 4.9 2 | APP_PLATFORM := android-9 3 | APP_STL := c++_shared 4 | APP_ABI := armeabi-v7a 5 | APP_MODULES := sfml-activity sfml-example 6 | -------------------------------------------------------------------------------- /examples/android/res/drawable-hdpi/sfml_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/res/drawable-hdpi/sfml_logo.png -------------------------------------------------------------------------------- /examples/android/res/drawable-ldpi/sfml_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/res/drawable-ldpi/sfml_logo.png -------------------------------------------------------------------------------- /examples/android/res/drawable-mdpi/sfml_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/res/drawable-mdpi/sfml_logo.png -------------------------------------------------------------------------------- /examples/android/res/drawable-xhdpi/sfml_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/res/drawable-xhdpi/sfml_logo.png -------------------------------------------------------------------------------- /examples/android/res/drawable-xxhdpi/sfml_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/android/res/drawable-xxhdpi/sfml_logo.png -------------------------------------------------------------------------------- /examples/android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SFML 4 | 5 | -------------------------------------------------------------------------------- /examples/cocoa/NSString+stdstring.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | #import 27 | #import 28 | 29 | @interface NSString (NSString_stdstring) 30 | 31 | +(id)stringWithstdstring:(const std::string&)string; 32 | 33 | +(id)stringWithstdwstring:(const std::wstring&)string; 34 | 35 | -(std::string)tostdstring; 36 | 37 | -(std::wstring)tostdwstring; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /examples/cocoa/main.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | #import 27 | 28 | int main(int argc, char *argv[]) 29 | { 30 | return NSApplicationMain(argc, (const char **)argv); 31 | } 32 | -------------------------------------------------------------------------------- /examples/cocoa/readme.txt: -------------------------------------------------------------------------------- 1 | SFML IN COCOA APPLICATION 2 | ========================= 3 | 4 | This is a small example of the integration of SFML in a Cocoa application. 5 | 6 | Features 7 | -------- 8 | 9 | * This example shows how basic UI elements can interact with SFML 10 | render areas such as sf::RenderWindow (you can use sf::Window and 11 | OpenGL code too, of course). 12 | * It also provides tools for converting NSString to and from 13 | std::[w]string in an Objective-C Category of NSString. 14 | * Moreover, it shows how you can prevent annoying the system alerts 15 | produced when the SFML view has focus and the user press a key 16 | (see SilentWindow interface in CocoaAppDelegate.[h|mm]). 17 | 18 | Special Considerations 19 | ---------------------- 20 | 21 | While mixing SFML into a Cocoa application you have to deal with mixing 22 | C++ and Objective-C. In order to proceed you should use .mm extension for 23 | Objective-C++ files. 24 | 25 | Be aware of the limitations of Objective-C++. Please refer to the official 26 | documentation provided by Apple for more information. 27 | 28 | You can also work around these limitations by using CSFML. 29 | -------------------------------------------------------------------------------- /examples/cocoa/resources/Cocoa-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | cocoa 9 | CFBundleIconFile 10 | icon.icns 11 | CFBundleIdentifier 12 | org.sfml-dev.cocoa 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | cocoa 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | 10.6 27 | NSHumanReadableCopyright 28 | Copyright © 2007-2018 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | NSHighResolutionCapable 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /examples/cocoa/resources/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 5 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qj 6 | 7 | \f0\fs24 \cf0 See {\field{\*\fldinst{HYPERLINK "https://sfml-dev.org"}}{\fldrslt https://sfml-dev.org}} for more information} 8 | -------------------------------------------------------------------------------- /examples/cocoa/resources/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/cocoa/resources/blue.png -------------------------------------------------------------------------------- /examples/cocoa/resources/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/cocoa/resources/green.png -------------------------------------------------------------------------------- /examples/cocoa/resources/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/cocoa/resources/icon.icns -------------------------------------------------------------------------------- /examples/cocoa/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/cocoa/resources/logo.png -------------------------------------------------------------------------------- /examples/cocoa/resources/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/cocoa/resources/red.png -------------------------------------------------------------------------------- /examples/cocoa/resources/sansation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/cocoa/resources/sansation.ttf -------------------------------------------------------------------------------- /examples/ftp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/ftp) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/Ftp.cpp) 6 | 7 | # define the ftp target 8 | sfml_add_example(ftp 9 | SOURCES ${SRC} 10 | DEPENDS sfml-network sfml-system) 11 | -------------------------------------------------------------------------------- /examples/opengl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/opengl) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/OpenGL.cpp) 6 | 7 | # find OpenGL 8 | find_package(OpenGL REQUIRED) 9 | include_directories(${OPENGL_INCLUDE_DIR}) 10 | set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES}) 11 | 12 | # define the opengl target 13 | sfml_add_example(opengl GUI_APP 14 | SOURCES ${SRC} 15 | DEPENDS sfml-graphics sfml-window sfml-system ${ADDITIONAL_LIBRARIES}) 16 | -------------------------------------------------------------------------------- /examples/opengl/resources/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/opengl/resources/background.jpg -------------------------------------------------------------------------------- /examples/opengl/resources/sansation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/opengl/resources/sansation.ttf -------------------------------------------------------------------------------- /examples/opengl/resources/texture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/opengl/resources/texture.jpg -------------------------------------------------------------------------------- /examples/pong/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/pong) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/Pong.cpp) 6 | 7 | # define the pong target 8 | sfml_add_example(pong GUI_APP 9 | SOURCES ${SRC} 10 | DEPENDS sfml-audio sfml-graphics sfml-window sfml-system) 11 | -------------------------------------------------------------------------------- /examples/pong/resources/ball.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/pong/resources/ball.wav -------------------------------------------------------------------------------- /examples/pong/resources/sansation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/pong/resources/sansation.ttf -------------------------------------------------------------------------------- /examples/shader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/shader) 3 | 4 | # all source files 5 | set(SRC 6 | ${SRCROOT}/Effect.hpp 7 | ${SRCROOT}/Shader.cpp) 8 | 9 | # define the shader target 10 | sfml_add_example(shader GUI_APP 11 | SOURCES ${SRC} 12 | DEPENDS sfml-graphics sfml-window sfml-system) 13 | -------------------------------------------------------------------------------- /examples/shader/Effect.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFFECT_HPP 2 | #define EFFECT_HPP 3 | 4 | //////////////////////////////////////////////////////////// 5 | // Headers 6 | //////////////////////////////////////////////////////////// 7 | #include 8 | #include 9 | #include 10 | 11 | 12 | //////////////////////////////////////////////////////////// 13 | // Base class for effects 14 | //////////////////////////////////////////////////////////// 15 | class Effect : public sf::Drawable 16 | { 17 | public: 18 | 19 | virtual ~Effect() 20 | { 21 | } 22 | 23 | static void setFont(const sf::Font& font) 24 | { 25 | s_font = &font; 26 | } 27 | 28 | const std::string& getName() const 29 | { 30 | return m_name; 31 | } 32 | 33 | void load() 34 | { 35 | m_isLoaded = sf::Shader::isAvailable() && onLoad(); 36 | } 37 | 38 | void update(float time, float x, float y) 39 | { 40 | if (m_isLoaded) 41 | onUpdate(time, x, y); 42 | } 43 | 44 | void draw(sf::RenderTarget& target, sf::RenderStates states) const 45 | { 46 | if (m_isLoaded) 47 | { 48 | onDraw(target, states); 49 | } 50 | else 51 | { 52 | sf::Text error("Shader not\nsupported", getFont()); 53 | error.setPosition(320.f, 200.f); 54 | error.setCharacterSize(36); 55 | target.draw(error, states); 56 | } 57 | } 58 | 59 | protected: 60 | 61 | Effect(const std::string& name) : 62 | m_name(name), 63 | m_isLoaded(false) 64 | { 65 | } 66 | 67 | static const sf::Font& getFont() 68 | { 69 | assert(s_font != NULL); 70 | return *s_font; 71 | } 72 | 73 | private: 74 | 75 | // Virtual functions to be implemented in derived effects 76 | virtual bool onLoad() = 0; 77 | virtual void onUpdate(float time, float x, float y) = 0; 78 | virtual void onDraw(sf::RenderTarget& target, sf::RenderStates states) const = 0; 79 | 80 | private: 81 | 82 | std::string m_name; 83 | bool m_isLoaded; 84 | 85 | static const sf::Font* s_font; 86 | }; 87 | 88 | #endif // EFFECT_HPP 89 | -------------------------------------------------------------------------------- /examples/shader/resources/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/shader/resources/background.jpg -------------------------------------------------------------------------------- /examples/shader/resources/billboard.frag: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform sampler2D texture; 4 | 5 | in vec2 tex_coord; 6 | 7 | void main() 8 | { 9 | // Read and apply a color from the texture 10 | gl_FragColor = texture2D(texture, tex_coord); 11 | } 12 | -------------------------------------------------------------------------------- /examples/shader/resources/billboard.geom: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // The render target's resolution (used for scaling) 4 | uniform vec2 resolution; 5 | 6 | // The billboards' size 7 | uniform vec2 size; 8 | 9 | // Input is the passed point cloud 10 | layout (points) in; 11 | 12 | // The output will consist of triangle strips with four vertices each 13 | layout (triangle_strip, max_vertices = 4) out; 14 | 15 | // Output texture coordinates 16 | out vec2 tex_coord; 17 | 18 | // Main entry point 19 | void main() 20 | { 21 | // Caculate the half width/height of the billboards 22 | vec2 half_size = size / 2.f; 23 | 24 | // Scale the size based on resolution (1 would be full width/height) 25 | half_size /= resolution; 26 | 27 | // Iterate over all vertices 28 | for (int i = 0; i < gl_in.length(); i++) 29 | { 30 | // Retrieve the passed vertex position 31 | vec2 pos = gl_in[i].gl_Position.xy; 32 | 33 | // Bottom left vertex 34 | gl_Position = vec4(pos - half_size, 0.f, 1.f); 35 | tex_coord = vec2(1.f, 1.f); 36 | EmitVertex(); 37 | 38 | // Bottom right vertex 39 | gl_Position = vec4(pos.x + half_size.x, pos.y - half_size.y, 0.f, 1.f); 40 | tex_coord = vec2(0.f, 1.f); 41 | EmitVertex(); 42 | 43 | // Top left vertex 44 | gl_Position = vec4(pos.x - half_size.x, pos.y + half_size.y, 0.f, 1.f); 45 | tex_coord = vec2(1.f, 0.f); 46 | EmitVertex(); 47 | 48 | // Top right vertex 49 | gl_Position = vec4(pos + half_size, 0.f, 1.f); 50 | tex_coord = vec2(0.f, 0.f); 51 | EmitVertex(); 52 | 53 | // And finalize the primitive 54 | EndPrimitive(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /examples/shader/resources/billboard.vert: -------------------------------------------------------------------------------- 1 | void main() 2 | { 3 | // Transform the vertex position 4 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 5 | } 6 | -------------------------------------------------------------------------------- /examples/shader/resources/blink.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D texture; 2 | uniform float blink_alpha; 3 | 4 | void main() 5 | { 6 | vec4 pixel = gl_Color; 7 | pixel.a = blink_alpha; 8 | gl_FragColor = pixel; 9 | } 10 | -------------------------------------------------------------------------------- /examples/shader/resources/blur.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D texture; 2 | uniform float blur_radius; 3 | 4 | void main() 5 | { 6 | vec2 offx = vec2(blur_radius, 0.0); 7 | vec2 offy = vec2(0.0, blur_radius); 8 | 9 | vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 4.0 + 10 | texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 + 11 | texture2D(texture, gl_TexCoord[0].xy + offx) * 2.0 + 12 | texture2D(texture, gl_TexCoord[0].xy - offy) * 2.0 + 13 | texture2D(texture, gl_TexCoord[0].xy + offy) * 2.0 + 14 | texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1.0 + 15 | texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1.0 + 16 | texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 + 17 | texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0; 18 | 19 | gl_FragColor = gl_Color * (pixel / 16.0); 20 | } 21 | -------------------------------------------------------------------------------- /examples/shader/resources/devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/shader/resources/devices.png -------------------------------------------------------------------------------- /examples/shader/resources/edge.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D texture; 2 | uniform float edge_threshold; 3 | 4 | void main() 5 | { 6 | const float offset = 1.0 / 512.0; 7 | vec2 offx = vec2(offset, 0.0); 8 | vec2 offy = vec2(0.0, offset); 9 | 10 | vec4 hEdge = texture2D(texture, gl_TexCoord[0].xy - offy) * -2.0 + 11 | texture2D(texture, gl_TexCoord[0].xy + offy) * 2.0 + 12 | texture2D(texture, gl_TexCoord[0].xy - offx - offy) * -1.0 + 13 | texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1.0 + 14 | texture2D(texture, gl_TexCoord[0].xy + offx - offy) * -1.0 + 15 | texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0; 16 | 17 | vec4 vEdge = texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 + 18 | texture2D(texture, gl_TexCoord[0].xy + offx) * -2.0 + 19 | texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1.0 + 20 | texture2D(texture, gl_TexCoord[0].xy - offx + offy) * -1.0 + 21 | texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 + 22 | texture2D(texture, gl_TexCoord[0].xy + offx + offy) * -1.0; 23 | 24 | vec3 result = sqrt(hEdge.rgb * hEdge.rgb + vEdge.rgb * vEdge.rgb); 25 | float edge = length(result); 26 | vec4 pixel = gl_Color * texture2D(texture, gl_TexCoord[0].xy); 27 | if (edge > (edge_threshold * 8.0)) 28 | pixel.rgb = vec3(0.0, 0.0, 0.0); 29 | else 30 | pixel.a = edge_threshold; 31 | gl_FragColor = pixel; 32 | } 33 | -------------------------------------------------------------------------------- /examples/shader/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/shader/resources/logo.png -------------------------------------------------------------------------------- /examples/shader/resources/pixelate.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D texture; 2 | uniform float pixel_threshold; 3 | 4 | void main() 5 | { 6 | float factor = 1.0 / (pixel_threshold + 0.001); 7 | vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor; 8 | gl_FragColor = texture2D(texture, pos) * gl_Color; 9 | } 10 | -------------------------------------------------------------------------------- /examples/shader/resources/sansation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/shader/resources/sansation.ttf -------------------------------------------------------------------------------- /examples/shader/resources/sfml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/shader/resources/sfml.png -------------------------------------------------------------------------------- /examples/shader/resources/storm.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 storm_position; 2 | uniform float storm_total_radius; 3 | uniform float storm_inner_radius; 4 | 5 | void main() 6 | { 7 | vec4 vertex = gl_ModelViewMatrix * gl_Vertex; 8 | vec2 offset = vertex.xy - storm_position; 9 | float len = length(offset); 10 | if (len < storm_total_radius) 11 | { 12 | float push_distance = storm_inner_radius + len / storm_total_radius * (storm_total_radius - storm_inner_radius); 13 | vertex.xy = storm_position + normalize(offset) * push_distance; 14 | } 15 | 16 | gl_Position = gl_ProjectionMatrix * vertex; 17 | gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; 18 | gl_FrontColor = gl_Color; 19 | } 20 | -------------------------------------------------------------------------------- /examples/shader/resources/text-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/shader/resources/text-background.png -------------------------------------------------------------------------------- /examples/shader/resources/wave.vert: -------------------------------------------------------------------------------- 1 | uniform float wave_phase; 2 | uniform vec2 wave_amplitude; 3 | 4 | void main() 5 | { 6 | vec4 vertex = gl_Vertex; 7 | vertex.x += cos(gl_Vertex.y * 0.02 + wave_phase * 3.8) * wave_amplitude.x 8 | + sin(gl_Vertex.y * 0.02 + wave_phase * 6.3) * wave_amplitude.x * 0.3; 9 | vertex.y += sin(gl_Vertex.x * 0.02 + wave_phase * 2.4) * wave_amplitude.y 10 | + cos(gl_Vertex.x * 0.02 + wave_phase * 5.2) * wave_amplitude.y * 0.3; 11 | 12 | gl_Position = gl_ModelViewProjectionMatrix * vertex; 13 | gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; 14 | gl_FrontColor = gl_Color; 15 | } 16 | -------------------------------------------------------------------------------- /examples/sockets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/sockets) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/Sockets.cpp 6 | ${SRCROOT}/TCP.cpp 7 | ${SRCROOT}/UDP.cpp) 8 | 9 | # define the sockets target 10 | sfml_add_example(sockets 11 | SOURCES ${SRC} 12 | DEPENDS sfml-network sfml-system) 13 | -------------------------------------------------------------------------------- /examples/sockets/Sockets.cpp: -------------------------------------------------------------------------------- 1 | 2 | //////////////////////////////////////////////////////////// 3 | // Headers 4 | //////////////////////////////////////////////////////////// 5 | #include 6 | #include 7 | 8 | 9 | void runTcpServer(unsigned short port); 10 | void runTcpClient(unsigned short port); 11 | void runUdpServer(unsigned short port); 12 | void runUdpClient(unsigned short port); 13 | 14 | 15 | //////////////////////////////////////////////////////////// 16 | /// Entry point of application 17 | /// 18 | /// \return Application exit code 19 | /// 20 | //////////////////////////////////////////////////////////// 21 | int main() 22 | { 23 | // Choose an arbitrary port for opening sockets 24 | const unsigned short port = 50001; 25 | 26 | // TCP, UDP or connected UDP ? 27 | char protocol; 28 | std::cout << "Do you want to use TCP (t) or UDP (u)? "; 29 | std::cin >> protocol; 30 | 31 | // Client or server ? 32 | char who; 33 | std::cout << "Do you want to be a server (s) or a client (c)? "; 34 | std::cin >> who; 35 | 36 | if (protocol == 't') 37 | { 38 | // Test the TCP protocol 39 | if (who == 's') 40 | runTcpServer(port); 41 | else 42 | runTcpClient(port); 43 | } 44 | else 45 | { 46 | // Test the unconnected UDP protocol 47 | if (who == 's') 48 | runUdpServer(port); 49 | else 50 | runUdpClient(port); 51 | } 52 | 53 | // Wait until the user presses 'enter' key 54 | std::cout << "Press enter to exit..." << std::endl; 55 | std::cin.ignore(10000, '\n'); 56 | std::cin.ignore(10000, '\n'); 57 | 58 | return EXIT_SUCCESS; 59 | } 60 | -------------------------------------------------------------------------------- /examples/sound/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/sound) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/Sound.cpp) 6 | 7 | # define the sound target 8 | sfml_add_example(sound 9 | SOURCES ${SRC} 10 | DEPENDS sfml-audio sfml-system) 11 | -------------------------------------------------------------------------------- /examples/sound/resources/canary.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/sound/resources/canary.wav -------------------------------------------------------------------------------- /examples/sound/resources/ding.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/sound/resources/ding.flac -------------------------------------------------------------------------------- /examples/sound/resources/orchestral.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/sound/resources/orchestral.ogg -------------------------------------------------------------------------------- /examples/sound_capture/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/sound_capture) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/SoundCapture.cpp) 6 | 7 | # define the sound-capture target 8 | sfml_add_example(sound-capture 9 | SOURCES ${SRC} 10 | DEPENDS sfml-audio sfml-system) 11 | -------------------------------------------------------------------------------- /examples/voip/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/voip) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/VoIP.cpp 6 | ${SRCROOT}/Client.cpp 7 | ${SRCROOT}/Server.cpp) 8 | 9 | # define the voip target 10 | sfml_add_example(voip 11 | SOURCES ${SRC} 12 | DEPENDS sfml-audio sfml-network sfml-system) 13 | -------------------------------------------------------------------------------- /examples/voip/VoIP.cpp: -------------------------------------------------------------------------------- 1 | 2 | //////////////////////////////////////////////////////////// 3 | // Headers 4 | //////////////////////////////////////////////////////////// 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | //////////////////////////////////////////////////////////// 11 | // Function prototypes 12 | // (I'm too lazy to put them into separate headers...) 13 | //////////////////////////////////////////////////////////// 14 | void doClient(unsigned short port); 15 | void doServer(unsigned short port); 16 | 17 | 18 | //////////////////////////////////////////////////////////// 19 | /// Entry point of application 20 | /// 21 | /// \return Application exit code 22 | /// 23 | //////////////////////////////////////////////////////////// 24 | int main() 25 | { 26 | // Choose a random port for opening sockets (ports < 1024 are reserved) 27 | const unsigned short port = 2435; 28 | 29 | // Client or server ? 30 | char who; 31 | std::cout << "Do you want to be a server ('s') or a client ('c')? "; 32 | std::cin >> who; 33 | 34 | if (who == 's') 35 | { 36 | // Run as a server 37 | doServer(port); 38 | } 39 | else 40 | { 41 | // Run as a client 42 | doClient(port); 43 | } 44 | 45 | // Wait until the user presses 'enter' key 46 | std::cout << "Press enter to exit..." << std::endl; 47 | std::cin.ignore(10000, '\n'); 48 | 49 | return EXIT_SUCCESS; 50 | } 51 | -------------------------------------------------------------------------------- /examples/win32/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/win32) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/Win32.cpp) 6 | 7 | # define the win32 target 8 | sfml_add_example(win32 GUI_APP 9 | SOURCES ${SRC} 10 | DEPENDS sfml-graphics sfml-window sfml-system) 11 | -------------------------------------------------------------------------------- /examples/win32/resources/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/win32/resources/image1.jpg -------------------------------------------------------------------------------- /examples/win32/resources/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/examples/win32/resources/image2.jpg -------------------------------------------------------------------------------- /examples/window/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/window) 3 | 4 | # all source files 5 | set(SRC ${SRCROOT}/Window.cpp) 6 | 7 | # find OpenGL 8 | find_package(OpenGL REQUIRED) 9 | include_directories(${OPENGL_INCLUDE_DIR}) 10 | set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES}) 11 | 12 | # define the window target 13 | sfml_add_example(window GUI_APP 14 | SOURCES ${SRC} 15 | DEPENDS sfml-window sfml-system ${ADDITIONAL_LIBRARIES}) 16 | -------------------------------------------------------------------------------- /extlibs/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := freetype 5 | LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libfreetype.a 6 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 7 | include $(PREBUILT_STATIC_LIBRARY) 8 | 9 | include $(CLEAR_VARS) 10 | LOCAL_MODULE := openal 11 | LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libopenal.so 12 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 13 | include $(PREBUILT_SHARED_LIBRARY) 14 | -------------------------------------------------------------------------------- /extlibs/bin/x64/openal32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/bin/x64/openal32.dll -------------------------------------------------------------------------------- /extlibs/bin/x86/openal32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/bin/x86/openal32.dll -------------------------------------------------------------------------------- /extlibs/headers/AL/efx-creative.h: -------------------------------------------------------------------------------- 1 | /* The tokens that would be defined here are already defined in efx.h. This 2 | * empty file is here to provide compatibility with Windows-based projects 3 | * that would include it. */ 4 | -------------------------------------------------------------------------------- /extlibs/headers/FLAC/assert.h: -------------------------------------------------------------------------------- 1 | /* libFLAC - Free Lossless Audio Codec library 2 | * Copyright (C) 2001-2009 Josh Coalson 3 | * Copyright (C) 2011-2013 Xiph.Org Foundation 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * - Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * - Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * - Neither the name of the Xiph.org Foundation nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 24 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef FLAC__ASSERT_H 34 | #define FLAC__ASSERT_H 35 | 36 | /* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */ 37 | #ifdef DEBUG 38 | #include 39 | #define FLAC__ASSERT(x) assert(x) 40 | #define FLAC__ASSERT_DECLARATION(x) x 41 | #else 42 | #define FLAC__ASSERT(x) 43 | #define FLAC__ASSERT_DECLARATION(x) 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /extlibs/headers/freetype2/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/') based on information 6 | * from `/modules.cfg'. 7 | * 8 | * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 | 32 | /* EOF */ 33 | -------------------------------------------------------------------------------- /extlibs/headers/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef int16_t ogg_int16_t; 20 | typedef uint16_t ogg_uint16_t; 21 | typedef int32_t ogg_int32_t; 22 | typedef uint32_t ogg_uint32_t; 23 | typedef int64_t ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libFLAC++.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libFLAC.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libfreetype.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libogg.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libopenal.so -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libvorbis.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libvorbisenc.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi-v7a/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi-v7a/libvorbisfile.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libFLAC++.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libFLAC.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libfreetype.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libogg.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libopenal.so -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libvorbis.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libvorbisenc.a -------------------------------------------------------------------------------- /extlibs/libs-android/armeabi/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/armeabi/libvorbisfile.a -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libFLAC++.a -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libFLAC.a -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libfreetype.a -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libogg.a -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libopenal.so -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libvorbis.a -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libvorbisenc.a -------------------------------------------------------------------------------- /extlibs/libs-android/mips/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/mips/libvorbisfile.a -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libFLAC++.a -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libFLAC.a -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libfreetype.a -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libogg.a -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libopenal.so -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libvorbis.a -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libvorbisenc.a -------------------------------------------------------------------------------- /extlibs/libs-android/x86/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-android/x86/libvorbisfile.a -------------------------------------------------------------------------------- /extlibs/libs-ios/libflac.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-ios/libflac.a -------------------------------------------------------------------------------- /extlibs/libs-ios/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-ios/libfreetype.a -------------------------------------------------------------------------------- /extlibs/libs-ios/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-ios/libogg.a -------------------------------------------------------------------------------- /extlibs/libs-ios/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-ios/libvorbis.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x64/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x64/libFLAC.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x64/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x64/libfreetype.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x64/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x64/libogg.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x64/libopenal32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x64/libopenal32.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x64/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x64/libvorbis.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x64/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x64/libvorbisenc.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x64/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x64/libvorbisfile.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x86/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x86/libFLAC.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x86/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x86/libfreetype.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x86/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x86/libogg.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x86/libopenal32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x86/libopenal32.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x86/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x86/libvorbis.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x86/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x86/libvorbisenc.a -------------------------------------------------------------------------------- /extlibs/libs-mingw/x86/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-mingw/x86/libvorbisfile.a -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x64/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x64/flac.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x64/freetype.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x64/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x64/ogg.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x64/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x64/openal32.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x64/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x64/vorbis.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x64/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x64/vorbisenc.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x64/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x64/vorbisfile.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x86/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x86/flac.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x86/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x86/freetype.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x86/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x86/ogg.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x86/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x86/openal32.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x86/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x86/vorbis.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x86/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x86/vorbisenc.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc-universal/x86/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc-universal/x86/vorbisfile.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x64/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x64/flac.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x64/freetype.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x64/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x64/ogg.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x64/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x64/openal32.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x64/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x64/vorbis.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x64/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x64/vorbisenc.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x64/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x64/vorbisfile.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x86/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x86/flac.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x86/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x86/freetype.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x86/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x86/ogg.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x86/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x86/openal32.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x86/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x86/vorbis.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x86/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x86/vorbisenc.lib -------------------------------------------------------------------------------- /extlibs/libs-msvc/x86/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-msvc/x86/vorbisfile.lib -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/FLAC.framework/FLAC: -------------------------------------------------------------------------------- 1 | Versions/Current/FLAC -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/FLAC.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/FLAC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/FLAC -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | FLAC 9 | CFBundleIdentifier 10 | org.sfml-dev.FLAC 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/FLAC.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/OpenAL.framework/OpenAL: -------------------------------------------------------------------------------- 1 | Versions/Current/OpenAL -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/OpenAL.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/OpenAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/OpenAL -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | OpenAL 9 | CFBundleIdentifier 10 | org.sfml-dev.OpenAL 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/freetype.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | freetype 9 | CFBundleIdentifier 10 | org.sfml-dev.freetype 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/freetype.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/freetype.framework/freetype: -------------------------------------------------------------------------------- 1 | Versions/Current/freetype -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/ogg.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ogg 9 | CFBundleIdentifier 10 | org.sfml-dev.ogg 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/ogg -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/ogg.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/ogg.framework/ogg: -------------------------------------------------------------------------------- 1 | Versions/Current/ogg -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbis.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | vorbis 9 | CFBundleIdentifier 10 | org.sfml-dev.vorbis 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/vorbis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/vorbis -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbis.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbis.framework/vorbis: -------------------------------------------------------------------------------- 1 | Versions/Current/vorbis -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisenc.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | vorbisenc 9 | CFBundleIdentifier 10 | org.sfml-dev.vorbisenc 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/vorbisenc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/vorbisenc -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisenc.framework/vorbisenc: -------------------------------------------------------------------------------- 1 | Versions/Current/vorbisenc -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisfile.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | vorbisfile 9 | CFBundleIdentifier 10 | org.sfml-dev.vorbisfile 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/vorbisfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/vorbisfile -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /extlibs/libs-osx/Frameworks/vorbisfile.framework/vorbisfile: -------------------------------------------------------------------------------- 1 | Versions/Current/vorbisfile -------------------------------------------------------------------------------- /include/SFML/Audio.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_AUDIO_HPP 26 | #define SFML_AUDIO_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | 48 | #endif // SFML_AUDIO_HPP 49 | 50 | //////////////////////////////////////////////////////////// 51 | /// \defgroup audio Audio module 52 | /// 53 | /// Sounds, streaming (musics or custom sources), recording, 54 | /// spatialization. 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | -------------------------------------------------------------------------------- /include/SFML/Audio/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_AUDIO_EXPORT_HPP 26 | #define SFML_AUDIO_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_AUDIO_EXPORTS) 38 | 39 | #define SFML_AUDIO_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_AUDIO_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_AUDIO_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /include/SFML/Graphics/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GRAPHICS_EXPORT_HPP 26 | #define SFML_GRAPHICS_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_GRAPHICS_EXPORTS) 38 | 39 | #define SFML_GRAPHICS_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_GRAPHICS_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_GRAPHICS_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /include/SFML/Main.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_MAIN_HPP 26 | #define SFML_MAIN_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | #if defined(SFML_SYSTEM_IOS) 35 | 36 | // On iOS, we have no choice but to have our own main, 37 | // so we need to rename the user one and call it later 38 | #define main sfmlMain 39 | 40 | #endif 41 | 42 | 43 | #endif // SFML_MAIN_HPP 44 | -------------------------------------------------------------------------------- /include/SFML/Network.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NETWORK_HPP 26 | #define SFML_NETWORK_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | 44 | 45 | #endif // SFML_NETWORK_HPP 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \defgroup network Network module 49 | /// 50 | /// Socket-based communication, utilities and higher-level 51 | /// network protocols (HTTP, FTP). 52 | /// 53 | //////////////////////////////////////////////////////////// 54 | -------------------------------------------------------------------------------- /include/SFML/Network/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NETWORK_EXPORT_HPP 26 | #define SFML_NETWORK_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_NETWORK_EXPORTS) 38 | 39 | #define SFML_NETWORK_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_NETWORK_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_NETWORK_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /include/SFML/Network/SocketHandle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SOCKETHANDLE_HPP 26 | #define SFML_SOCKETHANDLE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | #if defined(SFML_SYSTEM_WINDOWS) 34 | #include 35 | #endif 36 | 37 | 38 | namespace sf 39 | { 40 | //////////////////////////////////////////////////////////// 41 | // Define the low-level socket handle type, specific to 42 | // each platform 43 | //////////////////////////////////////////////////////////// 44 | #if defined(SFML_SYSTEM_WINDOWS) 45 | 46 | typedef UINT_PTR SocketHandle; 47 | 48 | #else 49 | 50 | typedef int SocketHandle; 51 | 52 | #endif 53 | 54 | } // namespace sf 55 | 56 | 57 | #endif // SFML_SOCKETHANDLE_HPP 58 | -------------------------------------------------------------------------------- /include/SFML/System/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SYSTEM_EXPORT_HPP 26 | #define SFML_SYSTEM_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_SYSTEM_EXPORTS) 38 | 39 | #define SFML_SYSTEM_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_SYSTEM_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_SYSTEM_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /include/SFML/System/NativeActivity.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NATIVEACTIVITY_HPP 26 | #define SFML_NATIVEACTIVITY_HPP 27 | 28 | 29 | //////////////////////////////////////////////////////////// 30 | // Headers 31 | //////////////////////////////////////////////////////////// 32 | #include 33 | 34 | 35 | #if !defined(SFML_SYSTEM_ANDROID) 36 | #error NativeActivity.hpp: This header is Android only. 37 | #endif 38 | 39 | 40 | struct ANativeActivity; 41 | 42 | namespace sf 43 | { 44 | //////////////////////////////////////////////////////////// 45 | /// \ingroup system 46 | /// \brief Return a pointer to the Android native activity 47 | /// 48 | /// You shouldn't have to use this function, unless you want 49 | /// to implement very specific details, that SFML doesn't 50 | /// support, or to use a workaround for a known issue. 51 | /// 52 | /// \return Pointer to Android native activity structure 53 | /// 54 | /// \sfplatform{Android,SFML/System/NativeActivity.hpp} 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | SFML_SYSTEM_API ANativeActivity* getNativeActivity(); 58 | 59 | } // namespace sf 60 | 61 | 62 | #endif // SFML_NATIVEACTIVITY_HPP 63 | -------------------------------------------------------------------------------- /include/SFML/System/Sleep.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SLEEP_HPP 26 | #define SFML_SLEEP_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \ingroup system 39 | /// \brief Make the current thread sleep for a given duration 40 | /// 41 | /// sf::sleep is the best way to block a program or one of its 42 | /// threads, as it doesn't consume any CPU power. 43 | /// 44 | /// \param duration Time to sleep 45 | /// 46 | //////////////////////////////////////////////////////////// 47 | void SFML_SYSTEM_API sleep(Time duration); 48 | 49 | } // namespace sf 50 | 51 | 52 | #endif // SFML_SLEEP_HPP 53 | -------------------------------------------------------------------------------- /include/SFML/System/String.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | 26 | //////////////////////////////////////////////////////////// 27 | template 28 | String String::fromUtf8(T begin, T end) 29 | { 30 | String string; 31 | Utf8::toUtf32(begin, end, std::back_inserter(string.m_string)); 32 | return string; 33 | } 34 | 35 | 36 | //////////////////////////////////////////////////////////// 37 | template 38 | String String::fromUtf16(T begin, T end) 39 | { 40 | String string; 41 | Utf16::toUtf32(begin, end, std::back_inserter(string.m_string)); 42 | return string; 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | template 48 | String String::fromUtf32(T begin, T end) 49 | { 50 | String string; 51 | string.m_string.assign(begin, end); 52 | return string; 53 | } 54 | -------------------------------------------------------------------------------- /include/SFML/Window.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SFML_WINDOW_HPP 26 | #define SFML_SFML_WINDOW_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | 47 | 48 | #endif // SFML_SFML_WINDOW_HPP 49 | 50 | //////////////////////////////////////////////////////////// 51 | /// \defgroup window Window module 52 | /// 53 | /// Provides OpenGL-based windows, and abstractions for 54 | /// events and input handling. 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | -------------------------------------------------------------------------------- /include/SFML/Window/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOW_EXPORT_HPP 26 | #define SFML_WINDOW_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_WINDOW_EXPORTS) 38 | 39 | #define SFML_WINDOW_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_WINDOW_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_WINDOW_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /include/SFML/Window/WindowStyle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOWSTYLE_HPP 26 | #define SFML_WINDOWSTYLE_HPP 27 | 28 | 29 | namespace sf 30 | { 31 | namespace Style 32 | { 33 | //////////////////////////////////////////////////////////// 34 | /// \ingroup window 35 | /// \brief Enumeration of the window styles 36 | /// 37 | //////////////////////////////////////////////////////////// 38 | enum 39 | { 40 | None = 0, ///< No border / title bar (this flag and all others are mutually exclusive) 41 | Titlebar = 1 << 0, ///< Title bar + fixed border 42 | Resize = 1 << 1, ///< Title bar + resizable border + maximize button 43 | Close = 1 << 2, ///< Title bar + close button 44 | Fullscreen = 1 << 3, ///< Fullscreen mode (this flag and all others are mutually exclusive) 45 | 46 | Default = Titlebar | Resize | Close ///< Default window style 47 | }; 48 | } 49 | 50 | } // namespace sf 51 | 52 | 53 | #endif // SFML_WINDOWSTYLE_HPP 54 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | # SFML 2 | 3 | SFML - Copyright (C) 2007-2018 Laurent Gomila - laurent@sfml-dev.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 10 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 11 | 3. This notice may not be removed or altered from any source distribution. 12 | 13 | ## External libraries used by SFML 14 | 15 | * _OpenAL-Soft_ is under the LGPL license 16 | * _stb_image_ and _stb_image_write_ are public domain 17 | * _freetype_ is under the FreeType license or the GPL license 18 | * _libogg_ is under the BSD license 19 | * _libvorbis_ is under the BSD license 20 | * _libflac_ is under the BSD license 21 | -------------------------------------------------------------------------------- /readme-original.md: -------------------------------------------------------------------------------- 1 | ![SFML logo](http://www.sfml-dev.org/images/logo.png) 2 | 3 | # SFML — Simple and Fast Multimedia Library 4 | 5 | SFML is a simple, fast, cross-platform and object-oriented multimedia API. It provides access to windowing, graphics, audio and network. It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python. 6 | 7 | ## Authors 8 | 9 | - Laurent Gomila — main developer (laurent@sfml-dev.org) 10 | - Marco Antognini — OS X developer (hiura@sfml-dev.org) 11 | - Jonathan De Wachter — Android developer (dewachter.jonathan@gmail.com) 12 | - Jan Haller (bromeon@sfml-dev.org) 13 | - Stefan Schindler (tank@sfml-dev.org) 14 | - Lukas Dürrenberger (eXpl0it3r@sfml-dev.org) 15 | - binary1248 (binary1248@hotmail.com) 16 | - Artur Moreira (artturmoreira@gmail.com) 17 | - Mario Liebisch (mario@sfml-dev.org) 18 | 19 | ## Download 20 | 21 | You can get the latest official release on [SFML's website](http://www.sfml-dev.org/download.php). You can also get the current development version from the [Git repository](https://github.com/SFML/SFML). 22 | 23 | ## Install 24 | 25 | Follow the instructions of the [tutorials](http://www.sfml-dev.org/tutorials/), there is one for each platform/compiler that SFML supports. 26 | 27 | ## Learn 28 | 29 | There are several places to learn SFML: 30 | 31 | * The [official tutorials](http://www.sfml-dev.org/tutorials/) 32 | * The [online API documentation](http://www.sfml-dev.org/documentation/) 33 | * The [community wiki](https://github.com/SFML/SFML/wiki/) 34 | * The [community forum](http://en.sfml-dev.org/forums/) ([French](http://fr.sfml-dev.org/forums/)) 35 | 36 | ## Contribute 37 | 38 | SFML is an open-source project, and it needs your help to go on growing and improving. If you want to get involved and suggest some additional features, file a bug report or submit a patch, please have a look at the [contribution guidelines](http://www.sfml-dev.org/contribute.php). 39 | -------------------------------------------------------------------------------- /src/SFML/Graphics/GLExtensions.txt: -------------------------------------------------------------------------------- 1 | // Created with: 2 | // lua LoadGen.lua 3 | 4 | SGIS_texture_edge_clamp 5 | EXT_texture_edge_clamp 6 | EXT_blend_minmax 7 | EXT_blend_subtract 8 | ARB_multitexture 9 | EXT_blend_func_separate 10 | ARB_vertex_buffer_object 11 | ARB_shading_language_100 12 | ARB_shader_objects 13 | ARB_vertex_shader 14 | ARB_fragment_shader 15 | ARB_texture_non_power_of_two 16 | EXT_blend_equation_separate 17 | EXT_texture_sRGB 18 | EXT_framebuffer_object 19 | EXT_packed_depth_stencil 20 | EXT_framebuffer_blit 21 | EXT_framebuffer_multisample 22 | ARB_copy_buffer 23 | ARB_geometry_shader4 24 | -------------------------------------------------------------------------------- /src/SFML/Graphics/RenderTextureImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | RenderTextureImpl::~RenderTextureImpl() 37 | { 38 | // Nothing to do 39 | } 40 | 41 | } // namespace priv 42 | 43 | } // namespace sf 44 | -------------------------------------------------------------------------------- /src/SFML/Graphics/TextureSaver.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | TextureSaver::TextureSaver() 37 | { 38 | glCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &m_textureBinding)); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | TextureSaver::~TextureSaver() 44 | { 45 | glCheck(glBindTexture(GL_TEXTURE_2D, m_textureBinding)); 46 | } 47 | 48 | } // namespace priv 49 | 50 | } // namespace sf 51 | -------------------------------------------------------------------------------- /src/SFML/Main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(INCROOT ${PROJECT_SOURCE_DIR}/include/SFML/Main) 3 | set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Main) 4 | 5 | # sources 6 | if(SFML_OS_WINDOWS) 7 | set(SRC ${SRC} ${SRCROOT}/MainWin32.cpp) 8 | elseif(SFML_OS_IOS) 9 | set(SRC ${SRC} ${SRCROOT}/MainiOS.mm) 10 | elseif(SFML_OS_ANDROID) 11 | set(SRC ${SRC} ${SRCROOT}/MainAndroid.cpp) 12 | else() 13 | return() 14 | endif() 15 | source_group("" FILES ${SRC}) 16 | 17 | # define the sfml-main target 18 | add_library(sfml-main STATIC ${SRC}) 19 | 20 | # set the debug suffix 21 | set_target_properties(sfml-main PROPERTIES DEBUG_POSTFIX -d) 22 | 23 | # insert the major version number in the output filename 24 | set_target_properties(sfml-main PROPERTIES OUTPUT_NAME "sfml-main") 25 | 26 | # set the target's folder (for IDEs that support it, e.g. Visual Studio) 27 | set_target_properties(sfml-main PROPERTIES FOLDER "SFML") 28 | 29 | # setup the install rule 30 | install(TARGETS sfml-main ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel) 31 | 32 | # because of a current limitation on Android (which prevents one library 33 | # from depending on shared libraries), we need a boostrap activity which 34 | # will load our shared libraries manually 35 | if(SFML_OS_ANDROID) 36 | sfml_add_library(sfml-activity SOURCES ${PROJECT_SOURCE_DIR}/src/SFML/Main/SFMLActivity.cpp) 37 | endif() 38 | -------------------------------------------------------------------------------- /src/SFML/Network/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(INCROOT ${PROJECT_SOURCE_DIR}/include/SFML/Network) 3 | set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Network) 4 | 5 | # all source files 6 | set(SRC 7 | ${INCROOT}/Export.hpp 8 | ${SRCROOT}/Ftp.cpp 9 | ${INCROOT}/Ftp.hpp 10 | ${SRCROOT}/Http.cpp 11 | ${INCROOT}/Http.hpp 12 | ${SRCROOT}/IpAddress.cpp 13 | ${INCROOT}/IpAddress.hpp 14 | ${SRCROOT}/Packet.cpp 15 | ${INCROOT}/Packet.hpp 16 | ${SRCROOT}/Socket.cpp 17 | ${INCROOT}/Socket.hpp 18 | ${SRCROOT}/SocketImpl.hpp 19 | ${INCROOT}/SocketHandle.hpp 20 | ${SRCROOT}/SocketSelector.cpp 21 | ${INCROOT}/SocketSelector.hpp 22 | ${SRCROOT}/TcpListener.cpp 23 | ${INCROOT}/TcpListener.hpp 24 | ${SRCROOT}/TcpSocket.cpp 25 | ${INCROOT}/TcpSocket.hpp 26 | ${SRCROOT}/UdpSocket.cpp 27 | ${INCROOT}/UdpSocket.hpp 28 | ) 29 | 30 | # add platform specific sources 31 | if(SFML_OS_WINDOWS) 32 | set(SRC 33 | ${SRC} 34 | ${SRCROOT}/Win32/SocketImpl.cpp 35 | ${SRCROOT}/Win32/SocketImpl.hpp 36 | ) 37 | else() 38 | set(SRC 39 | ${SRC} 40 | ${SRCROOT}/Unix/SocketImpl.cpp 41 | ${SRCROOT}/Unix/SocketImpl.hpp 42 | ) 43 | endif() 44 | 45 | source_group("" FILES ${SRC}) 46 | 47 | # build the list of external libraries to link 48 | set(NETWORK_EXT_LIBS) 49 | if(SFML_OS_WINDOWS) 50 | set(NETWORK_EXT_LIBS ${NETWORK_EXT_LIBS} ws2_32) 51 | endif() 52 | 53 | # define the sfml-network target 54 | sfml_add_library(sfml-network 55 | SOURCES ${SRC} 56 | DEPENDS sfml-system 57 | EXTERNAL_LIBS ${NETWORK_EXT_LIBS}) 58 | -------------------------------------------------------------------------------- /src/SFML/Network/SocketImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | #if defined(SFML_SYSTEM_WINDOWS) 32 | 33 | #include 34 | 35 | #else 36 | 37 | #include 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/SFML/System/Android/Activity.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // Copyright (C) 2013 Jonathan De Wachter (dewachter.jonathan@gmail.com) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | 27 | //////////////////////////////////////////////////////////// 28 | // Headers 29 | //////////////////////////////////////////////////////////// 30 | #include 31 | #include 32 | 33 | #define LOGE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "sfml-error", __VA_ARGS__)) 34 | 35 | LogcatStream::LogcatStream() : 36 | std::streambuf() 37 | { 38 | // Nothing to do 39 | } 40 | 41 | std::streambuf::int_type LogcatStream::overflow (std::streambuf::int_type c) 42 | { 43 | if (c == "\n"[0]) 44 | { 45 | m_message.push_back(c); 46 | LOGE("%s", m_message.c_str()); 47 | m_message.clear(); 48 | } 49 | 50 | m_message.push_back(c); 51 | 52 | return traits_type::not_eof(c); 53 | } 54 | 55 | namespace sf 56 | { 57 | namespace priv 58 | { 59 | ActivityStates* getActivity(ActivityStates* initializedStates, bool reset) 60 | { 61 | static ActivityStates* states = NULL; 62 | 63 | if (!states || reset) 64 | states = initializedStates; 65 | 66 | return states; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/SFML/System/Android/NativeActivity.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | namespace sf 32 | { 33 | //////////////////////////////////////////////////////////// 34 | ANativeActivity* getNativeActivity() 35 | { 36 | return priv::getActivity()->activity; 37 | } 38 | 39 | } // namespace sf 40 | -------------------------------------------------------------------------------- /src/SFML/System/Clock.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | Clock::Clock() : 41 | m_startTime(priv::ClockImpl::getCurrentTime()) 42 | { 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | Time Clock::getElapsedTime() const 48 | { 49 | return priv::ClockImpl::getCurrentTime() - m_startTime; 50 | } 51 | 52 | 53 | //////////////////////////////////////////////////////////// 54 | Time Clock::restart() 55 | { 56 | Time now = priv::ClockImpl::getCurrentTime(); 57 | Time elapsed = now - m_startTime; 58 | m_startTime = now; 59 | 60 | return elapsed; 61 | } 62 | 63 | } // namespace sf 64 | -------------------------------------------------------------------------------- /src/SFML/System/Lock.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | //////////////////////////////////////////////////////////// 35 | Lock::Lock(Mutex& mutex) : 36 | m_mutex(mutex) 37 | { 38 | m_mutex.lock(); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | Lock::~Lock() 44 | { 45 | m_mutex.unlock(); 46 | } 47 | 48 | } // namespace sf 49 | -------------------------------------------------------------------------------- /src/SFML/System/Mutex.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | Mutex::Mutex() 41 | { 42 | m_mutexImpl = new priv::MutexImpl; 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | Mutex::~Mutex() 48 | { 49 | delete m_mutexImpl; 50 | } 51 | 52 | 53 | //////////////////////////////////////////////////////////// 54 | void Mutex::lock() 55 | { 56 | m_mutexImpl->lock(); 57 | } 58 | 59 | 60 | //////////////////////////////////////////////////////////// 61 | void Mutex::unlock() 62 | { 63 | m_mutexImpl->unlock(); 64 | } 65 | 66 | } // namespace sf 67 | -------------------------------------------------------------------------------- /src/SFML/System/Sleep.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | void sleep(Time duration) 41 | { 42 | if (duration >= Time::Zero) 43 | priv::sleepImpl(duration); 44 | } 45 | 46 | } // namespace sf 47 | -------------------------------------------------------------------------------- /src/SFML/System/ThreadLocal.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | ThreadLocal::ThreadLocal(void* value) 41 | { 42 | m_impl = new priv::ThreadLocalImpl; 43 | setValue(value); 44 | } 45 | 46 | 47 | //////////////////////////////////////////////////////////// 48 | ThreadLocal::~ThreadLocal() 49 | { 50 | delete m_impl; 51 | } 52 | 53 | 54 | //////////////////////////////////////////////////////////// 55 | void ThreadLocal::setValue(void* value) 56 | { 57 | m_impl->setValue(value); 58 | } 59 | 60 | 61 | //////////////////////////////////////////////////////////// 62 | void* ThreadLocal::getValue() const 63 | { 64 | return m_impl->getValue(); 65 | } 66 | 67 | } // namespace sf 68 | -------------------------------------------------------------------------------- /src/SFML/System/Unix/ClockImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CLOCKIMPLUNIX_HPP 26 | #define SFML_CLOCKIMPLUNIX_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Unix implementation of sf::Clock 41 | /// 42 | //////////////////////////////////////////////////////////// 43 | class ClockImpl 44 | { 45 | public: 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \brief Get the current time 49 | /// 50 | /// \return Current time 51 | /// 52 | //////////////////////////////////////////////////////////// 53 | static Time getCurrentTime(); 54 | }; 55 | 56 | } // namespace priv 57 | 58 | } // namespace sf 59 | 60 | 61 | #endif // SFML_CLOCKIMPLUNIX_HPP 62 | -------------------------------------------------------------------------------- /src/SFML/System/Unix/MutexImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | MutexImpl::MutexImpl() 37 | { 38 | // Make it recursive to follow the expected behavior 39 | pthread_mutexattr_t attributes; 40 | pthread_mutexattr_init(&attributes); 41 | pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE); 42 | 43 | pthread_mutex_init(&m_mutex, &attributes); 44 | } 45 | 46 | 47 | //////////////////////////////////////////////////////////// 48 | MutexImpl::~MutexImpl() 49 | { 50 | pthread_mutex_destroy(&m_mutex); 51 | } 52 | 53 | 54 | //////////////////////////////////////////////////////////// 55 | void MutexImpl::lock() 56 | { 57 | pthread_mutex_lock(&m_mutex); 58 | } 59 | 60 | 61 | //////////////////////////////////////////////////////////// 62 | void MutexImpl::unlock() 63 | { 64 | pthread_mutex_unlock(&m_mutex); 65 | } 66 | 67 | } // namespace priv 68 | 69 | } // namespace sf 70 | -------------------------------------------------------------------------------- /src/SFML/System/Unix/SleepImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | #include 31 | 32 | 33 | namespace sf 34 | { 35 | namespace priv 36 | { 37 | //////////////////////////////////////////////////////////// 38 | void sleepImpl(Time time) 39 | { 40 | Uint64 usecs = time.asMicroseconds(); 41 | 42 | // Construct the time to wait 43 | timespec ti; 44 | ti.tv_nsec = (usecs % 1000000) * 1000; 45 | ti.tv_sec = usecs / 1000000; 46 | 47 | // Wait... 48 | // If nanosleep returns -1, we check errno. If it is EINTR 49 | // nanosleep was interrupted and has set ti to the remaining 50 | // duration. We continue sleeping until the complete duration 51 | // has passed. We stop sleeping if it was due to an error. 52 | while ((nanosleep(&ti, &ti) == -1) && (errno == EINTR)) 53 | { 54 | } 55 | } 56 | 57 | } // namespace priv 58 | 59 | } // namespace sf 60 | -------------------------------------------------------------------------------- /src/SFML/System/Unix/SleepImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SLEEPIMPLUNIX_HPP 26 | #define SFML_SLEEPIMPLUNIX_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Unix implementation of sf::Sleep 41 | /// 42 | /// \param time Time to sleep 43 | /// 44 | //////////////////////////////////////////////////////////// 45 | void sleepImpl(Time time); 46 | 47 | } // namespace priv 48 | 49 | } // namespace sf 50 | 51 | 52 | #endif // SFML_SLEEPIMPLUNIX_HPP 53 | -------------------------------------------------------------------------------- /src/SFML/System/Unix/ThreadLocalImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | ThreadLocalImpl::ThreadLocalImpl() : 37 | m_key(0) 38 | { 39 | pthread_key_create(&m_key, NULL); 40 | } 41 | 42 | 43 | //////////////////////////////////////////////////////////// 44 | ThreadLocalImpl::~ThreadLocalImpl() 45 | { 46 | pthread_key_delete(m_key); 47 | } 48 | 49 | 50 | //////////////////////////////////////////////////////////// 51 | void ThreadLocalImpl::setValue(void* value) 52 | { 53 | pthread_setspecific(m_key, value); 54 | } 55 | 56 | 57 | //////////////////////////////////////////////////////////// 58 | void* ThreadLocalImpl::getValue() const 59 | { 60 | return pthread_getspecific(m_key); 61 | } 62 | 63 | } // namespace priv 64 | 65 | } // namespace sf 66 | -------------------------------------------------------------------------------- /src/SFML/System/Win32/ClockImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CLOCKIMPLWIN32_HPP 26 | #define SFML_CLOCKIMPLWIN32_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Windows implementation of sf::Clock 41 | /// 42 | //////////////////////////////////////////////////////////// 43 | class ClockImpl 44 | { 45 | public: 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \brief Get the current time 49 | /// 50 | /// \return Current time 51 | /// 52 | //////////////////////////////////////////////////////////// 53 | static Time getCurrentTime(); 54 | }; 55 | 56 | } // namespace priv 57 | 58 | } // namespace sf 59 | 60 | 61 | #endif // SFML_CLOCKIMPLWIN32_HPP 62 | -------------------------------------------------------------------------------- /src/SFML/System/Win32/MutexImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | MutexImpl::MutexImpl() 37 | { 38 | InitializeCriticalSection(&m_mutex); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | MutexImpl::~MutexImpl() 44 | { 45 | DeleteCriticalSection(&m_mutex); 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | void MutexImpl::lock() 51 | { 52 | EnterCriticalSection(&m_mutex); 53 | } 54 | 55 | 56 | //////////////////////////////////////////////////////////// 57 | void MutexImpl::unlock() 58 | { 59 | LeaveCriticalSection(&m_mutex); 60 | } 61 | 62 | } // namespace priv 63 | 64 | } // namespace sf 65 | -------------------------------------------------------------------------------- /src/SFML/System/Win32/SleepImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | namespace priv 35 | { 36 | //////////////////////////////////////////////////////////// 37 | void sleepImpl(Time time) 38 | { 39 | // Get the supported timer resolutions on this system 40 | TIMECAPS tc; 41 | timeGetDevCaps(&tc, sizeof(TIMECAPS)); 42 | 43 | // Set the timer resolution to the minimum for the Sleep call 44 | timeBeginPeriod(tc.wPeriodMin); 45 | 46 | // Wait... 47 | ::Sleep(time.asMilliseconds()); 48 | 49 | // Reset the timer resolution back to the system default 50 | timeEndPeriod(tc.wPeriodMin); 51 | } 52 | 53 | } // namespace priv 54 | 55 | } // namespace sf 56 | -------------------------------------------------------------------------------- /src/SFML/System/Win32/SleepImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SLEEPIMPLWIN32_HPP 26 | #define SFML_SLEEPIMPLWIN32_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Windows implementation of sf::Sleep 41 | /// 42 | /// \param time Time to sleep 43 | /// 44 | //////////////////////////////////////////////////////////// 45 | void sleepImpl(Time time); 46 | 47 | } // namespace priv 48 | 49 | } // namespace sf 50 | 51 | 52 | #endif // SFML_SLEEPIMPLWIN32_HPP 53 | -------------------------------------------------------------------------------- /src/SFML/System/Win32/ThreadLocalImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | ThreadLocalImpl::ThreadLocalImpl() 37 | { 38 | m_index = TlsAlloc(); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | ThreadLocalImpl::~ThreadLocalImpl() 44 | { 45 | TlsFree(m_index); 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | void ThreadLocalImpl::setValue(void* value) 51 | { 52 | TlsSetValue(m_index, value); 53 | } 54 | 55 | 56 | //////////////////////////////////////////////////////////// 57 | void* ThreadLocalImpl::getValue() const 58 | { 59 | return TlsGetValue(m_index); 60 | } 61 | 62 | } // namespace priv 63 | 64 | } // namespace sf 65 | -------------------------------------------------------------------------------- /src/SFML/Window/InputImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_INPUTIMPL_HPP 26 | #define SFML_INPUTIMPL_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | #if defined(SFML_SYSTEM_WINDOWS) 34 | #include 35 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) 36 | #if defined(SFML_RPI) || defined(SFML_DRM) 37 | #include 38 | #else 39 | #include 40 | #endif 41 | #elif defined(SFML_SYSTEM_MACOS) 42 | #include 43 | #elif defined(SFML_SYSTEM_IOS) 44 | #include 45 | #elif defined(SFML_SYSTEM_ANDROID) 46 | #include 47 | #endif 48 | 49 | 50 | #endif // SFML_INPUTIMPL_HPP 51 | -------------------------------------------------------------------------------- /src/SFML/Window/Keyboard.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | //////////////////////////////////////////////////////////// 35 | bool Keyboard::isKeyPressed(Key key) 36 | { 37 | return priv::InputImpl::isKeyPressed(key); 38 | } 39 | 40 | 41 | //////////////////////////////////////////////////////////// 42 | void Keyboard::setVirtualKeyboardVisible(bool visible) 43 | { 44 | priv::InputImpl::setVirtualKeyboardVisible(visible); 45 | } 46 | 47 | } // namespace sf 48 | -------------------------------------------------------------------------------- /src/SFML/Window/OSX/AutoreleasePoolWrapper.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | /// \brief Ensure one autorelease pool is available on this thread 28 | /// 29 | //////////////////////////////////////////////////////////// 30 | void ensureThreadHasPool(void); 31 | 32 | 33 | //////////////////////////////////////////////////////////// 34 | /// \brief Drain the thread's pool but keep it alive 35 | /// 36 | //////////////////////////////////////////////////////////// 37 | void drainThreadPool(void); 38 | -------------------------------------------------------------------------------- /src/SFML/Window/OSX/NSImage+raw.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #include 30 | 31 | #import 32 | 33 | //////////////////////////////////////////////////////////// 34 | /// Extends NSImage with a convenience method to load images 35 | /// from raw data. 36 | /// 37 | //////////////////////////////////////////////////////////// 38 | 39 | @interface NSImage (raw) 40 | 41 | //////////////////////////////////////////////////////////// 42 | /// \brief Load an image from raw RGBA pixels 43 | /// 44 | /// \param pixels array of 4 * `size` bytes representing the image 45 | /// \param size size of the image 46 | /// 47 | /// \return an instance of NSImage that needs to be released by the caller 48 | /// 49 | //////////////////////////////////////////////////////////// 50 | +(NSImage*)imageWithRawData:(const sf::Uint8*)pixels andSize:(NSSize)size; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /src/SFML/Window/OSX/SFApplicationDelegate.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #import 30 | 31 | //////////////////////////////////////////////////////////// 32 | @implementation SFApplicationDelegate 33 | 34 | 35 | //////////////////////////////////////////////////////////// 36 | -(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender 37 | { 38 | (void)sender; 39 | // Generate close event for each SFML window 40 | [NSApp makeWindowsPerform:@selector(sfClose) inOrder:NO]; 41 | return NSTerminateCancel; 42 | } 43 | 44 | 45 | //////////////////////////////////////////////////////////// 46 | -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication 47 | { 48 | (void)theApplication; 49 | return YES; 50 | } 51 | 52 | 53 | @end 54 | 55 | -------------------------------------------------------------------------------- /src/SFML/Window/OSX/SFSilentResponder.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #import 30 | 31 | //////////////////////////////////////////////////////////// 32 | /// \brief Silent Responder used to prevent sound alert with key event 33 | /// 34 | /// Mainly used by SFOpenGLView and its hidden text view. 35 | /// 36 | //////////////////////////////////////////////////////////// 37 | @interface SFSilentResponder : NSResponder 38 | 39 | -(void)doCommandBySelector:(SEL)sel; 40 | 41 | @end 42 | 43 | -------------------------------------------------------------------------------- /src/SFML/Window/OSX/SFSilentResponder.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #import 30 | 31 | @implementation SFSilentResponder 32 | 33 | -(void)doCommandBySelector:(SEL)sel 34 | { 35 | // Just do nothing, to prevent sound alerts 36 | (void)sel; 37 | } 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /src/SFML/Window/OSX/cpp_objc_conversion.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #include 30 | #include 31 | 32 | #import 33 | 34 | //////////////////////////////////////////////////////////// 35 | /// \brief Returns a NSString construct with +stringWithCString:encoding: 36 | /// 37 | //////////////////////////////////////////////////////////// 38 | NSString* stringToNSString(const std::string& string); 39 | 40 | //////////////////////////////////////////////////////////// 41 | /// \brief Returns a NSString construct with +stringWithCString:encoding: 42 | /// 43 | //////////////////////////////////////////////////////////// 44 | NSString* sfStringToNSString(const sf::String& string); 45 | -------------------------------------------------------------------------------- /src/SFML/Window/Sensor.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | 35 | //////////////////////////////////////////////////////////// 36 | bool Sensor::isAvailable(Type sensor) 37 | { 38 | return priv::SensorManager::getInstance().isAvailable(sensor); 39 | } 40 | 41 | //////////////////////////////////////////////////////////// 42 | void Sensor::setEnabled(Type sensor, bool enabled) 43 | { 44 | return priv::SensorManager::getInstance().setEnabled(sensor, enabled); 45 | } 46 | 47 | //////////////////////////////////////////////////////////// 48 | Vector3f Sensor::getValue(Type sensor) 49 | { 50 | return priv::SensorManager::getInstance().getValue(sensor); 51 | } 52 | 53 | } // namespace sf 54 | -------------------------------------------------------------------------------- /src/SFML/Window/SensorImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SENSORIMPL_HPP 26 | #define SFML_SENSORIMPL_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | #if defined(SFML_SYSTEM_WINDOWS) 35 | 36 | #include 37 | 38 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) 39 | 40 | #include 41 | 42 | #elif defined(SFML_SYSTEM_MACOS) 43 | 44 | #include 45 | 46 | #elif defined(SFML_SYSTEM_IOS) 47 | 48 | #include 49 | 50 | #elif defined(SFML_SYSTEM_ANDROID) 51 | 52 | #include 53 | 54 | #endif 55 | 56 | 57 | #endif // SFML_SENSORIMPL_HPP 58 | -------------------------------------------------------------------------------- /src/SFML/Window/Touch.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | //////////////////////////////////////////////////////////// 35 | bool Touch::isDown(unsigned int finger) 36 | { 37 | return priv::InputImpl::isTouchDown(finger); 38 | } 39 | 40 | 41 | //////////////////////////////////////////////////////////// 42 | Vector2i Touch::getPosition(unsigned int finger) 43 | { 44 | return priv::InputImpl::getTouchPosition(finger); 45 | } 46 | 47 | 48 | //////////////////////////////////////////////////////////// 49 | Vector2i Touch::getPosition(unsigned int finger, const Window& relativeTo) 50 | { 51 | return priv::InputImpl::getTouchPosition(finger, relativeTo); 52 | } 53 | 54 | } // namespace sf 55 | -------------------------------------------------------------------------------- /src/SFML/Window/Unix/GlxExtensions.txt: -------------------------------------------------------------------------------- 1 | // Created with: 2 | // https://bitbucket.org/KhronosGroup/glloadgen 3 | // Commit d143d66ac90d538ed06f806188714861b8e8e2f9 4 | // lua LoadGen.lua -style=pointer_c -spec=glX -indent=space -prefix=sf -extfile=GlxExtensions.txt GlxExtensions 5 | 6 | EXT_swap_control 7 | // MESA_swap_control 8 | SGI_swap_control 9 | EXT_framebuffer_sRGB 10 | ARB_framebuffer_sRGB 11 | GLX_ARB_multisample 12 | GLX_SGIX_pbuffer 13 | GLX_ARB_create_context 14 | GLX_ARB_create_context_profile 15 | -------------------------------------------------------------------------------- /src/SFML/Window/Unix/RPi/VideoModeImplRPi.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // 5 | // Raspberry Pi dispmanx implementation 6 | // Copyright (C) 2016 Andrew Mickelson 7 | // 8 | // This software is provided 'as-is', without any express or implied warranty. 9 | // In no event will the authors be held liable for any damages arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it freely, 13 | // subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; 16 | // you must not claim that you wrote the original software. 17 | // If you use this software in a product, an acknowledgment 18 | // in the product documentation would be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, 21 | // and must not be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source distribution. 24 | // 25 | //////////////////////////////////////////////////////////// 26 | 27 | //////////////////////////////////////////////////////////// 28 | // Headers 29 | //////////////////////////////////////////////////////////// 30 | #include 31 | #include 32 | 33 | namespace sf 34 | { 35 | namespace priv 36 | { 37 | //////////////////////////////////////////////////////////// 38 | std::vector VideoModeImpl::getFullscreenModes() 39 | { 40 | std::vector modes; 41 | modes.push_back(getDesktopMode()); 42 | return modes; 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | VideoMode VideoModeImpl::getDesktopMode() 48 | { 49 | static bool initialized=false; 50 | 51 | if (!initialized) 52 | { 53 | bcm_host_init(); 54 | initialized=true; 55 | } 56 | 57 | uint32_t width( 0 ), height( 0 ); 58 | graphics_get_display_size( 0 /* LCD */, &width, &height ); 59 | return VideoMode(width, height); 60 | } 61 | 62 | } // namespace priv 63 | 64 | } // namespace sf 65 | -------------------------------------------------------------------------------- /src/SFML/Window/Win32/WglExtensions.txt: -------------------------------------------------------------------------------- 1 | // Created with: 2 | // https://bitbucket.org/KhronosGroup/glloadgen 3 | // Commit d143d66ac90d538ed06f806188714861b8e8e2f9 4 | // lua LoadGen.lua -style=pointer_c -spec=wgl -indent=space -prefix=sf -extfile=WglExtensions.txt WglExtensions 5 | 6 | EXT_swap_control 7 | EXT_framebuffer_sRGB 8 | ARB_framebuffer_sRGB 9 | WGL_ARB_multisample 10 | WGL_ARB_pixel_format 11 | WGL_ARB_pbuffer 12 | WGL_ARB_create_context 13 | WGL_ARB_create_context_profile 14 | -------------------------------------------------------------------------------- /src/SFML/Window/iOS/ObjCType.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_OBJCTYPE_HPP 26 | #define SFML_OBJCTYPE_HPP 27 | 28 | 29 | // Forward declare an Objective-C class 30 | #ifdef __OBJC__ 31 | #define SFML_DECLARE_OBJC_CLASS(c) @class c 32 | #else 33 | #define SFML_DECLARE_OBJC_CLASS(c) typedef struct objc_object c 34 | #endif 35 | 36 | 37 | #endif // SFML_OBJCTYPE_HPP 38 | -------------------------------------------------------------------------------- /src/SFML/Window/iOS/SFMain.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SFMAIN_HPP 26 | #define SFML_SFMAIN_HPP 27 | 28 | 29 | int sfmlMain(int argc, char** argv); 30 | 31 | int sfmlMain(); 32 | 33 | 34 | #endif // SFML_SFMAIN_HPP 35 | 36 | -------------------------------------------------------------------------------- /src/SFML/Window/iOS/SFViewController.mm: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | @implementation SFViewController 32 | 33 | @synthesize orientationCanChange; 34 | 35 | 36 | //////////////////////////////////////////////////////////// 37 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 38 | { 39 | return self.orientationCanChange; 40 | } 41 | 42 | 43 | //////////////////////////////////////////////////////////// 44 | - (BOOL)shouldAutorotate 45 | { 46 | return self.orientationCanChange; 47 | } 48 | 49 | 50 | //////////////////////////////////////////////////////////// 51 | - (NSUInteger)supportedInterfaceOrientations 52 | { 53 | return UIInterfaceOrientationMaskAll; 54 | } 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /tools/android/clean_all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm -rf tmp 4 | rm -rf build 5 | rm -rf src 6 | rm -rf toolchains 7 | -------------------------------------------------------------------------------- /tools/android/compile_arm-v7a.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DESTDIR=$PWD/tmp/arm-v7a 4 | 5 | PATH=$PWD/toolchains/arm/bin:$PATH 6 | CC=arm-linux-androideabi-gcc 7 | CXX=arm-linux-androideabi-g++ 8 | CFLAGS="-I$DESTDIR/usr/include -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16" 9 | CPPFLAGS="-I$DESTDIR/usr/include -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16" 10 | LDFLAGS="-L$DESTDIR/usr/lib -march=armv7-a -Wl,--fix-cortex-a8" 11 | 12 | ./compile_libs.sh arm-v7a $PATH $CC $CXX "$CFLAGS" "$CPPFLAGS" "$LDFLAGS" 13 | -------------------------------------------------------------------------------- /tools/android/compile_arm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DESTDIR=$PWD/tmp/arm 4 | 5 | PATH=$PWD/toolchains/arm/bin:$PATH 6 | CC=arm-linux-androideabi-gcc 7 | CXX=arm-linux-androideabi-g++ 8 | CFLAGS=-I$DESTDIR/usr/include 9 | CPPFLAGS=-I$DESTDIR/usr/include 10 | LDFLAGS=-L$DESTDIR/usr/lib 11 | 12 | ./compile_libs.sh arm $PATH $CC $CXX $CFLAGS $CPPFLAGS $LDFLAGS 13 | -------------------------------------------------------------------------------- /tools/android/compile_libs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DESTDIR=$PWD/tmp 4 | LOCALDIR=$PWD 5 | 6 | OPATH=$PATH 7 | 8 | export PATH=$2 9 | export CC=$3 10 | export CXX=$4 11 | export CFLAGS=$5 12 | export CPPFLAGS=$6 13 | export LDFLAGS=$7 14 | 15 | if [ "$1" = "arm" ] 16 | then 17 | ARCH=arm-linux 18 | ANDROID_ABI=armeabi 19 | 20 | elif [ "$1" = "arm-v7a" ] 21 | then 22 | ARCH=arm-linux 23 | ANDROID_ABI=armeabi-v7a 24 | 25 | elif [ "$1" = "x86" ] 26 | then 27 | ARCH=i686-linux 28 | ANDROID_ABI=x86 29 | 30 | elif [ "$1" = "mips" ] 31 | then 32 | ARCH=mips-linux 33 | ANDROID_ABI=mips 34 | fi 35 | 36 | HOST="--host=$ARCH" 37 | PREFIX="--prefix=$DESTDIR/$1/usr need_version=no" 38 | 39 | # Compile OGG 40 | cd $LOCALDIR/build/libogg-* && sed -i 's/-version-info/-avoid-version/g' src/Makefile.in src/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install 41 | rm $DESTDIR/$1/usr/lib/libogg*.so* 42 | 43 | # Compile FLAC 44 | cd $LOCALDIR/build/flac-* && sed -i 's/-version-info/-avoid-version/g' src/libFLAC/Makefile.in src/libFLAC/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install 45 | rm $DESTDIR/$1/usr/lib/libFLAC*.so* 46 | 47 | # Compile VORBIS 48 | cd $LOCALDIR/build/libvorbis-* && sed -i 's/-version-info/-avoid-version/g' lib/Makefile.in lib/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install 49 | rm $DESTDIR/$1/usr/lib/libvorbis*.so* 50 | 51 | # Compile libsndfile (important: --disable-sqlite) 52 | cd $LOCALDIR/build/libsndfile-* && sed -i 's/-version-info/-avoid-version/g' src/Makefile.in src/Makefile.am && ./configure $HOST $PREFIX --disable-sqlite && make && make install 53 | 54 | # Compile freetype 55 | cd $LOCALDIR/build/freetype-* && sed -i 's/-version-info/-avoid-version/g' builds/unix/unix-cc.in && ./configure $HOST $PREFIX && make && make install 56 | 57 | # Compile OpenAL-Soft 58 | cd $LOCALDIR/build/openal-soft-android-master && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_CMAKE_TOOLCHAIN -DANDROID_ABI=$ANDROID_ABI -DANDROID_NATIVE_API_LEVEL=android-9 -DANDROID_USE_STLPORT=1 .. && make openal && mv libopenal.so $DESTDIR/$1/usr/lib 59 | 60 | export PATH=$OPATH 61 | -------------------------------------------------------------------------------- /tools/android/compile_mips.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DESTDIR=$PWD/tmp/mips 4 | 5 | PATH=$PWD/toolchains/mips/bin:$PATH 6 | CC=mipsel-linux-android-gcc 7 | CXX=mipsel-linux-android-g++ 8 | CFLAGS=-I$DESTDIR/usr/include 9 | CPPFLAGS=-I$DESTDIR/usr/include 10 | LDFLAGS=-L$DESTDIR/usr/lib 11 | 12 | ./compile_libs.sh mips $PATH $CC $CXX $CFLAGS $CPPFLAGS $LDFLAGS 13 | -------------------------------------------------------------------------------- /tools/android/compile_x86.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DESTDIR=$PWD/tmp/x86 4 | 5 | PATH=$PWD/toolchains/x86/bin:$PATH 6 | CC=i686-linux-android-gcc 7 | CXX=i686-linux-android-g++ 8 | CFLAGS=-I$DESTDIR/usr/include 9 | CPPFLAGS=-I$DESTDIR/usr/include 10 | LDFLAGS=-L$DESTDIR/usr/lib 11 | 12 | ./compile_libs.sh x86 $PATH $CC $CXX $CFLAGS $CPPFLAGS $LDFLAGS 13 | -------------------------------------------------------------------------------- /tools/android/create_toolchains.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | create_toolchain () { 4 | 5 | # abort if already created 6 | if [ -d "$PWD/toolchains/$2" ] 7 | then 8 | return 9 | fi 10 | 11 | # save the working directory and move to the NDK directory 12 | WORKING_DIRECTORY=$PWD 13 | cd $NDK 14 | 15 | # prepare the command according to chosen options 16 | PLATFORM=--platform=android-$1 17 | DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2 18 | MAKE=$NDK/build/tools/make-standalone-toolchain.sh 19 | 20 | if [ "$2" = "arm" ] 21 | then 22 | TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8 23 | elif [ "$2" = "x86" ] 24 | then 25 | TOOLCHAIN=--toolchain=x86-4.8 26 | elif [ "$2" = "mips" ] 27 | then 28 | TOOLCHAIN=--toolchain=mipsel-linux-android-4.8 29 | else 30 | echo "Abort." 31 | exit 1 32 | fi 33 | 34 | # create the standalone toolchain 35 | $MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++ 36 | 37 | # go back to our working directory 38 | cd $WORKING_DIRECTORY 39 | 40 | # move linux/soundcard.h to sys/soundcard.h 41 | mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys 42 | } 43 | 44 | create_toolchain 9 arm 45 | create_toolchain 9 x86 46 | create_toolchain 9 mips 47 | -------------------------------------------------------------------------------- /tools/android/download_sources.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | FLAC_VERSION=1.2.1 4 | VORBIS_VERSION=1.3.3 5 | OGG_VERSION=1.3.1 6 | 7 | FLAC=flac-$FLAC_VERSION 8 | VORBIS=libvorbis-$VORBIS_VERSION 9 | OGG=libogg-$OGG_VERSION 10 | 11 | SNDFILE_VERSION=1.0.25 12 | SNDFILE=libsndfile-$SNDFILE_VERSION 13 | 14 | FREETYPE_VERSION=2.4.0 15 | FREETYPE=freetype-$FREETYPE_VERSION 16 | 17 | mkdir build 18 | 19 | wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz 20 | if [ ! -d "$PWD/tmp/$FLAC" ] 21 | then 22 | tar -C build -xf src/$FLAC.tar.gz 23 | fi 24 | 25 | wget -nc -P src http://downloads.xiph.org/releases/vorbis/$VORBIS.tar.gz 26 | if [ ! -d "$PWD/tmp/$VORBIS" ] 27 | then 28 | tar -C build -xf src/$VORBIS.tar.gz 29 | fi 30 | 31 | wget -nc -P src http://downloads.xiph.org/releases/ogg/$OGG.tar.gz 32 | if [ ! -d "$PWD/tmp/$OGG" ] 33 | then 34 | tar -C build -xf src/$OGG.tar.gz 35 | fi 36 | 37 | wget -nc -P src http://www.mega-nerd.com/libsndfile/files/$SNDFILE.tar.gz 38 | if [ ! -d "$PWD/tmp/$SNDFILE" ] 39 | then 40 | tar -C build -xf src/$SNDFILE.tar.gz 41 | fi 42 | 43 | wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz 44 | if [ ! -d "$PWD/tmp/$FREETYPE" ] 45 | then 46 | tar -C build -xf src/$FREETYPE.tar.gz 47 | fi 48 | 49 | wget -nc -P src https://github.com/AerialX/openal-soft-android/archive/master.tar.gz 50 | if [ ! -d "$PWD/tmp/openal-soft-android-master" ] 51 | then 52 | tar -C build -xf src/master.tar.gz 53 | fi 54 | 55 | patch build/openal-soft-android-master/CMakeLists.txt patches/remove-so-version-suffix.diff 56 | -------------------------------------------------------------------------------- /tools/android/make_all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Abort if no known installation of NDK 4 | if [ "$NDK" == "" ] 5 | then 6 | echo "Where is the NDK location ?" 7 | echo -n "NDK: "; read NDK 8 | export NDK=$NDK 9 | fi 10 | 11 | export ANDROID_NDK=$NDK 12 | 13 | # Abort if we don't know the Android CMake toolchain location 14 | if [ "$ANDROID_CMAKE_TOOLCHAIN" == "" ] 15 | then 16 | echo "Where is the Android CMake toolchain ?" 17 | echo -n "ANDROID_CMAKE_TOOLCHAIN: "; read ANDROID_CMAKE_TOOLCHAIN 18 | export ANDROID_CMAKE_TOOLCHAIN=$ANDROID_CMAKE_TOOLCHAIN 19 | fi 20 | 21 | ./clean_all.sh 22 | 23 | ./create_toolchains.sh 24 | 25 | ./download_sources.sh 26 | ./compile_arm.sh 27 | 28 | rm -r $PWD/build 29 | ./download_sources.sh 30 | ./compile_x86.sh 31 | 32 | rm -r $PWD/build 33 | ./download_sources.sh 34 | ./compile_mips.sh 35 | 36 | rm -r $PWD/build 37 | ./download_sources.sh 38 | ./compile_arm-v7a.sh 39 | -------------------------------------------------------------------------------- /tools/android/patches/remove-so-version-suffix.diff: -------------------------------------------------------------------------------- 1 | --- CMakeLists.txt.orig 2013-09-21 15:23:49.305453804 +0200 2 | +++ CMakeLists.txt 2013-09-21 15:24:08.621454210 +0200 3 | @@ -717,9 +717,7 @@ 4 | # Build a library 5 | ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS}) 6 | SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES DEFINE_SYMBOL AL_BUILD_LIBRARY 7 | - COMPILE_FLAGS -DAL_ALEXT_PROTOTYPES 8 | - VERSION ${LIB_VERSION}.0 9 | - SOVERSION ${LIB_MAJOR_VERSION}) 10 | + COMPILE_FLAGS -DAL_ALEXT_PROTOTYPES) 11 | IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC") 12 | SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES PREFIX "") 13 | ENDIF() 14 | -------------------------------------------------------------------------------- /tools/android/readme.txt: -------------------------------------------------------------------------------- 1 | Compiling external libraries for Android can be a tedious task, especially for 2 | those who aren't familiar with the NDK, that's why we provide these scripts. 3 | 4 | IMPORTANT: Please, be careful when using these scripts! They are unpolished at 5 | the moment and you'll have to respect a simple rule: call these scripts from 6 | where they are. So, in that case, head yourself to tools/android, then call 7 | ./make_all.sh. 8 | 9 | Feel free to improve them or send patches. 10 | 11 | HOW-TO-USE: 12 | ----------- 13 | 1) Some of these scripts need an environement variable to work ($NDK) as well 14 | as the Android CMake toolchain you'll find in cmake/toolchains (android.toolchain.cmake) 15 | export NDK=/path/to/your/ndk 16 | export ANDROID_CMAKE_TOOLCHAIN=/path/to/android.toolchain.cmake 17 | 18 | 2) You'll need to make them executable, so: 19 | chmod +x *.sh 20 | 21 | 3) Type: ./make_all.sh which should create standalone toolchains, download the 22 | external libraries and compile them. 23 | 24 | These scripts will be improved over time. Meanwhile, you'll have to play with 25 | them if you want a customized behavior. 26 | 27 | Good luck! 28 | -------------------------------------------------------------------------------- /tools/pkg-config/sfml-all.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 4 | includedir=${prefix}/include 5 | 6 | Name: SFML-all 7 | Description: The Simple and Fast Multimedia Library, all modules. 8 | URL: http://www.sfml-dev.org 9 | Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ 10 | Requires: sfml-system, sfml-window, sfml-graphics, sfml-audio, sfml-network 11 | -------------------------------------------------------------------------------- /tools/pkg-config/sfml-audio.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 4 | includedir=${prefix}/include 5 | 6 | Name: SFML-audio 7 | Description: The Simple and Fast Multimedia Library, audio module. 8 | URL: http://www.sfml-dev.org 9 | Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ 10 | Requires: sfml-system 11 | Requires.private: openal, vorbisenc, vorbisfile, vorbis, ogg, flac 12 | Libs: -L${libdir} -lsfml-audio 13 | # openal may be a system framework 14 | Libs.private: @OPENAL_LIBRARY@ 15 | Cflags: -I${includedir} 16 | -------------------------------------------------------------------------------- /tools/pkg-config/sfml-graphics.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 4 | includedir=${prefix}/include 5 | 6 | Name: SFML-graphics 7 | Description: The Simple and Fast Multimedia Library, graphics module. 8 | URL: http://www.sfml-dev.org 9 | Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ 10 | Requires: sfml-window 11 | Requires.private: sfml-system, freetype2 12 | Libs: -L${libdir} -lsfml-graphics 13 | # gl may not be in pkg-config 14 | Libs.private: @OPENGL_gl_LIBRARY@ @OPENGL_glu_LIBRARY@ 15 | Cflags: -I${includedir} 16 | -------------------------------------------------------------------------------- /tools/pkg-config/sfml-network.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 4 | includedir=${prefix}/include 5 | 6 | Name: SFML-network 7 | Description: The Simple and Fast Multimedia Library, network module. 8 | URL: http://www.sfml-dev.org 9 | Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ 10 | Requires: sfml-system 11 | Libs: -L${libdir} -lsfml-network 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /tools/pkg-config/sfml-system.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 4 | includedir=${prefix}/include 5 | 6 | Name: SFML-system 7 | Description: The Simple and Fast Multimedia Library, system module. 8 | URL: http://www.sfml-dev.org 9 | Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ 10 | Libs: -L${libdir} -lsfml-system 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /tools/pkg-config/sfml-window.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 4 | includedir=${prefix}/include 5 | 6 | Name: SFML-window 7 | Description: The Simple and Fast Multimedia Library, window module. 8 | URL: http://www.sfml-dev.org 9 | Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ 10 | Requires: sfml-system 11 | Libs: -L${libdir} -lsfml-window 12 | # gl may not be in pkg-config 13 | Libs.private: @OPENGL_gl_LIBRARY@ @OPENGL_glu_LIBRARY@ 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | #ifndef RESOURCE_PATH_HPP 27 | #define RESOURCE_PATH_HPP 28 | 29 | //////////////////////////////////////////////////////////// 30 | // Headers 31 | //////////////////////////////////////////////////////////// 32 | #include 33 | 34 | //////////////////////////////////////////////////////////// 35 | /// \brief Return the path to the resource folder. 36 | /// 37 | /// \return The path to the resource folder associate 38 | /// with the main bundle or an empty string is there is no bundle. 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | std::string resourcePath(void); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.mm: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #include "ResourcePath.hpp" 30 | #import 31 | 32 | //////////////////////////////////////////////////////////// 33 | std::string resourcePath(void) 34 | { 35 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 36 | 37 | std::string rpath; 38 | NSBundle* bundle = [NSBundle mainBundle]; 39 | 40 | if (bundle == nil) { 41 | #ifdef DEBUG 42 | NSLog(@"bundle is nil... thus no resources path can be found."); 43 | #endif 44 | } else { 45 | NSString* path = [bundle resourcePath]; 46 | rpath = [path UTF8String] + std::string("/"); 47 | } 48 | 49 | [pool drain]; 50 | 51 | return rpath; 52 | } 53 | -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML App.xctemplate/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateIcon.icns -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML App.xctemplate/cute_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML App.xctemplate/cute_image.jpg -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML App.xctemplate/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML App.xctemplate/icon.png -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML App.xctemplate/nice_music.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML App.xctemplate/nice_music.ogg -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML App.xctemplate/sansation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML App.xctemplate/sansation.ttf -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML CLT.xctemplate/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML CLT.xctemplate/TemplateIcon.icns -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML CLT.xctemplate/cute_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML CLT.xctemplate/cute_image.jpg -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML CLT.xctemplate/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML CLT.xctemplate/icon.png -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML CLT.xctemplate/nice_music.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML CLT.xctemplate/nice_music.ogg -------------------------------------------------------------------------------- /tools/xcode/templates/SFML/SFML CLT.xctemplate/sansation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickelson/sfml-pi/754ed8fee142276608043cc08ba6fe92da5355a6/tools/xcode/templates/SFML/SFML CLT.xctemplate/sansation.ttf --------------------------------------------------------------------------------