Compare commits

..

39 commits

Author SHA1 Message Date
Lukas Dürrenberger 2f11710abc Updated the changelog and version number for 2.5.1 2018-10-15 21:41:39 +02:00
Jonny Paton 9fba1dff27 Add -ObjC flag to fix static linking on macOS 2018-10-15 21:07:19 +02:00
Lukas Dürrenberger 43f57b2f25 Disabled the JNI part due to compatibility issues 2018-10-11 22:27:11 +02:00
Ceylo 5189589ce2 Modernize iOS toolchain: remove BUILD_ARM64, drop support for Xcode <4.3 and don't pretend defining official CMake variables 2018-10-11 21:22:15 +02:00
Maxime Alvarez b47f738635 Fixed the error message when the wrong bitmap font size is selected 2018-10-04 22:25:54 +02:00
Lukas Dürrenberger cc3c748ab2 Due to binary compatibility in a patch release the iOS fix needs to be reverted
This reverts commit 08eb31e327.
2018-10-03 22:02:16 +02:00
Lukas Dürrenberger 95c9670d4c Fixed Windows cursor color conversion to be endian safe 2018-10-01 22:46:45 +02:00
binary1248 08eb31e327 Ensure the proper default framebuffer is bound when activating a RenderWindow. Fixes #1471. 2018-10-01 20:33:12 +02:00
Mario Liebisch 410c8aa5f5 Windows: Fixed swapped colors for custom cursors
Previously the red and blue color channels were swapped,
since Windows expects a different channel order for DIBs.

This fixes issue #1464.
2018-09-08 19:09:41 +02:00
Bloodsword c2008b2fb4 Use XRRSetCrtcConfig instead of XRRSetScreenConfig, in order to fix issue #1226. It should also fix issue #1224. 2018-09-08 18:58:07 +02:00
Christian Widmer 53e1bae7ce Window/Unix: Fix compilation with glxext header versions >=20180525
When mesa updated their headers, they changed the include guard
from __glxext_h_ to __glx_glxext_h_, which breaks compilation
due to conflicting declarations. This commit modifies the preprocessor
directives to allow for compilation with older and newer mesa header
versions.
Fixes: #1472
2018-08-28 20:37:27 +02:00
Jeff e4d3a536a2 Fix Deadlock in Android Main Cleanup 2018-08-28 20:25:47 +02:00
Jonny Paton d8952f28eb Disable autocorrect on iOS for issue #1473 2018-08-28 10:22:03 +02:00
Marco Antognini 9f7d8101a9 Improved macOS implementation for Cursor
- remove Wait and SizeAll cursors as they don't look nice
   (Wait is not spining and produces a broken rendering,
    SizeAll is a simple white cursor.)
 - fix memory management for NSCursor.
 - ignore selector warnings.
2018-08-28 10:21:48 +02:00
Jonny Paton 9c2e7cbb51 Implemented extra cursors on macOS 2018-08-28 10:21:36 +02:00
Jonny Paton 7823588b1b Remove reference to unused CMAKE_OSX_DEPLOYMENT_TARGET in cocoa example 2018-08-28 10:21:03 +02:00
Elias Daler 254a470346 Fix CMP0072 CMake warning - also allow user to set OpenGL_GL_PREFERENCE 2018-08-14 21:22:08 +02:00
Kwasior 21c6c64ecd Fix audio components linking order 2018-08-14 20:59:05 +02:00
Jonny Paton 40ddcac203 Removed unnecessary cmake osx deployment target value 2018-08-13 23:05:47 +02:00
Lukas Dürrenberger 37aee610c8 Fixed the installation of pkg-config files
* Removed duplicated CMake code
* Made it possible to manually specify the pkg-config path
* Install pkg-config files by default on Linux and BSD systems
2018-08-13 22:47:10 +02:00
PKEuS 0423bc4013 Reduced context locking&unlocking while creating textures 2018-08-13 22:31:18 +02:00
Radek Dutkiewicz cf34f4ae10 Fixed glyph cropping on sub-pixel positioning of text
Added 1 pixel padding for glyph uv's  and increased glyph quads boundaries by 1 pixel so the glyphs aren't cropped when text is being scrolled with sub-pixel increments
2018-08-09 23:28:38 +02:00
Mario Liebisch 0c4443a2c1 Squash duplicated sf::Font glyphs to single chars
Before this change, `sf::Font` always rendered/provided one character
per Unicode codepoint, even if that character wasn't represented by the
current font file or duplicated. This caused more texture space to be
used than necessary, which is especially apparent, when trying to render
a large amount of unhandled glyphs (the texture would literally fill up
with empty squares representing missing characters).
2018-08-09 23:18:21 +02:00
assematt a2002339a6 Fixed bug in sf::Text when applying an outline color/thickness
When applying an outline thickness to sf::Text in combination with a
strikethrough and/or an underlined style, the ensureGeometryUpdate
function adds unwanted vertices if the string contains two consecutive
'\n' charecter.
To fix this we need to add an additional check in the if statements to
check if both the current and previous character it's a new line
character.
2018-07-29 00:49:57 +02:00
Ironbell d97bbc38f2 Fixed two conversion warnings (C4267) 2018-07-28 20:01:18 +02:00
Jonny Paton 61078aa90b Fix config for finding dependencies on iOS 2018-07-28 18:30:56 +02:00
Ceylo 8aae69055a On iOS, make sure to be notified if you forgot to include <SFML/Main.hpp> 2018-07-28 18:28:11 +02:00
Jonny Paton 1b1ae8e48e Use default supported rotations when none are specified 2018-07-28 18:25:45 +02:00
Lionel Aimerie (Pixium Digital) fd071fb4ab ANDROID flag fix to SFML_SYSTEM_ANDROID 2018-07-28 18:10:52 +02:00
Bruno Van de Velde e26fc1bfd2 ANativeActivity_onCreate is not exported in sfml-main (fixes #1457) 2018-07-28 18:07:54 +02:00
binary1248 f843097fbe Fixed the Unix clipboard implementation causing an abort due to internal data races in Xlib. 2018-07-24 22:52:48 +02:00
Lukas Dürrenberger 33c26dd6e6 Fixed performance issue with reading WAV files
Calling tell() and thus std::ftell() for every reading iteration ate up
80-90% of the whole read call. By manually tracking the current position
the calls to tell() can be safely removed.
2018-07-02 22:32:17 +02:00
binary1248 4a41f37d5d Fixed stale FBOs not being erased from the staleFramebuffers set after they have been deleted. 2018-06-04 23:19:34 +02:00
binary1248 b9303866a6 Fixed RenderTexture::display() dereferencing a NULL pointer when being called before RenderTexture::create(). 2018-06-04 23:16:15 +02:00
binary1248 6e84b2d97d Fixed RenderWindow::setActive incorrectly trying to unbind an FBO during deactivation. 2018-06-02 21:09:34 +02:00
binary1248 f3d7468372 Fixed RenderTextureImplFBO's destructor incorrectly triggering deletion of other RenderTextureImplFBOs' active FBOs even when the context they reside in isn't being destroyed. 2018-06-02 21:09:27 +02:00
binary1248 8fea4fbfb4 Postpone generation of the RenderTarget ID to RenderTarget::initialize() so that a new ID is generated whenever the RenderTarget is re-create()ed. 2018-05-18 22:08:58 +02:00
James Cowgill bd7f30d0ba Install CMake config files into lib${LIB_SIFFIX} 2018-05-18 22:06:44 +02:00
Marty E. Plummer 89cf033a92 cmake/Macros.cmake: ex:->examples:
vim interprets the # ex: comments as a modeline, which causes editing
this file with vim to throw an error.

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
2018-05-18 22:02:31 +02:00
486 changed files with 7696 additions and 66965 deletions

View file

@ -1,55 +0,0 @@
name: CI
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.platform.name }} ${{ matrix.config.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- { name: Windows VS2017, os: windows-2016 }
- { name: Windows VS2019, os: windows-latest }
- { name: Linux GCC, os: ubuntu-latest }
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: MacOS XCode, os: macos-latest }
config:
- { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE }
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE }
include:
- platform: { name: MacOS XCode, os: macos-latest }
config: { name: Frameworks, flags: -DSFML_BUILD_FRAMEWORKS=TRUE }
- platform: { name: MacOS XCode, os: macos-latest }
config: { name: iOS, flags: -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchains/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR }
- platform: { name: Android, os: ubuntu-latest }
config: { name: x86, flags: -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
- platform: { name: Android, os: ubuntu-latest }
config: { name: armeabi-v7a, flags: -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev
- name: Install Android Components
if: matrix.platform.name == 'Android'
run: |
echo "y" | /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "cmake;3.10.2.4988404" --sdk_root=ANDROID_SDK_ROOT
sudo ln -sf /usr/local/lib/android/sdk/cmake/3.10.2.4988404/bin/cmake /usr/bin/cmake
wget -nv https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip -P $GITHUB_WORKSPACE
unzip -qq -d $GITHUB_WORKSPACE android-ndk-r18b-linux-x86_64.zip
- name: Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install -DSFML_BUILD_EXAMPLES=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DSFML_BUILD_TEST_SUITE=TRUE ${{matrix.platform.flags}} ${{matrix.config.flags}}
- name: Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/build --config Release --target install

View file

@ -1,134 +0,0 @@
language: cpp
addons:
apt_packages:
- cmake
- libxrandr-dev
- libxcursor-dev
- libudev-dev
- libopenal-dev
- libflac-dev
- libvorbis-dev
- g++
- clang
- libgl1-mesa-dev
before_script:
- mkdir build && cd build
- cmake .. $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=../install -DSFML_BUILD_EXAMPLES=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON
script:
- cmake --build . --target install
matrix:
include:
- name: "Linux gcc Dynamic"
os: linux
dist: xenial
compiler: gcc
env:
- CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE"
- name: "Linux gcc Static"
os: linux
dist: xenial
compiler: gcc
env:
- CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE"
- name: "Linux clang Dynamic"
os: linux
dist: xenial
compiler: clang
env:
- CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE"
- name: "Linux clang Static"
os: linux
dist: xenial
compiler: clang
env:
- CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE"
- name: "macOS Xcode 10 Dynamic"
os: osx
osx_image: xcode10
env:
- CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE"
- name: "macOS Xcode 10 Frameworks"
os: osx
osx_image: xcode10
env:
- CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE -DSFML_BUILD_FRAMEWORKS=TRUE"
- name: "macOS Xcode 10 Static"
os: osx
osx_image: xcode10
env:
- CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE -DBUILD_SHARED_LIBS=FALSE"
- name: "iOS Xcode 10"
os: osx
osx_image: xcode10
env:
- CMAKE_FLAGS="-GXcode -DSFML_BUILD_TEST_SUITE=TRUE -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR"
- name: "Visual Studio 15 2017 Dynamic"
os: windows
env:
- CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=FALSE"
- name: "Visual Studio 15 2017 Static"
os: windows
env:
- CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE"
- name: "Visual Studio 16 2019 Dynamic"
os: windows
env:
- CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=FALSE"
- MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
- VS160COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools"
- PATH=$MSBUILD_PATH:$PATH
install:
- choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
- choco install visualstudio2019-workload-nativedesktop
- name: "Visual Studio 16 2019 Static"
os: windows
env:
- CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE"
- MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
- VS160COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools"
- PATH=$MSBUILD_PATH:$PATH
install:
- choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
- choco install visualstudio2019-workload-nativedesktop
- name: "Android armeabi-v7a"
language: android
android: &androidComponents
components:
- tools
- platform-tools
- build-tools-26.0.1
env:
- CMAKE_FLAGS="-DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$TRAVIS_BUILD_DIR/android-ndk-r18b -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26"
install: &androidInstall
- echo y | sdkmanager "cmake;3.10.2.4988404"
- sudo ln -sf /usr/local/android-sdk/cmake/3.10.2.4988404/bin/cmake /usr/bin/cmake
- wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
- unzip -qq android-ndk-r18b-linux-x86_64.zip
- name: "Android x86"
language: android
android: *androidComponents
env:
- CMAKE_FLAGS="-DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$TRAVIS_BUILD_DIR/android-ndk-r18b -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26"
install: *androidInstall
notifications:
email: false

View file

@ -47,11 +47,6 @@ project(SFML)
# include the configuration file
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake)
# we use the paths from the cmake GNUInstallDirs module as defaults
# you can override these if you like
# https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
include(GNUInstallDirs)
# setup version numbers
set(VERSION_MAJOR 2)
set(VERSION_MINOR 5)
@ -89,24 +84,19 @@ if(SFML_BUILD_WINDOW)
sfml_set_option(SFML_OPENGL_ES ${OPENGL_ES} BOOL "TRUE to use an OpenGL ES implementation, FALSE to use a desktop OpenGL implementation")
endif()
# add an option for building the test suite
sfml_set_option(SFML_BUILD_TEST_SUITE FALSE BOOL "TRUE to build the SFML test suite, FALSE to ignore it")
# macOS specific options
# Mac OS X specific options
if(SFML_OS_MACOSX)
# add an option to build frameworks instead of dylibs (release only)
sfml_set_option(SFML_BUILD_FRAMEWORKS FALSE BOOL "TRUE to build SFML as frameworks libraries (release only), FALSE to build according to BUILD_SHARED_LIBS")
# add an option to let the user specify a custom directory for external frameworks installation
sfml_set_option(SFML_DEPENDENCIES_INSTALL_PREFIX "/Library/Frameworks" PATH "External frameworks (FLAC, Freetype, Vorbis, ...) installation directory")
# add an option to automatically install Xcode templates
sfml_set_option(SFML_INSTALL_XCODE_TEMPLATES FALSE BOOL "TRUE to automatically install the Xcode templates, FALSE to do nothing about it. The templates are compatible with Xcode 4 and 5.")
endif()
# iOS specific options
if(SFML_OS_IOS)
# At the moment the minimal deployement target version is 10.2 only because the externals for iOS were built with that requirement.
sfml_set_option(SFML_IOS_DEPLOYMENT_TARGET "10.2" STRING "The minimal iOS version that will be able to run the built binaries. Cannot be lower than 10.2.")
sfml_set_option(SFML_CODE_SIGN_IDENTITY "iPhone Developer" STRING "The code signing identity to use when building for a real device")
else()
# add an option to let the user specify a custom directory for external libraries installation
sfml_set_option(SFML_DEPENDENCIES_INSTALL_PREFIX "." PATH "External libraries (FLAC, Freetype, Vorbis, ...) installation directory")
endif()
# Android options
@ -124,8 +114,9 @@ if(SFML_OS_ANDROID)
# install everything in $NDK/sources/ because this path is appended by the NDK (convenient)
set(CMAKE_INSTALL_PREFIX ${CMAKE_ANDROID_NDK}/sources/third_party/sfml)
# we install libs in a subdirectory named after the ABI
set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CMAKE_ANDROID_ARCH_ABI}")
# we install libs in a subdirectory named after the ABI (lib/mips/*.so)
set(LIB_SUFFIX "/${CMAKE_ANDROID_ARCH_ABI}")
# pass shared STL configuration (if any)
if (CMAKE_ANDROID_STL_TYPE MATCHES "_shared")
add_definitions("-DSTL_LIBRARY=${CMAKE_ANDROID_STL_TYPE}")
@ -156,6 +147,9 @@ elseif(SFML_OS_MACOSX)
elseif(SFML_OS_ANDROID)
set(DEFAULT_INSTALL_MISC_DIR ${CMAKE_ANDROID_NDK}/sources/third_party/sfml)
endif()
# add an option to let the user specify a custom directory for doc, examples, licence, readme and other miscellaneous files
sfml_set_option(SFML_MISC_INSTALL_PREFIX "${DEFAULT_INSTALL_MISC_DIR}" PATH "Prefix installation path for miscellaneous files")
# force building sfml-window, if sfml-graphics module is built
if(SFML_BUILD_GRAPHICS AND NOT SFML_BUILD_WINDOW)
@ -279,14 +273,6 @@ endif()
if(SFML_BUILD_DOC)
add_subdirectory(doc)
endif()
if(SFML_BUILD_TEST_SUITE)
if (SFML_OS_IOS)
message( WARNING "Unit testing not supported on iOS")
else()
enable_testing()
add_subdirectory(test)
endif()
endif()
# on Linux and BSD-like OS, install pkg-config files by default
set(SFML_INSTALL_PKGCONFIG_DEFAULT FALSE)
@ -412,8 +398,8 @@ else()
COMPONENT devel)
endif()
install(FILES license.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES readme.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES license.md DESTINATION ${SFML_MISC_INSTALL_PREFIX})
install(FILES readme.md DESTINATION ${SFML_MISC_INSTALL_PREFIX})
# install 3rd-party libraries and tools
if(SFML_OS_WINDOWS)
@ -421,22 +407,22 @@ if(SFML_OS_WINDOWS)
if(NOT SFML_USE_SYSTEM_DEPS)
# install the binaries of SFML dependencies
if(ARCH_32BITS)
install(DIRECTORY extlibs/bin/x86/ DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY extlibs/bin/x86/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/bin)
if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14)
install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/lib)
elseif(SFML_COMPILER_MSVC)
install(DIRECTORY extlibs/libs-msvc-universal/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-msvc-universal/x86/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/lib)
else()
install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/lib)
endif()
elseif(ARCH_64BITS)
install(DIRECTORY extlibs/bin/x64/ DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY extlibs/bin/x64/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/bin)
if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14)
install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/lib)
elseif(SFML_COMPILER_MSVC)
install(DIRECTORY extlibs/libs-msvc-universal/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-msvc-universal/x64/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/lib)
else()
install(DIRECTORY extlibs/libs-mingw/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-mingw/x64/ DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX}/lib)
endif()
endif()
endif()
@ -445,33 +431,33 @@ elseif(SFML_OS_MACOSX)
# install extlibs dependencies only when used
if(SFML_BUILD_GRAPHICS)
if(FREETYPE_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/freetype.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX})
endif()
endif()
if(SFML_BUILD_AUDIO)
if(FLAC_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/FLAC.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/FLAC.framework DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-osx/Frameworks/FLAC.framework DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX})
endif()
if(OGG_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/ogg.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/ogg.framework DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-osx/Frameworks/ogg.framework DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX})
endif()
if(VORBIS_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbis.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/vorbis.framework DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-osx/Frameworks/vorbis.framework DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX})
endif()
if(VORBISENC_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbisenc.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisenc.framework DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisenc.framework DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX})
endif()
if(VORBISFILE_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbisfile.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisfile.framework DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisfile.framework DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX})
endif()
if(OPENAL_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/OpenAL.framework")
install(DIRECTORY "${OPENAL_LIBRARY}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY "${OPENAL_LIBRARY}" DESTINATION ${SFML_DEPENDENCIES_INSTALL_PREFIX})
endif()
endif()
@ -493,7 +479,7 @@ elseif(SFML_OS_MACOSX)
elseif(SFML_OS_IOS)
# fix CMake install rules broken for iOS (see http://public.kitware.com/Bug/view.php?id=12506)
install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/\$ENV{CONFIGURATION}/" DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/\$ENV{CONFIGURATION}/" DESTINATION lib${LIB_SUFFIX})
if(NOT SFML_USE_SYSTEM_DEPS)
# since the iOS libraries are built as static, we must install the SFML dependencies
@ -503,7 +489,7 @@ elseif(SFML_OS_IOS)
endif()
if(SFML_BUILD_AUDIO)
install(FILES extlibs/libs-ios/libflac.a
install(FILES extlibs/libs-ios/libflac.a
extlibs/libs-ios/libvorbis.a
extlibs/libs-ios/libogg.a
DESTINATION lib)

View file

@ -71,7 +71,7 @@ endif()
# set pkgconfig install directory
# this could be e.g. macports on mac or msys2 on windows etc.
set(SFML_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
set(SFML_PKGCONFIG_DIR "/lib${LIB_SUFFIX}/pkgconfig")
if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD)
set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig")

View file

@ -27,23 +27,6 @@ function(sfml_set_stdlib target)
endif()
endfunction()
function(sfml_set_common_ios_properties target)
# enable automatic reference counting on iOS
sfml_set_xcode_property(${target} CLANG_ENABLE_OBJC_ARC YES)
sfml_set_xcode_property(${target} IPHONEOS_DEPLOYMENT_TARGET "${SFML_IOS_DEPLOYMENT_TARGET}")
sfml_set_xcode_property(${target} CODE_SIGN_IDENTITY "${SFML_CODE_SIGN_IDENTITY}")
get_target_property(target_type ${target} TYPE)
if (target_type STREQUAL "EXECUTABLE")
set_target_properties(${target} PROPERTIES
MACOSX_BUNDLE TRUE # Bare executables are not usable on iOS, only bundle applications
MACOSX_BUNDLE_GUI_IDENTIFIER "org.sfml-dev.${target}" # If missing, trying to launch an example in simulator will make Xcode < 9.3 crash
MACOSX_BUNDLE_BUNDLE_NAME "${target}"
MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
)
endif()
endfunction()
# add a new target which is a SFML library
# example: sfml_add_library(sfml-graphics
# SOURCES sprite.cpp image.cpp ...
@ -157,8 +140,9 @@ macro(sfml_add_library target)
endif()
endif()
# enable automatic reference counting on iOS
if (SFML_OS_IOS)
sfml_set_common_ios_properties(${target})
set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
endif()
# sfml-activity library is our bootstrap activity and must not depend on stlport_shared
@ -175,9 +159,9 @@ macro(sfml_add_library target)
# add the install rule
install(TARGETS ${target} EXPORT SFMLConfigExport
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT bin
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
RUNTIME DESTINATION bin COMPONENT bin
LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT bin
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel
FRAMEWORK DESTINATION "." COMPONENT bin)
# add <project>/include as public include directory
@ -223,18 +207,7 @@ macro(sfml_add_example target)
add_executable(${target} WIN32 ${target_input})
target_link_libraries(${target} PRIVATE sfml-main)
elseif(THIS_GUI_APP AND SFML_OS_IOS)
# For iOS apps we need the launch screen storyboard,
# and a custom info.plist to use it
SET(LAUNCH_SCREEN "${CMAKE_SOURCE_DIR}/examples/assets/LaunchScreen.storyboard")
SET(LOGO "${CMAKE_SOURCE_DIR}/examples/assets/logo.png")
SET(INFO_PLIST "${CMAKE_SOURCE_DIR}/examples/assets/info.plist")
SET(ICONS "${CMAKE_SOURCE_DIR}/examples/assets/icon.icns")
add_executable(${target} MACOSX_BUNDLE ${target_input} ${LAUNCH_SCREEN} ${LOGO} ${ICONS})
set(RESOURCES ${LAUNCH_SCREEN} ${LOGO} ${ICONS})
set_target_properties(${target} PROPERTIES RESOURCE "${RESOURCES}"
MACOSX_BUNDLE_INFO_PLIST ${INFO_PLIST}
MACOSX_BUNDLE_ICON_FILE icon.icns)
add_executable(${target} MACOSX_BUNDLE ${target_input})
target_link_libraries(${target} PRIVATE sfml-main)
else()
add_executable(${target} ${target_input})
@ -257,53 +230,37 @@ macro(sfml_add_example target)
target_link_libraries(${target} PRIVATE ${THIS_DEPENDS})
endif()
if (SFML_OS_IOS)
sfml_set_common_ios_properties(${target})
# add the install rule
install(TARGETS ${target}
RUNTIME DESTINATION ${SFML_MISC_INSTALL_PREFIX}/examples/${target} COMPONENT examples
BUNDLE DESTINATION ${SFML_MISC_INSTALL_PREFIX}/examples/${target} COMPONENT examples)
# install the example's source code
install(FILES ${THIS_SOURCES}
DESTINATION ${SFML_MISC_INSTALL_PREFIX}/examples/${target}
COMPONENT examples)
if (THIS_RESOURCES_DIR)
# install the example's resources as well
get_filename_component(THIS_RESOURCES_DIR "${THIS_RESOURCES_DIR}" ABSOLUTE)
if(NOT EXISTS "${THIS_RESOURCES_DIR}")
message(FATAL_ERROR "Given resources directory to install does not exist: ${THIS_RESOURCES_DIR}")
endif()
install(DIRECTORY ${THIS_RESOURCES_DIR}
DESTINATION ${SFML_MISC_INSTALL_PREFIX}/examples/${target}
COMPONENT examples)
endif()
endmacro()
# add a new target which is a SFML test
# example: sfml_add_test(sfml-test
# ftp.cpp ...
# sfml-network)
function(sfml_add_test target SOURCES DEPENDS)
# set a source group for the source files
source_group("" FILES ${SOURCES})
# create the target
add_executable(${target} ${SOURCES})
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
set_target_properties(${target} PROPERTIES FOLDER "Tests")
# link the target to its SFML dependencies
if(DEPENDS)
target_link_libraries(${target} PRIVATE ${DEPENDS})
endif()
# Add the test
add_test(${target} ${target})
# If building shared libs on windows we must copy the dependencies into the folder
if (WIN32 AND BUILD_SHARED_LIBS)
foreach (DEPENDENCY ${DEPENDS})
add_custom_command(TARGET ${target} PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${DEPENDENCY}>
$<TARGET_FILE_DIR:${target}>)
endforeach()
endif()
endfunction()
# Create an interface library for an external dependency. This virtual target can provide
# link specifications and include directories to be used by dependees.
# The created INTERFACE library is tagged for export to be part of the generated SFMLConfig
# Usage: sfml_add_external(target_name
# [INCLUDE "extlibs/include"]
# [LINK "extlibs/libfoo/libfoo.a"])
function(sfml_add_external)
# Find the requested package and make an INTERFACE library from it
# Usage: sfml_find_package(wanted_target_name
# [INCLUDE "OPENGL_INCLUDE_DIR"]
# [LINK "OPENGL_gl_LIBRARY"])
function(sfml_find_package)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/")
list(GET ARGN 0 target)
list(REMOVE_AT ARGN 0)
@ -316,10 +273,16 @@ function(sfml_add_external)
message(FATAL_ERROR "Unknown arguments when calling sfml_import_library: ${THIS_UNPARSED_ARGUMENTS}")
endif()
if (SFML_OS_IOS)
find_host_package(${target} REQUIRED)
else()
find_package(${target} REQUIRED)
endif()
add_library(${target} INTERFACE)
if (THIS_INCLUDE)
foreach(include_dir IN LISTS THIS_INCLUDE)
foreach(include_dir IN LISTS "${THIS_INCLUDE}")
if (NOT include_dir)
message(FATAL_ERROR "No path given for include dir ${THIS_INCLUDE}")
endif()
@ -328,61 +291,16 @@ function(sfml_add_external)
endif()
if (THIS_LINK)
foreach(link_item IN LISTS THIS_LINK)
foreach(link_item IN LISTS ${THIS_LINK})
if (NOT link_item)
message(FATAL_ERROR "Missing item in ${THIS_LINK}")
endif()
target_link_libraries(${target} INTERFACE "$<BUILD_INTERFACE:${link_item}>")
endforeach()
endif()
install(TARGETS ${target} EXPORT SFMLConfigExport)
endfunction()
# Find the requested package and make an INTERFACE library from it
# The created INTERFACE library is tagged for export to be part of the generated SFMLConfig
# Usage: sfml_find_package(wanted_target_name
# [INCLUDE "OPENGL_INCLUDE_DIR"]
# [LINK "OPENGL_gl_LIBRARY"])
function(sfml_find_package)
list(GET ARGN 0 target)
list(REMOVE_AT ARGN 0)
if (TARGET ${target})
message(FATAL_ERROR "Target '${target}' is already defined")
endif()
cmake_parse_arguments(THIS "" "" "INCLUDE;LINK" ${ARGN})
if (THIS_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown arguments when calling sfml_import_library: ${THIS_UNPARSED_ARGUMENTS}")
endif()
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/")
if (SFML_OS_IOS)
find_host_package(${target} REQUIRED)
else()
find_package(${target} REQUIRED)
endif()
# Make sure to interpret the items in INCLUDE and LINK parameters. sfml_add_external()
# does not interpret given items in order to also accept parameters that must not be interpreted
set(LINK_LIST "")
if (THIS_LINK)
foreach(link_item IN LISTS THIS_LINK)
list(APPEND LINK_LIST "${${link_item}}")
endforeach()
endif()
set(INCLUDE_LIST "")
if (THIS_INCLUDE)
foreach(include_dir IN LISTS THIS_INCLUDE)
list(APPEND INCLUDE_LIST "${${include_dir}}")
endforeach()
endif()
sfml_add_external(${target} INCLUDE ${INCLUDE_LIST} LINK ${LINK_LIST})
endfunction()
# Generate a SFMLConfig.cmake file (and associated files) from the targets registered against
# the EXPORT name "SFMLConfigExport" (EXPORT parameter of install(TARGETS))
function(sfml_export_targets)
@ -407,7 +325,7 @@ function(sfml_export_targets)
if (SFML_BUILD_FRAMEWORKS)
set(config_package_location "SFML.framework/Resources/CMake")
else()
set(config_package_location ${CMAKE_INSTALL_LIBDIR}/cmake/SFML)
set(config_package_location lib${LIB_SUFFIX}/cmake/SFML)
endif()
configure_package_config_file("${CURRENT_DIR}/SFMLConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/SFMLConfig.cmake"
INSTALL_DESTINATION "${config_package_location}")
@ -425,3 +343,4 @@ function(sfml_export_targets)
DESTINATION ${config_package_location}
COMPONENT devel)
endfunction()

View file

@ -77,7 +77,7 @@ set(FIND_SFML_PATHS
/opt)
find_path(SFML_DOC_DIR SFML.tag
PATH_SUFFIXES SFML/doc share/doc/SFML
PATH_SUFFIXES SFML/doc share/SFML/doc
PATHS ${FIND_SFML_PATHS})

View file

@ -47,7 +47,6 @@ if(SFML_STATIC_LIBRARIES)
if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD)
sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "X11" SEARCH_NAMES "X11")
sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "Xrandr" SEARCH_NAMES "Xrandr")
sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "Xcursor" SEARCH_NAMES "Xcursor")
endif()
if(FIND_SFML_OS_LINUX)
@ -72,11 +71,11 @@ if(SFML_STATIC_LIBRARIES)
if(FIND_SFML_AUDIO_COMPONENT_INDEX GREATER -1)
sfml_bind_dependency(TARGET OpenAL FRIENDLY_NAME "OpenAL" SEARCH_NAMES "OpenAL" "openal" "openal32")
if (NOT FIND_SFML_OS_IOS)
sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile")
sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisEnc" SEARCH_NAMES "vorbisenc")
sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile")
sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "VorbisEnc" SEARCH_NAMES "vorbisenc")
endif()
sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Vorbis" SEARCH_NAMES "vorbis")
sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Ogg" SEARCH_NAMES "ogg")
sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "Vorbis" SEARCH_NAMES "vorbis")
sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "Ogg" SEARCH_NAMES "ogg")
sfml_bind_dependency(TARGET FLAC FRIENDLY_NAME "FLAC" SEARCH_NAMES "FLAC")
endif()

File diff suppressed because it is too large Load diff

View file

@ -52,14 +52,11 @@ add_custom_target(doc ALL
WORKING_DIRECTORY ${DOXYGEN_INPUT_DIR})
# setup install rules
install(FILES ${DOXYGEN_OUTPUT_DIR}/SFML.tag
DESTINATION ${CMAKE_INSTALL_DOCDIR}
COMPONENT doc)
install(DIRECTORY ${DOXYGEN_OUTPUT_DIR}/html
DESTINATION ${CMAKE_INSTALL_DOCDIR}
DESTINATION ${SFML_MISC_INSTALL_PREFIX}/doc
COMPONENT doc)
if(DOXYGEN_HHC_PROGRAM)
install(FILES ${DOXYGEN_OUTPUT_DIR}/sfml.chm
DESTINATION ${CMAKE_INSTALL_DOCDIR}
DESTINATION ${SFML_MISC_INSTALL_PREFIX}/doc
COMPONENT doc)
endif()

View file

@ -3,7 +3,7 @@
///
/// \section welcome Welcome
/// Welcome to the official SFML documentation. Here you will find a detailed
/// view of all the SFML classes and functions. <br/>
/// view of all the SFML <a href="./annotated.php">classes</a> and functions. <br/>
/// If you are looking for tutorials, you can visit the official website
/// at <a href="https://www.sfml-dev.org/">www.sfml-dev.org</a>.
///

View file

@ -1,5 +1,10 @@
# CLI based examples
if (NOT SFML_OS_IOS)
# iOS Demo
if(SFML_OS_IOS)
add_subdirectory(iOS)
else(SFML_OS_IOS)
# add the examples subdirectories
if(SFML_BUILD_NETWORK)
add_subdirectory(ftp)
add_subdirectory(sockets)
@ -11,31 +16,23 @@ if (NOT SFML_OS_IOS)
add_subdirectory(sound)
add_subdirectory(sound_capture)
endif()
endif()
# GUI based examples
if(SFML_BUILD_WINDOW)
add_subdirectory(window)
endif()
if(SFML_BUILD_GRAPHICS)
add_subdirectory(opengl)
if (NOT SFML_OS_IOS)
if(SFML_BUILD_WINDOW)
add_subdirectory(window)
endif()
if(SFML_BUILD_GRAPHICS)
add_subdirectory(joystick)
add_subdirectory(opengl)
add_subdirectory(shader)
add_subdirectory(island)
add_subdirectory(vulkan)
if(SFML_OS_WINDOWS)
add_subdirectory(win32)
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD)
add_subdirectory(X11)
elseif(SFML_OS_MACOSX)
add_subdirectory(cocoa)
endif()
endif()
if(SFML_OS_WINDOWS)
add_subdirectory(win32)
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD)
add_subdirectory(X11)
elseif(SFML_OS_MACOSX)
add_subdirectory(cocoa)
if(SFML_BUILD_GRAPHICS AND SFML_BUILD_AUDIO)
add_subdirectory(pong)
endif()
endif()
if(SFML_BUILD_GRAPHICS AND SFML_BUILD_AUDIO)
add_subdirectory(pong)
endif()
endif(SFML_OS_IOS)

View file

@ -7,4 +7,4 @@ set(SRC ${SRCROOT}/X11.cpp)
# define the X11 target
sfml_add_example(X11Example GUI_APP
SOURCES ${SRC}
DEPENDS sfml-window X11)
DEPENDS sfml-window OpenGL X11)

View file

@ -4,10 +4,7 @@
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>
#include <SFML/System/Err.hpp>
#define GLAD_GL_IMPLEMENTATION
#include "gl.h"
#include <SFML/OpenGL.hpp>
#include <X11/Xlib.h>
#include <iostream>
#include <cmath>
@ -26,13 +23,7 @@ void initialize(sf::Window& window)
// Setup OpenGL states
// Set color and depth clear value
#ifdef SFML_OPENGL_ES
glClearDepthf(1.f);
#else
glClearDepth(1.f);
#endif
glClearColor(0.f, 0.5f, 0.5f, 0.f);
// Enable Z-buffer read and write
@ -42,14 +33,9 @@ void initialize(sf::Window& window)
// Setup a perspective projection
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
static const float pi = 3.141592654f;
float extent = std::tan(90.0f * pi / 360.0f);
#ifdef SFML_OPENGL_ES
glFrustumf(-extent, extent, -extent, extent, 1.0f, 500.0f);
#else
glFrustum(-extent, extent, -extent, extent, 1.0f, 500.0f);
#endif
static const double pi = 3.141592654;
GLdouble extent = std::tan(90.0 * pi / 360.0);
glFrustum(-extent, extent, -extent, extent, 1.0, 500.0);
// Enable position and texture coordinates vertex components
glEnableClientState(GL_VERTEX_ARRAY);
@ -191,15 +177,6 @@ int main()
// Create a clock for measuring elapsed time
sf::Clock clock;
// Load OpenGL or OpenGL ES entry points using glad
sfmlView1.setActive();
#ifdef SFML_OPENGL_ES
gladLoadGLES1(reinterpret_cast<GLADloadfunc>(sf::Context::getFunction));
#else
gladLoadGL(reinterpret_cast<GLADloadfunc>(sf::Context::getFunction));
#endif
// Initialize our views
initialize(sfmlView1);
initialize(sfmlView2);
@ -233,13 +210,6 @@ int main()
sfmlView2.display();
}
// Close our SFML views before destroying the underlying window
sfmlView1.close();
sfmlView2.close();
// Destroy the window
XDestroyWindow(display, window);
// Close the display
XCloseDisplay(display);

File diff suppressed because it is too large Load diff

View file

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="ipad9_7" orientation="landscape">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="logo.png" translatesAutoresizingMaskIntoConstraints="NO" id="HXY-06-8aG">
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
</scene>
</scenes>
<resources>
<image name="logo.png" width="512" height="512"/>
</resources>
</document>

Binary file not shown.

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.sfml-dev.$(EXECUTABLE_NAME)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>2.5.1</string>
<key>CFBundleName</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com),
// Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com),
// Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com),
// Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com),
// Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com),
// Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com),
// Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com),
// Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com),
// Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com),
// Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com),
// Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.

View file

@ -25,7 +25,7 @@
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2007-2020 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License.</string>
<string>Copyright © 2007-2018 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>

View file

@ -0,0 +1,25 @@
set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/iOS)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
# All source files
set(SRC ${SRCROOT}/main.cpp)
set(RESOURCES
${SRCROOT}/resources/canary.wav
${SRCROOT}/resources/image.png
${SRCROOT}/resources/orchestral.ogg
${SRCROOT}/resources/sansation.ttf)
set_source_files_properties( ${RESOURCES} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources )
# Define the window target
sfml_add_example(ios_demo GUI_APP
SOURCES ${SRC} ${RESOURCES}
DEPENDS sfml-window sfml-system sfml-graphics sfml-audio
"-framework OpenGLES")
# The app needs an identifier and signing to work correctly
sfml_set_xcode_property(ios_demo CODE_SIGN_IDENTITY "iPhone Developer")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.sfml.ios_demo")

65
examples/iOS/main.cpp Normal file
View file

@ -0,0 +1,65 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Main.hpp>
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
sf::RenderWindow window(sf::VideoMode::getDesktopMode(), "");
sf::Texture texture;
if(!texture.loadFromFile("image.png"))
return EXIT_FAILURE;
sf::Sprite image(texture);
image.setPosition(0, 0);
image.setOrigin(texture.getSize().x/2, texture.getSize().y/2);
sf::Music music;
if(!music.openFromFile("canary.wav"))
return EXIT_FAILURE;
music.play();
sf::View view = window.getDefaultView();
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
switch (event.type)
{
case sf::Event::Closed:
window.close();
break;
case sf::Event::Resized:
view.setSize(event.size.width, event.size.height);
view.setCenter(event.size.width/2, event.size.height/2);
window.setView(view);
break;
case sf::Event::TouchBegan:
if (event.touch.finger == 0)
{
image.setPosition(event.touch.x, event.touch.y);
}
break;
}
}
window.clear(sf::Color::White);
window.draw(image);
window.display();
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Binary file not shown.

View file

@ -7,5 +7,5 @@ set(SRC ${SRCROOT}/Island.cpp)
# define the island target
sfml_add_example(island GUI_APP
SOURCES ${SRC}
DEPENDS sfml-graphics
RESOURCES_DIR resources)
DEPENDS sfml-graphics sfml-window sfml-system
RESOURCES_DIR resources)

View file

@ -7,5 +7,5 @@ set(SRC ${SRCROOT}/Joystick.cpp)
# define the joystick target
sfml_add_example(joystick GUI_APP
SOURCES ${SRC}
DEPENDS sfml-graphics
DEPENDS sfml-graphics sfml-window sfml-system
RESOURCES_DIR resources)

View file

@ -4,17 +4,8 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/opengl)
# all source files
set(SRC ${SRCROOT}/OpenGL.cpp)
if (SFML_OS_IOS)
set(RESOURCES
${CMAKE_CURRENT_SOURCE_DIR}/resources/background.jpg
${CMAKE_CURRENT_SOURCE_DIR}/resources/texture.jpg
${CMAKE_CURRENT_SOURCE_DIR}/resources/sansation.ttf)
set_source_files_properties(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif()
# define the opengl target
sfml_add_example(opengl GUI_APP
SOURCES ${SRC}
BUNDLE_RESOURCES ${RESOURCES}
DEPENDS sfml-graphics
DEPENDS sfml-graphics OpenGL
RESOURCES_DIR resources)

View file

@ -3,26 +3,12 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#define GLAD_GL_IMPLEMENTATION
#include "gl.h"
#ifdef SFML_SYSTEM_IOS
#include <SFML/Main.hpp>
#endif
#include <SFML/OpenGL.hpp>
#ifndef GL_SRGB8_ALPHA8
#define GL_SRGB8_ALPHA8 0x8C43
#endif
std::string resourcesDir()
{
#ifdef SFML_SYSTEM_IOS
return "";
#else
return "resources/";
#endif
}
////////////////////////////////////////////////////////////
/// Entry point of application
@ -49,13 +35,13 @@ int main()
// Create a sprite for the background
sf::Texture backgroundTexture;
backgroundTexture.setSrgb(sRgb);
if (!backgroundTexture.loadFromFile(resourcesDir() + "background.jpg"))
if (!backgroundTexture.loadFromFile("resources/background.jpg"))
return EXIT_FAILURE;
sf::Sprite background(backgroundTexture);
// Create some text to draw on top of our OpenGL object
sf::Font font;
if (!font.loadFromFile(resourcesDir() + "sansation.ttf"))
if (!font.loadFromFile("resources/sansation.ttf"))
return EXIT_FAILURE;
sf::Text text("SFML / OpenGL demo", font);
sf::Text sRgbInstructions("Press space to toggle sRGB conversion", font);
@ -69,7 +55,7 @@ int main()
// Load a texture to apply to our 3D cube
sf::Texture texture;
if (!texture.loadFromFile(resourcesDir() + "texture.jpg"))
if (!texture.loadFromFile("resources/texture.jpg"))
return EXIT_FAILURE;
// Attempt to generate a mipmap for our cube texture
@ -80,21 +66,10 @@ int main()
// Make the window the active window for OpenGL calls
window.setActive(true);
// Load OpenGL or OpenGL ES entry points using glad
#ifdef SFML_OPENGL_ES
gladLoadGLES1(reinterpret_cast<GLADloadfunc>(sf::Context::getFunction));
#else
gladLoadGL(reinterpret_cast<GLADloadfunc>(sf::Context::getFunction));
#endif
// Enable Z-buffer read and write
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
#ifdef SFML_OPENGL_ES
glClearDepthf(1.f);
#else
glClearDepth(1.f);
#endif
// Disable lighting
glDisable(GL_LIGHTING);
@ -106,11 +81,7 @@ int main()
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
GLfloat ratio = static_cast<float>(window.getSize().x) / window.getSize().y;
#ifdef SFML_OPENGL_ES
glFrustumf(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#else
glFrustum(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#endif
// Bind the texture
glEnable(GL_TEXTURE_2D);
@ -209,7 +180,7 @@ int main()
if (mipmapEnabled)
{
// We simply reload the texture to disable mipmapping
if (!texture.loadFromFile(resourcesDir() + "texture.jpg"))
if (!texture.loadFromFile("resources/texture.jpg"))
return EXIT_FAILURE;
mipmapEnabled = false;
@ -232,28 +203,13 @@ int main()
// Adjust the viewport when the window is resized
if (event.type == sf::Event::Resized)
{
sf::Vector2u textureSize = backgroundTexture.getSize();
// Make the window the active window for OpenGL calls
window.setActive(true);
glViewport(0, 0, event.size.width, event.size.height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
GLfloat ratio = static_cast<float>(event.size.width) / event.size.height;
#ifdef SFML_OPENGL_ES
glFrustumf(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#else
glFrustum(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#endif
// Make the window no longer the active window for OpenGL calls
window.setActive(false);
sf::View view;
view.setSize(textureSize.x, textureSize.y);
view.setCenter(textureSize.x/2.f, textureSize.y/2.f);
window.setView(view);
}
}
@ -268,17 +224,9 @@ int main()
// Clear the depth buffer
glClear(GL_DEPTH_BUFFER_BIT);
// We get the position of the mouse cursor (or touch), so that we can move the box accordingly
sf::Vector2i pos;
#ifdef SFML_SYSTEM_IOS
pos = sf::Touch::getPosition(0);
#else
pos = sf::Mouse::getPosition();
#endif
float x = pos.x * 200.f / window.getSize().x - 100.f;
float y = -pos.y * 200.f / window.getSize().y + 100.f;
// We get the position of the mouse cursor, so that we can move the box accordingly
float x = sf::Mouse::getPosition(window).x * 200.f / window.getSize().x - 100.f;
float y = -sf::Mouse::getPosition(window).y * 200.f / window.getSize().y + 100.f;
// Apply some transformations
glMatrixMode(GL_MODELVIEW);

File diff suppressed because it is too large Load diff

View file

@ -3,16 +3,9 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/pong)
# all source files
set(SRC ${SRCROOT}/Pong.cpp)
if (SFML_OS_IOS)
set(RESOURCES
${CMAKE_CURRENT_SOURCE_DIR}/resources/ball.wav
${CMAKE_CURRENT_SOURCE_DIR}/resources/sansation.ttf)
set_source_files_properties(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif()
# define the pong target
sfml_add_example(pong GUI_APP
SOURCES ${SRC}
BUNDLE_RESOURCES ${RESOURCES}
DEPENDS sfml-audio sfml-graphics
RESOURCES_DIR resources)

View file

@ -8,18 +8,6 @@
#include <ctime>
#include <cstdlib>
#ifdef SFML_SYSTEM_IOS
#include <SFML/Main.hpp>
#endif
std::string resourcesDir()
{
#ifdef SFML_SYSTEM_IOS
return "";
#else
return "resources/";
#endif
}
////////////////////////////////////////////////////////////
/// Entry point of application
@ -45,7 +33,7 @@ int main()
// Load the sounds used in the game
sf::SoundBuffer ballSoundBuffer;
if (!ballSoundBuffer.loadFromFile(resourcesDir() + "ball.wav"))
if (!ballSoundBuffer.loadFromFile("resources/ball.wav"))
return EXIT_FAILURE;
sf::Sound ballSound(ballSoundBuffer);
@ -75,7 +63,7 @@ int main()
// Load the text font
sf::Font font;
if (!font.loadFromFile(resourcesDir() + "sansation.ttf"))
if (!font.loadFromFile("resources/sansation.ttf"))
return EXIT_FAILURE;
// Initialize the pause message
@ -84,12 +72,7 @@ int main()
pauseMessage.setCharacterSize(40);
pauseMessage.setPosition(170.f, 150.f);
pauseMessage.setFillColor(sf::Color::White);
#ifdef SFML_SYSTEM_IOS
pauseMessage.setString("Welcome to SFML pong!\nTouch the screen to start the game");
#else
pauseMessage.setString("Welcome to SFML pong!\nPress space to start the game");
#endif
// Define the paddles properties
sf::Clock AITimer;
@ -116,8 +99,7 @@ int main()
}
// Space key pressed: play
if (((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Space)) ||
(event.type == sf::Event::TouchBegan))
if ((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Space))
{
if (!isPlaying)
{
@ -139,15 +121,6 @@ int main()
while (std::abs(std::cos(ballAngle)) < 0.7f);
}
}
// Window size changed, adjust view appropriately
if (event.type == sf::Event::Resized)
{
sf::View view;
view.setSize(gameWidth, gameHeight);
view.setCenter(gameWidth/2.f, gameHeight/2.f);
window.setView(view);
}
}
if (isPlaying)
@ -165,13 +138,6 @@ int main()
{
leftPaddle.move(0.f, paddleSpeed * deltaTime);
}
if (sf::Touch::isDown(0))
{
sf::Vector2i pos = sf::Touch::getPosition(0);
sf::Vector2f mappedPos = window.mapPixelToCoords(pos);
leftPaddle.setPosition(leftPaddle.getPosition().x, mappedPos.y);
}
// Move the computer's paddle
if (((rightPaddleSpeed < 0.f) && (rightPaddle.getPosition().y - paddleSize.y / 2 > 5.f)) ||
@ -196,22 +162,16 @@ int main()
float factor = ballSpeed * deltaTime;
ball.move(std::cos(ballAngle) * factor, std::sin(ballAngle) * factor);
#ifdef SFML_SYSTEM_IOS
const std::string inputString = "Touch the screen to restart";
#else
const std::string inputString = "Press space to restart or\nescape to exit";
#endif
// Check collisions between the ball and the screen
if (ball.getPosition().x - ballRadius < 0.f)
{
isPlaying = false;
pauseMessage.setString("You Lost!\n" + inputString);
pauseMessage.setString("You lost!\nPress space to restart or\nescape to exit");
}
if (ball.getPosition().x + ballRadius > gameWidth)
{
isPlaying = false;
pauseMessage.setString("You Won!\n" + inputString);
pauseMessage.setString("You won!\nPress space to restart or\nescape to exit");
}
if (ball.getPosition().y - ballRadius < 0.f)
{

View file

@ -1,11 +0,0 @@
set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/vulkan)
# all source files
set(SRC ${SRCROOT}/Vulkan.cpp)
# define the window target
sfml_add_example(vulkan GUI_APP
SOURCES ${SRC}
DEPENDS sfml-graphics
RESOURCES_DIR resources)

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,16 +0,0 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
layout(binding = 1) uniform sampler2D texSampler;
layout(location = 0) in vec4 fragColor;
layout(location = 1) in vec2 fragTexCoord;
layout(location = 0) out vec4 outColor;
void main() {
outColor = fragColor * texture(texSampler, fragTexCoord);
if (outColor.a < 0.5)
discard;
}

View file

@ -1,25 +0,0 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
layout(binding = 0) uniform UniformBufferObject {
mat4 model;
mat4 view;
mat4 proj;
} ubo;
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec4 inColor;
layout(location = 2) in vec2 inTexCoord;
layout(location = 0) out vec4 fragColor;
layout(location = 1) out vec2 fragTexCoord;
out gl_PerVertex {
vec4 gl_Position;
};
void main() {
gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
fragColor = inColor;
fragTexCoord = inTexCoord;
}

File diff suppressed because it is too large Load diff

View file

@ -122,10 +122,6 @@ int main()
}
}
// Close our SFML views before destroying the underlying window
SFMLView1.close();
SFMLView2.close();
// Destroy the main window (all its child controls will be destroyed)
DestroyWindow(window);

View file

@ -7,4 +7,4 @@ set(SRC ${SRCROOT}/Window.cpp)
# define the window target
sfml_add_example(window GUI_APP
SOURCES ${SRC}
DEPENDS sfml-window)
DEPENDS sfml-window OpenGL)

View file

@ -2,13 +2,8 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>
#include <SFML/OpenGL.hpp>
#define GLAD_GL_IMPLEMENTATION
#include "gl.h"
#ifdef SFML_SYSTEM_IOS
#include <SFML/Main.hpp>
#endif
////////////////////////////////////////////////////////////
/// Entry point of application
@ -28,19 +23,8 @@ int main()
// Make it the active window for OpenGL calls
window.setActive();
// Load OpenGL or OpenGL ES entry points using glad
#ifdef SFML_OPENGL_ES
gladLoadGLES1(reinterpret_cast<GLADloadfunc>(sf::Context::getFunction));
#else
gladLoadGL(reinterpret_cast<GLADloadfunc>(sf::Context::getFunction));
#endif
// Set the color and depth clear values
#ifdef SFML_OPENGL_ES
glClearDepthf(1.f);
#else
glClearDepth(1.f);
#endif
glClearColor(0.f, 0.f, 0.f, 1.f);
// Enable Z-buffer read and write
@ -58,11 +42,7 @@ int main()
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
GLfloat ratio = static_cast<float>(window.getSize().x) / window.getSize().y;
#ifdef SFML_OPENGL_ES
glFrustumf(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#else
glFrustum(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#endif
// Define a 3D cube (6 faces made of 2 triangles composed by 3 vertices)
GLfloat cube[] =
@ -141,17 +121,7 @@ int main()
// Resize event: adjust the viewport
if (event.type == sf::Event::Resized)
{
glViewport(0, 0, event.size.width, event.size.height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
GLfloat ratio = static_cast<float>(event.size.width) / event.size.height;
#ifdef SFML_OPENGL_ES
glFrustumf(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#else
glFrustum(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
#endif
}
}
// Clear the color and depth buffers

File diff suppressed because it is too large Load diff

11689
extlibs/headers/catch.hpp vendored

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,586 +0,0 @@
/**
* Loader generated by glad 2.0.0-beta on Wed Jul 17 02:23:29 2019
*
* Generator: C/C++
* Specification: wgl
* Extensions: 10
*
* APIs:
* - wgl=1.0
*
* Options:
* - MX_GLOBAL = False
* - ON_DEMAND = False
* - LOADER = True
* - ALIAS = True
* - HEADER_ONLY = True
* - DEBUG = False
* - MX = False
*
* Commandline:
* --api='wgl=1.0' --extensions='WGL_ARB_create_context,WGL_ARB_create_context_profile,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_swap_control' c --loader --alias --header-only
*
* Online:
* http://glad.sh/#api=wgl%3D1.0&extensions=WGL_ARB_create_context%2CWGL_ARB_create_context_profile%2CWGL_ARB_extensions_string%2CWGL_ARB_framebuffer_sRGB%2CWGL_ARB_multisample%2CWGL_ARB_pbuffer%2CWGL_ARB_pixel_format%2CWGL_EXT_extensions_string%2CWGL_EXT_framebuffer_sRGB%2CWGL_EXT_swap_control&generator=c&options=LOADER%2CALIAS%2CHEADER_ONLY
*
*/
#ifndef SF_GLAD_WGL_H_
#define SF_GLAD_WGL_H_
#include <windows.h>
#include <glad/gl.h>
#define SF_GLAD_WGL
#define GLAD_OPTION_WGL_LOADER
#define GLAD_OPTION_WGL_ALIAS
#define GLAD_OPTION_WGL_HEADER_ONLY
#ifdef __cplusplus
extern "C" {
#endif
#ifndef GLAD_PLATFORM_H_
#define GLAD_PLATFORM_H_
#ifndef GLAD_PLATFORM_WIN32
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
#define GLAD_PLATFORM_WIN32 1
#else
#define GLAD_PLATFORM_WIN32 0
#endif
#endif
#ifndef GLAD_PLATFORM_APPLE
#ifdef __APPLE__
#define GLAD_PLATFORM_APPLE 1
#else
#define GLAD_PLATFORM_APPLE 0
#endif
#endif
#ifndef GLAD_PLATFORM_EMSCRIPTEN
#ifdef __EMSCRIPTEN__
#define GLAD_PLATFORM_EMSCRIPTEN 1
#else
#define GLAD_PLATFORM_EMSCRIPTEN 0
#endif
#endif
#ifndef GLAD_PLATFORM_UWP
#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
#ifdef __has_include
#if __has_include(<winapifamily.h>)
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
#endif
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
#endif
#endif
#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
#include <winapifamily.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define GLAD_PLATFORM_UWP 1
#endif
#endif
#ifndef GLAD_PLATFORM_UWP
#define GLAD_PLATFORM_UWP 0
#endif
#endif
#ifdef __GNUC__
#define GLAD_GNUC_EXTENSION __extension__
#else
#define GLAD_GNUC_EXTENSION
#endif
#ifndef GLAD_API_CALL
#if defined(GLAD_API_CALL_EXPORT)
#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
#if defined(GLAD_API_CALL_EXPORT_BUILD)
#if defined(__GNUC__)
#define GLAD_API_CALL __attribute__ ((dllexport)) extern
#else
#define GLAD_API_CALL __declspec(dllexport) extern
#endif
#else
#if defined(__GNUC__)
#define GLAD_API_CALL __attribute__ ((dllimport)) extern
#else
#define GLAD_API_CALL __declspec(dllimport) extern
#endif
#endif
#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
#define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
#else
#define GLAD_API_CALL extern
#endif
#else
#define GLAD_API_CALL extern
#endif
#endif
#ifdef APIENTRY
#define GLAD_API_PTR APIENTRY
#elif GLAD_PLATFORM_WIN32
#define GLAD_API_PTR __stdcall
#else
#define GLAD_API_PTR
#endif
#ifndef GLAPI
#define GLAPI GLAD_API_CALL
#endif
#ifndef GLAPIENTRY
#define GLAPIENTRY GLAD_API_PTR
#endif
#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
#define GLAD_VERSION_MAJOR(version) (version / 10000)
#define GLAD_VERSION_MINOR(version) (version % 10000)
#define GLAD_GENERATOR_VERSION "2.0.0-beta"
typedef void (*GLADapiproc)(void);
typedef GLADapiproc (*GLADloadfunc)(const char *name);
typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name);
typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
#endif /* GLAD_PLATFORM_H_ */
#define ERROR_INVALID_PROFILE_ARB 0x2096
#define ERROR_INVALID_VERSION_ARB 0x2095
#define WGL_ACCELERATION_ARB 0x2003
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
#define WGL_ACCUM_BITS_ARB 0x201D
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
#define WGL_ACCUM_RED_BITS_ARB 0x201E
#define WGL_ALPHA_BITS_ARB 0x201B
#define WGL_ALPHA_SHIFT_ARB 0x201C
#define WGL_AUX_BUFFERS_ARB 0x2024
#define WGL_BLUE_BITS_ARB 0x2019
#define WGL_BLUE_SHIFT_ARB 0x201A
#define WGL_COLOR_BITS_ARB 0x2014
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
#define WGL_CONTEXT_FLAGS_ARB 0x2094
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGL_DEPTH_BITS_ARB 0x2022
#define WGL_DOUBLE_BUFFER_ARB 0x2011
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
#define WGL_FONT_LINES 0
#define WGL_FONT_POLYGONS 1
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
#define WGL_FULL_ACCELERATION_ARB 0x2027
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
#define WGL_GREEN_BITS_ARB 0x2017
#define WGL_GREEN_SHIFT_ARB 0x2018
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
#define WGL_NEED_PALETTE_ARB 0x2004
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
#define WGL_NO_ACCELERATION_ARB 0x2025
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
#define WGL_PBUFFER_LARGEST_ARB 0x2033
#define WGL_PBUFFER_LOST_ARB 0x2036
#define WGL_PBUFFER_WIDTH_ARB 0x2034
#define WGL_PIXEL_TYPE_ARB 0x2013
#define WGL_RED_BITS_ARB 0x2015
#define WGL_RED_SHIFT_ARB 0x2016
#define WGL_SAMPLES_ARB 0x2042
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
#define WGL_SHARE_ACCUM_ARB 0x200E
#define WGL_SHARE_DEPTH_ARB 0x200C
#define WGL_SHARE_STENCIL_ARB 0x200D
#define WGL_STENCIL_BITS_ARB 0x2023
#define WGL_STEREO_ARB 0x2012
#define WGL_SUPPORT_GDI_ARB 0x200F
#define WGL_SUPPORT_OPENGL_ARB 0x2010
#define WGL_SWAP_COPY_ARB 0x2029
#define WGL_SWAP_EXCHANGE_ARB 0x2028
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
#define WGL_SWAP_MAIN_PLANE 0x00000001
#define WGL_SWAP_METHOD_ARB 0x2007
#define WGL_SWAP_OVERLAY1 0x00000002
#define WGL_SWAP_OVERLAY10 0x00000400
#define WGL_SWAP_OVERLAY11 0x00000800
#define WGL_SWAP_OVERLAY12 0x00001000
#define WGL_SWAP_OVERLAY13 0x00002000
#define WGL_SWAP_OVERLAY14 0x00004000
#define WGL_SWAP_OVERLAY15 0x00008000
#define WGL_SWAP_OVERLAY2 0x00000004
#define WGL_SWAP_OVERLAY3 0x00000008
#define WGL_SWAP_OVERLAY4 0x00000010
#define WGL_SWAP_OVERLAY5 0x00000020
#define WGL_SWAP_OVERLAY6 0x00000040
#define WGL_SWAP_OVERLAY7 0x00000080
#define WGL_SWAP_OVERLAY8 0x00000100
#define WGL_SWAP_OVERLAY9 0x00000200
#define WGL_SWAP_UNDEFINED_ARB 0x202A
#define WGL_SWAP_UNDERLAY1 0x00010000
#define WGL_SWAP_UNDERLAY10 0x02000000
#define WGL_SWAP_UNDERLAY11 0x04000000
#define WGL_SWAP_UNDERLAY12 0x08000000
#define WGL_SWAP_UNDERLAY13 0x10000000
#define WGL_SWAP_UNDERLAY14 0x20000000
#define WGL_SWAP_UNDERLAY15 0x40000000
#define WGL_SWAP_UNDERLAY2 0x00020000
#define WGL_SWAP_UNDERLAY3 0x00040000
#define WGL_SWAP_UNDERLAY4 0x00080000
#define WGL_SWAP_UNDERLAY5 0x00100000
#define WGL_SWAP_UNDERLAY6 0x00200000
#define WGL_SWAP_UNDERLAY7 0x00400000
#define WGL_SWAP_UNDERLAY8 0x00800000
#define WGL_SWAP_UNDERLAY9 0x01000000
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
#define WGL_TRANSPARENT_ARB 0x200A
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
#define WGL_TYPE_COLORINDEX_ARB 0x202C
#define WGL_TYPE_RGBA_ARB 0x202B
struct _GPU_DEVICE {
DWORD cb;
CHAR DeviceName[32];
CHAR DeviceString[128];
DWORD Flags;
RECT rcVirtualScreen;
};
DECLARE_HANDLE(HPBUFFERARB);
DECLARE_HANDLE(HPBUFFEREXT);
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
DECLARE_HANDLE(HPVIDEODEV);
DECLARE_HANDLE(HPGPUNV);
DECLARE_HANDLE(HGPUNV);
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
typedef struct _GPU_DEVICE GPU_DEVICE;
typedef struct _GPU_DEVICE *PGPU_DEVICE;
#define WGL_VERSION_1_0 1
GLAD_API_CALL int SF_GLAD_WGL_VERSION_1_0;
#define WGL_ARB_create_context 1
GLAD_API_CALL int SF_GLAD_WGL_ARB_create_context;
#define WGL_ARB_create_context_profile 1
GLAD_API_CALL int SF_GLAD_WGL_ARB_create_context_profile;
#define WGL_ARB_extensions_string 1
GLAD_API_CALL int SF_GLAD_WGL_ARB_extensions_string;
#define WGL_ARB_framebuffer_sRGB 1
GLAD_API_CALL int SF_GLAD_WGL_ARB_framebuffer_sRGB;
#define WGL_ARB_multisample 1
GLAD_API_CALL int SF_GLAD_WGL_ARB_multisample;
#define WGL_ARB_pbuffer 1
GLAD_API_CALL int SF_GLAD_WGL_ARB_pbuffer;
#define WGL_ARB_pixel_format 1
GLAD_API_CALL int SF_GLAD_WGL_ARB_pixel_format;
#define WGL_EXT_extensions_string 1
GLAD_API_CALL int SF_GLAD_WGL_EXT_extensions_string;
#define WGL_EXT_framebuffer_sRGB 1
GLAD_API_CALL int SF_GLAD_WGL_EXT_framebuffer_sRGB;
#define WGL_EXT_swap_control 1
GLAD_API_CALL int SF_GLAD_WGL_EXT_swap_control;
typedef int (GLAD_API_PTR *PFNCHOOSEPIXELFORMATPROC)(HDC hDc, const PIXELFORMATDESCRIPTOR * pPfd);
typedef int (GLAD_API_PTR *PFNDESCRIBEPIXELFORMATPROC)(HDC hdc, int ipfd, UINT cjpfd, const PIXELFORMATDESCRIPTOR * ppfd);
typedef UINT (GLAD_API_PTR *PFNGETENHMETAFILEPIXELFORMATPROC)(HENHMETAFILE hemf, const PIXELFORMATDESCRIPTOR * ppfd);
typedef int (GLAD_API_PTR *PFNGETPIXELFORMATPROC)(HDC hdc);
typedef BOOL (GLAD_API_PTR *PFNSETPIXELFORMATPROC)(HDC hdc, int ipfd, const PIXELFORMATDESCRIPTOR * ppfd);
typedef BOOL (GLAD_API_PTR *PFNSWAPBUFFERSPROC)(HDC hdc);
typedef BOOL (GLAD_API_PTR *PFNWGLCHOOSEPIXELFORMATARBPROC)(HDC hdc, const int * piAttribIList, const FLOAT * pfAttribFList, UINT nMaxFormats, int * piFormats, UINT * nNumFormats);
typedef BOOL (GLAD_API_PTR *PFNWGLCOPYCONTEXTPROC)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask);
typedef HGLRC (GLAD_API_PTR *PFNWGLCREATECONTEXTPROC)(HDC hDc);
typedef HGLRC (GLAD_API_PTR *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC, HGLRC hShareContext, const int * attribList);
typedef HGLRC (GLAD_API_PTR *PFNWGLCREATELAYERCONTEXTPROC)(HDC hDc, int level);
typedef HPBUFFERARB (GLAD_API_PTR *PFNWGLCREATEPBUFFERARBPROC)(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int * piAttribList);
typedef BOOL (GLAD_API_PTR *PFNWGLDELETECONTEXTPROC)(HGLRC oldContext);
typedef BOOL (GLAD_API_PTR *PFNWGLDESCRIBELAYERPLANEPROC)(HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, const LAYERPLANEDESCRIPTOR * plpd);
typedef BOOL (GLAD_API_PTR *PFNWGLDESTROYPBUFFERARBPROC)(HPBUFFERARB hPbuffer);
typedef HGLRC (GLAD_API_PTR *PFNWGLGETCURRENTCONTEXTPROC)(void);
typedef HDC (GLAD_API_PTR *PFNWGLGETCURRENTDCPROC)(void);
typedef const char * (GLAD_API_PTR *PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
typedef const char * (GLAD_API_PTR *PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
typedef int (GLAD_API_PTR *PFNWGLGETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF * pcr);
typedef HDC (GLAD_API_PTR *PFNWGLGETPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer);
typedef BOOL (GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBFVARBPROC)(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int * piAttributes, FLOAT * pfValues);
typedef BOOL (GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int * piAttributes, int * piValues);
typedef PROC (GLAD_API_PTR *PFNWGLGETPROCADDRESSPROC)(LPCSTR lpszProc);
typedef int (GLAD_API_PTR *PFNWGLGETSWAPINTERVALEXTPROC)(void);
typedef BOOL (GLAD_API_PTR *PFNWGLMAKECURRENTPROC)(HDC hDc, HGLRC newContext);
typedef BOOL (GLAD_API_PTR *PFNWGLQUERYPBUFFERARBPROC)(HPBUFFERARB hPbuffer, int iAttribute, int * piValue);
typedef BOOL (GLAD_API_PTR *PFNWGLREALIZELAYERPALETTEPROC)(HDC hdc, int iLayerPlane, BOOL bRealize);
typedef int (GLAD_API_PTR *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer, HDC hDC);
typedef int (GLAD_API_PTR *PFNWGLSETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF * pcr);
typedef BOOL (GLAD_API_PTR *PFNWGLSHARELISTSPROC)(HGLRC hrcSrvShare, HGLRC hrcSrvSource);
typedef BOOL (GLAD_API_PTR *PFNWGLSWAPINTERVALEXTPROC)(int interval);
typedef BOOL (GLAD_API_PTR *PFNWGLSWAPLAYERBUFFERSPROC)(HDC hdc, UINT fuFlags);
typedef BOOL (GLAD_API_PTR *PFNWGLUSEFONTBITMAPSPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase);
typedef BOOL (GLAD_API_PTR *PFNWGLUSEFONTBITMAPSAPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase);
typedef BOOL (GLAD_API_PTR *PFNWGLUSEFONTBITMAPSWPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase);
typedef BOOL (GLAD_API_PTR *PFNWGLUSEFONTOUTLINESPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
typedef BOOL (GLAD_API_PTR *PFNWGLUSEFONTOUTLINESAPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
typedef BOOL (GLAD_API_PTR *PFNWGLUSEFONTOUTLINESWPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
GLAD_API_CALL PFNWGLCHOOSEPIXELFORMATARBPROC sf_glad_wglChoosePixelFormatARB;
#define wglChoosePixelFormatARB sf_glad_wglChoosePixelFormatARB
GLAD_API_CALL PFNWGLCREATECONTEXTATTRIBSARBPROC sf_glad_wglCreateContextAttribsARB;
#define wglCreateContextAttribsARB sf_glad_wglCreateContextAttribsARB
GLAD_API_CALL PFNWGLCREATEPBUFFERARBPROC sf_glad_wglCreatePbufferARB;
#define wglCreatePbufferARB sf_glad_wglCreatePbufferARB
GLAD_API_CALL PFNWGLDESTROYPBUFFERARBPROC sf_glad_wglDestroyPbufferARB;
#define wglDestroyPbufferARB sf_glad_wglDestroyPbufferARB
GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGARBPROC sf_glad_wglGetExtensionsStringARB;
#define wglGetExtensionsStringARB sf_glad_wglGetExtensionsStringARB
GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGEXTPROC sf_glad_wglGetExtensionsStringEXT;
#define wglGetExtensionsStringEXT sf_glad_wglGetExtensionsStringEXT
GLAD_API_CALL PFNWGLGETPBUFFERDCARBPROC sf_glad_wglGetPbufferDCARB;
#define wglGetPbufferDCARB sf_glad_wglGetPbufferDCARB
GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBFVARBPROC sf_glad_wglGetPixelFormatAttribfvARB;
#define wglGetPixelFormatAttribfvARB sf_glad_wglGetPixelFormatAttribfvARB
GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBIVARBPROC sf_glad_wglGetPixelFormatAttribivARB;
#define wglGetPixelFormatAttribivARB sf_glad_wglGetPixelFormatAttribivARB
GLAD_API_CALL PFNWGLGETSWAPINTERVALEXTPROC sf_glad_wglGetSwapIntervalEXT;
#define wglGetSwapIntervalEXT sf_glad_wglGetSwapIntervalEXT
GLAD_API_CALL PFNWGLQUERYPBUFFERARBPROC sf_glad_wglQueryPbufferARB;
#define wglQueryPbufferARB sf_glad_wglQueryPbufferARB
GLAD_API_CALL PFNWGLRELEASEPBUFFERDCARBPROC sf_glad_wglReleasePbufferDCARB;
#define wglReleasePbufferDCARB sf_glad_wglReleasePbufferDCARB
GLAD_API_CALL PFNWGLSWAPINTERVALEXTPROC sf_glad_wglSwapIntervalEXT;
#define wglSwapIntervalEXT sf_glad_wglSwapIntervalEXT
#ifdef __cplusplus
}
#endif
#endif
/* Source */
#ifdef SF_GLAD_WGL_IMPLEMENTATION
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef GLAD_IMPL_UTIL_C_
#define GLAD_IMPL_UTIL_C_
#ifdef _MSC_VER
#define GLAD_IMPL_UTIL_SSCANF sscanf_s
#else
#define GLAD_IMPL_UTIL_SSCANF sscanf
#endif
#endif /* GLAD_IMPL_UTIL_C_ */
int SF_GLAD_WGL_VERSION_1_0 = 0;
int SF_GLAD_WGL_ARB_create_context = 0;
int SF_GLAD_WGL_ARB_create_context_profile = 0;
int SF_GLAD_WGL_ARB_extensions_string = 0;
int SF_GLAD_WGL_ARB_framebuffer_sRGB = 0;
int SF_GLAD_WGL_ARB_multisample = 0;
int SF_GLAD_WGL_ARB_pbuffer = 0;
int SF_GLAD_WGL_ARB_pixel_format = 0;
int SF_GLAD_WGL_EXT_extensions_string = 0;
int SF_GLAD_WGL_EXT_framebuffer_sRGB = 0;
int SF_GLAD_WGL_EXT_swap_control = 0;
PFNWGLCHOOSEPIXELFORMATARBPROC sf_glad_wglChoosePixelFormatARB = NULL;
PFNWGLCREATECONTEXTATTRIBSARBPROC sf_glad_wglCreateContextAttribsARB = NULL;
PFNWGLCREATEPBUFFERARBPROC sf_glad_wglCreatePbufferARB = NULL;
PFNWGLDESTROYPBUFFERARBPROC sf_glad_wglDestroyPbufferARB = NULL;
PFNWGLGETEXTENSIONSSTRINGARBPROC sf_glad_wglGetExtensionsStringARB = NULL;
PFNWGLGETEXTENSIONSSTRINGEXTPROC sf_glad_wglGetExtensionsStringEXT = NULL;
PFNWGLGETPBUFFERDCARBPROC sf_glad_wglGetPbufferDCARB = NULL;
PFNWGLGETPIXELFORMATATTRIBFVARBPROC sf_glad_wglGetPixelFormatAttribfvARB = NULL;
PFNWGLGETPIXELFORMATATTRIBIVARBPROC sf_glad_wglGetPixelFormatAttribivARB = NULL;
PFNWGLGETSWAPINTERVALEXTPROC sf_glad_wglGetSwapIntervalEXT = NULL;
PFNWGLQUERYPBUFFERARBPROC sf_glad_wglQueryPbufferARB = NULL;
PFNWGLRELEASEPBUFFERDCARBPROC sf_glad_wglReleasePbufferDCARB = NULL;
PFNWGLSWAPINTERVALEXTPROC sf_glad_wglSwapIntervalEXT = NULL;
static void sf_glad_wgl_load_WGL_ARB_create_context(GLADuserptrloadfunc load, void *userptr) {
if(!SF_GLAD_WGL_ARB_create_context) return;
sf_glad_wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) load(userptr, "wglCreateContextAttribsARB");
}
static void sf_glad_wgl_load_WGL_ARB_extensions_string(GLADuserptrloadfunc load, void *userptr) {
if(!SF_GLAD_WGL_ARB_extensions_string) return;
sf_glad_wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) load(userptr, "wglGetExtensionsStringARB");
}
static void sf_glad_wgl_load_WGL_ARB_pbuffer(GLADuserptrloadfunc load, void *userptr) {
if(!SF_GLAD_WGL_ARB_pbuffer) return;
sf_glad_wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC) load(userptr, "wglCreatePbufferARB");
sf_glad_wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC) load(userptr, "wglDestroyPbufferARB");
sf_glad_wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC) load(userptr, "wglGetPbufferDCARB");
sf_glad_wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC) load(userptr, "wglQueryPbufferARB");
sf_glad_wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC) load(userptr, "wglReleasePbufferDCARB");
}
static void sf_glad_wgl_load_WGL_ARB_pixel_format(GLADuserptrloadfunc load, void *userptr) {
if(!SF_GLAD_WGL_ARB_pixel_format) return;
sf_glad_wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC) load(userptr, "wglChoosePixelFormatARB");
sf_glad_wglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC) load(userptr, "wglGetPixelFormatAttribfvARB");
sf_glad_wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC) load(userptr, "wglGetPixelFormatAttribivARB");
}
static void sf_glad_wgl_load_WGL_EXT_extensions_string(GLADuserptrloadfunc load, void *userptr) {
if(!SF_GLAD_WGL_EXT_extensions_string) return;
sf_glad_wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC) load(userptr, "wglGetExtensionsStringEXT");
}
static void sf_glad_wgl_load_WGL_EXT_swap_control(GLADuserptrloadfunc load, void *userptr) {
if(!SF_GLAD_WGL_EXT_swap_control) return;
sf_glad_wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC) load(userptr, "wglGetSwapIntervalEXT");
sf_glad_wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) load(userptr, "wglSwapIntervalEXT");
}
static void sf_glad_wgl_resolve_aliases(void) {
}
static int sf_glad_wgl_has_extension(HDC hdc, const char *ext) {
const char *terminator;
const char *loc;
const char *extensions;
if(wglGetExtensionsStringEXT == NULL && wglGetExtensionsStringARB == NULL)
return 0;
if(wglGetExtensionsStringARB == NULL || hdc == INVALID_HANDLE_VALUE)
extensions = wglGetExtensionsStringEXT();
else
extensions = wglGetExtensionsStringARB(hdc);
if(extensions == NULL || ext == NULL)
return 0;
while(1) {
loc = strstr(extensions, ext);
if(loc == NULL)
break;
terminator = loc + strlen(ext);
if((loc == extensions || *(loc - 1) == ' ') &&
(*terminator == ' ' || *terminator == '\0'))
{
return 1;
}
extensions = terminator;
}
return 0;
}
static GLADapiproc sf_glad_wgl_get_proc_from_userptr(void *userptr, const char* name) {
return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
}
static int sf_glad_wgl_find_extensions_wgl(HDC hdc) {
SF_GLAD_WGL_ARB_create_context = sf_glad_wgl_has_extension(hdc, "WGL_ARB_create_context");
SF_GLAD_WGL_ARB_create_context_profile = sf_glad_wgl_has_extension(hdc, "WGL_ARB_create_context_profile");
SF_GLAD_WGL_ARB_extensions_string = sf_glad_wgl_has_extension(hdc, "WGL_ARB_extensions_string");
SF_GLAD_WGL_ARB_framebuffer_sRGB = sf_glad_wgl_has_extension(hdc, "WGL_ARB_framebuffer_sRGB");
SF_GLAD_WGL_ARB_multisample = sf_glad_wgl_has_extension(hdc, "WGL_ARB_multisample");
SF_GLAD_WGL_ARB_pbuffer = sf_glad_wgl_has_extension(hdc, "WGL_ARB_pbuffer");
SF_GLAD_WGL_ARB_pixel_format = sf_glad_wgl_has_extension(hdc, "WGL_ARB_pixel_format");
SF_GLAD_WGL_EXT_extensions_string = sf_glad_wgl_has_extension(hdc, "WGL_EXT_extensions_string");
SF_GLAD_WGL_EXT_framebuffer_sRGB = sf_glad_wgl_has_extension(hdc, "WGL_EXT_framebuffer_sRGB");
SF_GLAD_WGL_EXT_swap_control = sf_glad_wgl_has_extension(hdc, "WGL_EXT_swap_control");
return 1;
}
static int sf_glad_wgl_find_core_wgl(void) {
int major = 1, minor = 0;
SF_GLAD_WGL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
return GLAD_MAKE_VERSION(major, minor);
}
static int gladLoadWGLUserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr) {
int version;
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) load(userptr, "wglGetExtensionsStringARB");
wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC) load(userptr, "wglGetExtensionsStringEXT");
if(wglGetExtensionsStringARB == NULL && wglGetExtensionsStringEXT == NULL) return 0;
version = sf_glad_wgl_find_core_wgl();
if (!sf_glad_wgl_find_extensions_wgl(hdc)) return 0;
sf_glad_wgl_load_WGL_ARB_create_context(load, userptr);
sf_glad_wgl_load_WGL_ARB_extensions_string(load, userptr);
sf_glad_wgl_load_WGL_ARB_pbuffer(load, userptr);
sf_glad_wgl_load_WGL_ARB_pixel_format(load, userptr);
sf_glad_wgl_load_WGL_EXT_extensions_string(load, userptr);
sf_glad_wgl_load_WGL_EXT_swap_control(load, userptr);
return version;
}
static int gladLoadWGL(HDC hdc, GLADloadfunc load) {
return gladLoadWGLUserPtr(hdc, sf_glad_wgl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
}
#ifdef SF_GLAD_WGL
static int gladLoaderLoadWGL(HDC hdc) {
return gladLoadWGLUserPtr(hdc, sf_glad_wgl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) wglGetProcAddress);
}
#endif /* SF_GLAD_WGL */
#endif /* SF_GLAD_WGL_IMPLEMENTATION */

View file

@ -1,170 +0,0 @@
//
// File: vk_icd.h
//
/*
* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef VKICD_H
#define VKICD_H
#include "vulkan.h"
#include <stdbool.h>
// Loader-ICD version negotiation API. Versions add the following features:
// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr
// or vk_icdNegotiateLoaderICDInterfaceVersion.
// Version 1 - Add support for vk_icdGetInstanceProcAddr.
// Version 2 - Add Loader/ICD Interface version negotiation
// via vk_icdNegotiateLoaderICDInterfaceVersion.
// Version 3 - Add ICD creation/destruction of KHR_surface objects.
// Version 4 - Add unknown physical device extension qyering via
// vk_icdGetPhysicalDeviceProcAddr.
// Version 5 - Tells ICDs that the loader is now paying attention to the
// application version of Vulkan passed into the ApplicationInfo
// structure during vkCreateInstance. This will tell the ICD
// that if the loader is older, it should automatically fail a
// call for any API version > 1.0. Otherwise, the loader will
// manually determine if it can support the expected version.
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 5
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this
// file directly, it won't be found.
#ifndef PFN_GetPhysicalDeviceProcAddr
typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName);
#endif
/*
* The ICD must reserve space for a pointer for the loader's dispatch
* table, at the start of <each object>.
* The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro.
*/
#define ICD_LOADER_MAGIC 0x01CDC0DE
typedef union {
uintptr_t loaderMagic;
void *loaderData;
} VK_LOADER_DATA;
static inline void set_loader_magic_value(void *pNewObject) {
VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
loader_info->loaderMagic = ICD_LOADER_MAGIC;
}
static inline bool valid_loader_magic_value(void *pNewObject) {
const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC;
}
/*
* Windows and Linux ICDs will treat VkSurfaceKHR as a pointer to a struct that
* contains the platform-specific connection and surface information.
*/
typedef enum {
VK_ICD_WSI_PLATFORM_MIR,
VK_ICD_WSI_PLATFORM_WAYLAND,
VK_ICD_WSI_PLATFORM_WIN32,
VK_ICD_WSI_PLATFORM_XCB,
VK_ICD_WSI_PLATFORM_XLIB,
VK_ICD_WSI_PLATFORM_ANDROID,
VK_ICD_WSI_PLATFORM_MACOS,
VK_ICD_WSI_PLATFORM_IOS,
VK_ICD_WSI_PLATFORM_DISPLAY
} VkIcdWsiPlatform;
typedef struct {
VkIcdWsiPlatform platform;
} VkIcdSurfaceBase;
#ifdef VK_USE_PLATFORM_MIR_KHR
typedef struct {
VkIcdSurfaceBase base;
MirConnection *connection;
MirSurface *mirSurface;
} VkIcdSurfaceMir;
#endif // VK_USE_PLATFORM_MIR_KHR
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
typedef struct {
VkIcdSurfaceBase base;
struct wl_display *display;
struct wl_surface *surface;
} VkIcdSurfaceWayland;
#endif // VK_USE_PLATFORM_WAYLAND_KHR
#ifdef VK_USE_PLATFORM_WIN32_KHR
typedef struct {
VkIcdSurfaceBase base;
HINSTANCE hinstance;
HWND hwnd;
} VkIcdSurfaceWin32;
#endif // VK_USE_PLATFORM_WIN32_KHR
#ifdef VK_USE_PLATFORM_XCB_KHR
typedef struct {
VkIcdSurfaceBase base;
xcb_connection_t *connection;
xcb_window_t window;
} VkIcdSurfaceXcb;
#endif // VK_USE_PLATFORM_XCB_KHR
#ifdef VK_USE_PLATFORM_XLIB_KHR
typedef struct {
VkIcdSurfaceBase base;
Display *dpy;
Window window;
} VkIcdSurfaceXlib;
#endif // VK_USE_PLATFORM_XLIB_KHR
#ifdef VK_USE_PLATFORM_ANDROID_KHR
typedef struct {
VkIcdSurfaceBase base;
struct ANativeWindow *window;
} VkIcdSurfaceAndroid;
#endif // VK_USE_PLATFORM_ANDROID_KHR
#ifdef VK_USE_PLATFORM_MACOS_MVK
typedef struct {
VkIcdSurfaceBase base;
const void *pView;
} VkIcdSurfaceMacOS;
#endif // VK_USE_PLATFORM_MACOS_MVK
#ifdef VK_USE_PLATFORM_IOS_MVK
typedef struct {
VkIcdSurfaceBase base;
const void *pView;
} VkIcdSurfaceIOS;
#endif // VK_USE_PLATFORM_IOS_MVK
typedef struct {
VkIcdSurfaceBase base;
VkDisplayModeKHR displayMode;
uint32_t planeIndex;
uint32_t planeStackIndex;
VkSurfaceTransformFlagBitsKHR transform;
float globalAlpha;
VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
VkExtent2D imageExtent;
} VkIcdSurfaceDisplay;
#endif // VKICD_H

View file

@ -1,195 +0,0 @@
//
// File: vk_layer.h
//
/*
* Copyright (c) 2015-2017 The Khronos Group Inc.
* Copyright (c) 2015-2017 Valve Corporation
* Copyright (c) 2015-2017 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/* Need to define dispatch table
* Core struct can then have ptr to dispatch table at the top
* Along with object ptrs for current and next OBJ
*/
#pragma once
#include "vulkan.h"
#if defined(__GNUC__) && __GNUC__ >= 4
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
#else
#define VK_LAYER_EXPORT
#endif
#define MAX_NUM_UNKNOWN_EXTS 250
// Loader-Layer version negotiation API. Versions add the following features:
// Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr
// or vk_icdNegotiateLoaderLayerInterfaceVersion.
// Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and
// vk_icdNegotiateLoaderLayerInterfaceVersion.
#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2
#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1
#define VK_CURRENT_CHAIN_VERSION 1
// Typedef for use in the interfaces below
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
// Version negotiation values
typedef enum VkNegotiateLayerStructType {
LAYER_NEGOTIATE_UNINTIALIZED = 0,
LAYER_NEGOTIATE_INTERFACE_STRUCT = 1,
} VkNegotiateLayerStructType;
// Version negotiation structures
typedef struct VkNegotiateLayerInterface {
VkNegotiateLayerStructType sType;
void *pNext;
uint32_t loaderLayerInterfaceVersion;
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr;
PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr;
} VkNegotiateLayerInterface;
// Version negotiation functions
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct);
// Function prototype for unknown physical device extension command
typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device);
// ------------------------------------------------------------------------------------------------
// CreateInstance and CreateDevice support structures
/* Sub type of structure for instance and device loader ext of CreateInfo.
* When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
* or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
* then VkLayerFunction indicates struct type pointed to by pNext
*/
typedef enum VkLayerFunction_ {
VK_LAYER_LINK_INFO = 0,
VK_LOADER_DATA_CALLBACK = 1
} VkLayerFunction;
typedef struct VkLayerInstanceLink_ {
struct VkLayerInstanceLink_ *pNext;
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr;
} VkLayerInstanceLink;
/*
* When creating the device chain the loader needs to pass
* down information about it's device structure needed at
* the end of the chain. Passing the data via the
* VkLayerDeviceInfo avoids issues with finding the
* exact instance being used.
*/
typedef struct VkLayerDeviceInfo_ {
void *device_info;
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
} VkLayerDeviceInfo;
typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
void *object);
typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
void *object);
typedef struct {
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
const void *pNext;
VkLayerFunction function;
union {
VkLayerInstanceLink *pLayerInfo;
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
} u;
} VkLayerInstanceCreateInfo;
typedef struct VkLayerDeviceLink_ {
struct VkLayerDeviceLink_ *pNext;
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr;
} VkLayerDeviceLink;
typedef struct {
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
const void *pNext;
VkLayerFunction function;
union {
VkLayerDeviceLink *pLayerInfo;
PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData;
} u;
} VkLayerDeviceCreateInfo;
#ifdef __cplusplus
extern "C" {
#endif
VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct);
typedef enum VkChainType {
VK_CHAIN_TYPE_UNKNOWN = 0,
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1,
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2,
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3,
} VkChainType;
typedef struct VkChainHeader {
VkChainType type;
uint32_t version;
uint32_t size;
} VkChainHeader;
typedef struct VkEnumerateInstanceExtensionPropertiesChain {
VkChainHeader header;
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *,
VkExtensionProperties *);
const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink;
#if defined(__cplusplus)
inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const {
return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties);
}
#endif
} VkEnumerateInstanceExtensionPropertiesChain;
typedef struct VkEnumerateInstanceLayerPropertiesChain {
VkChainHeader header;
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *);
const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink;
#if defined(__cplusplus)
inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const {
return pfnNextLayer(pNextLink, pPropertyCount, pProperties);
}
#endif
} VkEnumerateInstanceLayerPropertiesChain;
typedef struct VkEnumerateInstanceVersionChain {
VkChainHeader header;
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *);
const struct VkEnumerateInstanceVersionChain *pNextLink;
#if defined(__cplusplus)
inline VkResult CallDown(uint32_t *pApiVersion) const {
return pfnNextLayer(pNextLink, pApiVersion);
}
#endif
} VkEnumerateInstanceVersionChain;
#ifdef __cplusplus
}
#endif

View file

@ -1,92 +0,0 @@
//
// File: vk_platform.h
//
/*
** Copyright (c) 2014-2017 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef VK_PLATFORM_H_
#define VK_PLATFORM_H_
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
/*
***************************************************************************************************
* Platform-specific directives and type declarations
***************************************************************************************************
*/
/* Platform-specific calling convention macros.
*
* Platforms should define these so that Vulkan clients call Vulkan commands
* with the same calling conventions that the Vulkan implementation expects.
*
* VKAPI_ATTR - Placed before the return type in function declarations.
* Useful for C++11 and GCC/Clang-style function attribute syntax.
* VKAPI_CALL - Placed after the return type in function declarations.
* Useful for MSVC-style calling convention syntax.
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
*
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
*/
#if defined(_WIN32)
// On Windows, Vulkan commands use the stdcall convention
#define VKAPI_ATTR
#define VKAPI_CALL __stdcall
#define VKAPI_PTR VKAPI_CALL
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
// calling convention, i.e. float parameters are passed in registers. This
// is true even if the rest of the application passes floats on the stack,
// as it does by default when compiling for the armeabi-v7a NDK ABI.
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
#define VKAPI_CALL
#define VKAPI_PTR VKAPI_ATTR
#else
// On other platforms, use the default calling convention
#define VKAPI_ATTR
#define VKAPI_CALL
#define VKAPI_PTR
#endif
#include <stddef.h>
#if !defined(VK_NO_STDINT_H)
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#endif // !defined(VK_NO_STDINT_H)
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif

View file

@ -1,69 +0,0 @@
//
// File: vk_sdk_platform.h
//
/*
* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef VK_SDK_PLATFORM_H
#define VK_SDK_PLATFORM_H
#if defined(_WIN32)
#define NOMINMAX
#ifndef __cplusplus
#undef inline
#define inline __inline
#endif // __cplusplus
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
// C99:
// Microsoft didn't implement C99 in Visual Studio; but started adding it with
// VS2013. However, VS2013 still didn't have snprintf(). The following is a
// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
// "CMakeLists.txt" file).
// NOTE: This is fixed in Visual Studio 2015.
#define snprintf _snprintf
#endif
#define strdup _strdup
#endif // _WIN32
// Check for noexcept support using clang, with fallback to Windows or GCC version numbers
#ifndef NOEXCEPT
#if defined(__clang__)
#if __has_feature(cxx_noexcept)
#define HAS_NOEXCEPT
#endif
#else
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46
#define HAS_NOEXCEPT
#else
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS
#define HAS_NOEXCEPT
#endif
#endif
#endif
#ifdef HAS_NOEXCEPT
#define NOEXCEPT noexcept
#else
#define NOEXCEPT
#endif
#endif
#endif // VK_SDK_PLATFORM_H

View file

@ -1,79 +0,0 @@
#ifndef VULKAN_H_
#define VULKAN_H_ 1
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#include "vk_platform.h"
#include "vulkan_core.h"
#ifdef VK_USE_PLATFORM_ANDROID_KHR
#include "vulkan_android.h"
#endif
#ifdef VK_USE_PLATFORM_IOS_MVK
#include "vulkan_ios.h"
#endif
#ifdef VK_USE_PLATFORM_MACOS_MVK
#include "vulkan_macos.h"
#endif
#ifdef VK_USE_PLATFORM_MIR_KHR
#include <mir_toolkit/client_types.h>
#include "vulkan_mir.h"
#endif
#ifdef VK_USE_PLATFORM_VI_NN
#include "vulkan_vi.h"
#endif
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
#include <wayland-client.h>
#include "vulkan_wayland.h"
#endif
#ifdef VK_USE_PLATFORM_WIN32_KHR
#include <windows.h>
#include "vulkan_win32.h"
#endif
#ifdef VK_USE_PLATFORM_XCB_KHR
#include <xcb/xcb.h>
#include "vulkan_xcb.h"
#endif
#ifdef VK_USE_PLATFORM_XLIB_KHR
#include <X11/Xlib.h>
#include "vulkan_xlib.h"
#endif
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#include "vulkan_xlib_xrandr.h"
#endif
#endif // VULKAN_H_

View file

@ -1,126 +0,0 @@
#ifndef VULKAN_ANDROID_H_
#define VULKAN_ANDROID_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_android_surface 1
struct ANativeWindow;
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
typedef struct VkAndroidSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkAndroidSurfaceCreateFlagsKHR flags;
struct ANativeWindow* window;
} VkAndroidSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
VkInstance instance,
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#define VK_ANDROID_external_memory_android_hardware_buffer 1
struct AHardwareBuffer;
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
typedef struct VkAndroidHardwareBufferUsageANDROID {
VkStructureType sType;
void* pNext;
uint64_t androidHardwareBufferUsage;
} VkAndroidHardwareBufferUsageANDROID;
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
VkStructureType sType;
void* pNext;
VkDeviceSize allocationSize;
uint32_t memoryTypeBits;
} VkAndroidHardwareBufferPropertiesANDROID;
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
VkStructureType sType;
void* pNext;
VkFormat format;
uint64_t externalFormat;
VkFormatFeatureFlags formatFeatures;
VkComponentMapping samplerYcbcrConversionComponents;
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
VkSamplerYcbcrRange suggestedYcbcrRange;
VkChromaLocation suggestedXChromaOffset;
VkChromaLocation suggestedYChromaOffset;
} VkAndroidHardwareBufferFormatPropertiesANDROID;
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
VkStructureType sType;
const void* pNext;
struct AHardwareBuffer* buffer;
} VkImportAndroidHardwareBufferInfoANDROID;
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
typedef struct VkExternalFormatANDROID {
VkStructureType sType;
void* pNext;
uint64_t externalFormat;
} VkExternalFormatANDROID;
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
VkDevice device,
const struct AHardwareBuffer* buffer,
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
VkDevice device,
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
struct AHardwareBuffer** pBuffer);
#endif
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,58 +0,0 @@
#ifndef VULKAN_IOS_H_
#define VULKAN_IOS_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_MVK_ios_surface 1
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
typedef struct VkIOSSurfaceCreateInfoMVK {
VkStructureType sType;
const void* pNext;
VkIOSSurfaceCreateFlagsMVK flags;
const void* pView;
} VkIOSSurfaceCreateInfoMVK;
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
VkInstance instance,
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,58 +0,0 @@
#ifndef VULKAN_MACOS_H_
#define VULKAN_MACOS_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_MVK_macos_surface 1
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
typedef struct VkMacOSSurfaceCreateInfoMVK {
VkStructureType sType;
const void* pNext;
VkMacOSSurfaceCreateFlagsMVK flags;
const void* pView;
} VkMacOSSurfaceCreateInfoMVK;
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
VkInstance instance,
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,65 +0,0 @@
#ifndef VULKAN_MIR_H_
#define VULKAN_MIR_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_mir_surface 1
#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface"
typedef VkFlags VkMirSurfaceCreateFlagsKHR;
typedef struct VkMirSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkMirSurfaceCreateFlagsKHR flags;
MirConnection* connection;
MirSurface* mirSurface;
} VkMirSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
VkInstance instance,
const VkMirSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
MirConnection* connection);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,58 +0,0 @@
#ifndef VULKAN_VI_H_
#define VULKAN_VI_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_NN_vi_surface 1
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
typedef VkFlags VkViSurfaceCreateFlagsNN;
typedef struct VkViSurfaceCreateInfoNN {
VkStructureType sType;
const void* pNext;
VkViSurfaceCreateFlagsNN flags;
void* window;
} VkViSurfaceCreateInfoNN;
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
VkInstance instance,
const VkViSurfaceCreateInfoNN* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,65 +0,0 @@
#ifndef VULKAN_WAYLAND_H_
#define VULKAN_WAYLAND_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_wayland_surface 1
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
typedef struct VkWaylandSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWaylandSurfaceCreateFlagsKHR flags;
struct wl_display* display;
struct wl_surface* surface;
} VkWaylandSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
VkInstance instance,
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
struct wl_display* display);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,276 +0,0 @@
#ifndef VULKAN_WIN32_H_
#define VULKAN_WIN32_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_win32_surface 1
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
typedef struct VkWin32SurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWin32SurfaceCreateFlagsKHR flags;
HINSTANCE hinstance;
HWND hwnd;
} VkWin32SurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex);
#endif
#define VK_KHR_external_memory_win32 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
typedef struct VkImportMemoryWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportMemoryWin32HandleInfoKHR;
typedef struct VkExportMemoryWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportMemoryWin32HandleInfoKHR;
typedef struct VkMemoryWin32HandlePropertiesKHR {
VkStructureType sType;
void* pNext;
uint32_t memoryTypeBits;
} VkMemoryWin32HandlePropertiesKHR;
typedef struct VkMemoryGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
VkDevice device,
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
HANDLE handle,
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#endif
#define VK_KHR_win32_keyed_mutex 1
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t acquireCount;
const VkDeviceMemory* pAcquireSyncs;
const uint64_t* pAcquireKeys;
const uint32_t* pAcquireTimeouts;
uint32_t releaseCount;
const VkDeviceMemory* pReleaseSyncs;
const uint64_t* pReleaseKeys;
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
#define VK_KHR_external_semaphore_win32 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkSemaphoreImportFlags flags;
VkExternalSemaphoreHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportSemaphoreWin32HandleInfoKHR;
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportSemaphoreWin32HandleInfoKHR;
typedef struct VkD3D12FenceSubmitInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t waitSemaphoreValuesCount;
const uint64_t* pWaitSemaphoreValues;
uint32_t signalSemaphoreValuesCount;
const uint64_t* pSignalSemaphoreValues;
} VkD3D12FenceSubmitInfoKHR;
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkExternalSemaphoreHandleTypeFlagBits handleType;
} VkSemaphoreGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
VkDevice device,
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
VkDevice device,
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
#endif
#define VK_KHR_external_fence_win32 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
typedef struct VkImportFenceWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkFence fence;
VkFenceImportFlags flags;
VkExternalFenceHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportFenceWin32HandleInfoKHR;
typedef struct VkExportFenceWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportFenceWin32HandleInfoKHR;
typedef struct VkFenceGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkFence fence;
VkExternalFenceHandleTypeFlagBits handleType;
} VkFenceGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
VkDevice device,
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
VkDevice device,
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
#endif
#define VK_NV_external_memory_win32 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
typedef struct VkImportMemoryWin32HandleInfoNV {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagsNV handleType;
HANDLE handle;
} VkImportMemoryWin32HandleInfoNV;
typedef struct VkExportMemoryWin32HandleInfoNV {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
} VkExportMemoryWin32HandleInfoNV;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
VkDevice device,
VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagsNV handleType,
HANDLE* pHandle);
#endif
#define VK_NV_win32_keyed_mutex 1
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
VkStructureType sType;
const void* pNext;
uint32_t acquireCount;
const VkDeviceMemory* pAcquireSyncs;
const uint64_t* pAcquireKeys;
const uint32_t* pAcquireTimeoutMilliseconds;
uint32_t releaseCount;
const VkDeviceMemory* pReleaseSyncs;
const uint64_t* pReleaseKeys;
} VkWin32KeyedMutexAcquireReleaseInfoNV;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,66 +0,0 @@
#ifndef VULKAN_XCB_H_
#define VULKAN_XCB_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_xcb_surface 1
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
typedef struct VkXcbSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkXcbSurfaceCreateFlagsKHR flags;
xcb_connection_t* connection;
xcb_window_t window;
} VkXcbSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
VkInstance instance,
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
xcb_connection_t* connection,
xcb_visualid_t visual_id);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,66 +0,0 @@
#ifndef VULKAN_XLIB_H_
#define VULKAN_XLIB_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_xlib_surface 1
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
typedef struct VkXlibSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkXlibSurfaceCreateFlagsKHR flags;
Display* dpy;
Window window;
} VkXlibSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
VkInstance instance,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
Display* dpy,
VisualID visualID);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,54 +0,0 @@
#ifndef VULKAN_XLIB_XRANDR_H_
#define VULKAN_XLIB_XRANDR_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_EXT_acquire_xlib_display 1
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
VkDisplayKHR display);
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
RROutput rrOutput,
VkDisplayKHR* pDisplay);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -195,24 +195,24 @@ public:
////////////////////////////////////////////////////////////
Uint64 read(Int16* samples, Uint64 maxCount);
private:
////////////////////////////////////////////////////////////
/// \brief Close the current file
///
////////////////////////////////////////////////////////////
void close();
private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
SoundFileReader* m_reader; //!< Reader that handles I/O on the file's format
InputStream* m_stream; //!< Input stream used to access the file's data
bool m_streamOwned; //!< Is the stream internal or external?
Uint64 m_sampleOffset; //!< Sample Read Position
Uint64 m_sampleCount; //!< Total number of samples in the file
unsigned int m_channelCount; //!< Number of channels of the sound
unsigned int m_sampleRate; //!< Number of samples per second
SoundFileReader* m_reader; ///< Reader that handles I/O on the file's format
InputStream* m_stream; ///< Input stream used to access the file's data
bool m_streamOwned; ///< Is the stream internal or external?
Uint64 m_sampleOffset; ///< Sample Read Position
Uint64 m_sampleCount; ///< Total number of samples in the file
unsigned int m_channelCount; ///< Number of channels of the sound
unsigned int m_sampleRate; ///< Number of samples per second
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -79,8 +79,8 @@ public:
}
T offset; //!< The beginning offset of the time range
T length; //!< The length of the time range
T offset; ///< The beginning offset of the time range
T length; ///< The length of the time range
};
// Define the relevant Span types
@ -276,10 +276,10 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
InputSoundFile m_file; //!< The streamed music file
std::vector<Int16> m_samples; //!< Temporary buffer of samples
Mutex m_mutex; //!< Mutex protecting the data
Span<Uint64> m_loopSpan; //!< Loop Range Specifier
InputSoundFile m_file; ///< The streamed music file
std::vector<Int16> m_samples; ///< Temporary buffer of samples
Mutex m_mutex; ///< Mutex protecting the data
Span<Uint64> m_loopSpan; ///< Loop Range Specifier
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -82,18 +82,18 @@ public:
////////////////////////////////////////////////////////////
void write(const Int16* samples, Uint64 count);
private:
////////////////////////////////////////////////////////////
/// \brief Close the current file
///
////////////////////////////////////////////////////////////
void close();
private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
SoundFileWriter* m_writer; //!< Writer that handles I/O on the file's format
SoundFileWriter* m_writer; ///< Writer that handles I/O on the file's format
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -217,7 +217,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
const SoundBuffer* m_buffer; //!< Sound buffer bound to the source
const SoundBuffer* m_buffer; ///< Sound buffer bound to the source
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -267,15 +267,15 @@ private:
////////////////////////////////////////////////////////////
// Types
////////////////////////////////////////////////////////////
typedef std::set<Sound*> SoundList; //!< Set of unique sound instances
typedef std::set<Sound*> SoundList; ///< Set of unique sound instances
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int m_buffer; //!< OpenAL buffer identifier
std::vector<Int16> m_samples; //!< Samples buffer
Time m_duration; //!< Sound duration
mutable SoundList m_sounds; //!< List of sounds that are using this buffer
unsigned int m_buffer; ///< OpenAL buffer identifier
std::vector<Int16> m_samples; ///< Samples buffer
Time m_duration; ///< Sound duration
mutable SoundList m_sounds; ///< List of sounds that are using this buffer
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -96,8 +96,8 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<Int16> m_samples; //!< Temporary sample buffer to hold the recorded data
SoundBuffer m_buffer; //!< Sound buffer that will contain the recorded data
std::vector<Int16> m_samples; ///< Temporary sample buffer to hold the recorded data
SoundBuffer m_buffer; ///< Sound buffer that will contain the recorded data
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -160,8 +160,8 @@ private:
////////////////////////////////////////////////////////////
// Static member data
////////////////////////////////////////////////////////////
static ReaderFactoryArray s_readers; //!< List of all registered readers
static WriterFactoryArray s_writers; //!< List of all registered writers
static ReaderFactoryArray s_readers; ///< List of all registered readers
static WriterFactoryArray s_writers; ///< List of all registered writers
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -50,9 +50,9 @@ public:
////////////////////////////////////////////////////////////
struct Info
{
Uint64 sampleCount; //!< Total number of samples in the file
unsigned int channelCount; //!< Number of channels of the sound
unsigned int sampleRate; //!< Samples rate of the sound, in samples per second
Uint64 sampleCount; ///< Total number of samples in the file
unsigned int channelCount; ///< Number of channels of the sound
unsigned int sampleRate; ///< Samples rate of the sound, in samples per second
};
////////////////////////////////////////////////////////////

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -285,13 +285,13 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Thread m_thread; //!< Thread running the background recording task
std::vector<Int16> m_samples; //!< Buffer to store captured samples
unsigned int m_sampleRate; //!< Sample rate
Time m_processingInterval; //!< Time period between calls to onProcessSamples
bool m_isCapturing; //!< Capturing state
std::string m_deviceName; //!< Name of the audio capture device
unsigned int m_channelCount; //!< Number of recording channels
Thread m_thread; ///< Thread running the background recording task
std::vector<Int16> m_samples; ///< Buffer to store captured samples
unsigned int m_sampleRate; ///< Sample rate
Time m_processingInterval; ///< Time period between calls to onProcessSamples
bool m_isCapturing; ///< Capturing state
std::string m_deviceName; ///< Name of the audio capture device
unsigned int m_channelCount; ///< Number of recording channels
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -49,9 +49,9 @@ public:
////////////////////////////////////////////////////////////
enum Status
{
Stopped, //!< Sound is not playing
Paused, //!< Sound is paused
Playing //!< Sound is playing
Stopped, ///< Sound is not playing
Paused, ///< Sound is paused
Playing ///< Sound is playing
};
////////////////////////////////////////////////////////////
@ -306,7 +306,7 @@ protected:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int m_source; //!< OpenAL source identifier
unsigned int m_source; ///< OpenAL source identifier
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -52,8 +52,8 @@ public:
////////////////////////////////////////////////////////////
struct Chunk
{
const Int16* samples; //!< Pointer to the audio samples
std::size_t sampleCount; //!< Number of samples pointed by Samples
const Int16* samples; ///< Pointer to the audio samples
std::size_t sampleCount; ///< Number of samples pointed by Samples
};
////////////////////////////////////////////////////////////
@ -182,7 +182,7 @@ protected:
enum
{
NoLoop = -1 //!< "Invalid" endSeeks value, telling us to continue uninterrupted
NoLoop = -1 ///< "Invalid" endSeeks value, telling us to continue uninterrupted
};
////////////////////////////////////////////////////////////
@ -251,20 +251,6 @@ protected:
////////////////////////////////////////////////////////////
virtual Int64 onLoop();
////////////////////////////////////////////////////////////
/// \brief Set the processing interval
///
/// The processing interval controls the period at which the
/// audio buffers are filled by calls to onGetData. A smaller
/// interval may be useful for low-latency streams. Note that
/// the given period is only a hint and the actual period may
/// vary. The default processing interval is 10 ms.
///
/// \param interval Processing interval
///
////////////////////////////////////////////////////////////
void setProcessingInterval(Time interval);
private:
////////////////////////////////////////////////////////////
@ -313,25 +299,24 @@ private:
enum
{
BufferCount = 3, //!< Number of audio buffers used by the streaming loop
BufferRetries = 2 //!< Number of retries (excluding initial try) for onGetData()
BufferCount = 3, ///< Number of audio buffers used by the streaming loop
BufferRetries = 2 ///< Number of retries (excluding initial try) for onGetData()
};
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Thread m_thread; //!< Thread running the background tasks
mutable Mutex m_threadMutex; //!< Thread mutex
Status m_threadStartState; //!< State the thread starts in (Playing, Paused, Stopped)
bool m_isStreaming; //!< Streaming state (true = playing, false = stopped)
unsigned int m_buffers[BufferCount]; //!< Sound buffers used to store temporary audio data
unsigned int m_channelCount; //!< Number of channels (1 = mono, 2 = stereo, ...)
unsigned int m_sampleRate; //!< Frequency (samples / second)
Uint32 m_format; //!< Format of the internal sound buffers
bool m_loop; //!< Loop flag (true to loop, false to play once)
Uint64 m_samplesProcessed; //!< Number of samples processed since beginning of the stream
Int64 m_bufferSeeks[BufferCount]; //!< If buffer is an "end buffer", holds next seek position, else NoLoop. For play offset calculation.
Time m_processingInterval; //!< Interval for checking and filling the internal sound buffers.
Thread m_thread; ///< Thread running the background tasks
mutable Mutex m_threadMutex; ///< Thread mutex
Status m_threadStartState; ///< State the thread starts in (Playing, Paused, Stopped)
bool m_isStreaming; ///< Streaming state (true = playing, false = stopped)
unsigned int m_buffers[BufferCount]; ///< Sound buffers used to store temporary audio data
unsigned int m_channelCount; ///< Number of channels (1 = mono, 2 = stereo, ...)
unsigned int m_sampleRate; ///< Frequency (samples / second)
Uint32 m_format; ///< Format of the internal sound buffers
bool m_loop; ///< Loop flag (true to loop, false to play once)
Uint64 m_samplesProcessed; ///< Number of buffers processed since beginning of the stream
Int64 m_bufferSeeks[BufferCount]; ///< If buffer is an "end buffer", holds next seek position, else NoLoop. For play offset calculation.
};
} // namespace sf
@ -402,7 +387,7 @@ private:
/// return true;
/// }
///
/// virtual void onSeek(sf::Time timeOffset)
/// virtual void onSeek(Uint32 timeOffset)
/// {
/// // Change the current position in the stream source
/// ...

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -36,7 +36,7 @@
////////////////////////////////////////////////////////////
// Identify the operating system
// see https://sourceforge.net/p/predef/wiki/Home/
// see http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
////////////////////////////////////////////////////////////
#if defined(_WIN32)

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -48,16 +48,16 @@ struct SFML_GRAPHICS_API BlendMode
////////////////////////////////////////////////////////
enum Factor
{
Zero, //!< (0, 0, 0, 0)
One, //!< (1, 1, 1, 1)
SrcColor, //!< (src.r, src.g, src.b, src.a)
OneMinusSrcColor, //!< (1, 1, 1, 1) - (src.r, src.g, src.b, src.a)
DstColor, //!< (dst.r, dst.g, dst.b, dst.a)
OneMinusDstColor, //!< (1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a)
SrcAlpha, //!< (src.a, src.a, src.a, src.a)
OneMinusSrcAlpha, //!< (1, 1, 1, 1) - (src.a, src.a, src.a, src.a)
DstAlpha, //!< (dst.a, dst.a, dst.a, dst.a)
OneMinusDstAlpha //!< (1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a)
Zero, ///< (0, 0, 0, 0)
One, ///< (1, 1, 1, 1)
SrcColor, ///< (src.r, src.g, src.b, src.a)
OneMinusSrcColor, ///< (1, 1, 1, 1) - (src.r, src.g, src.b, src.a)
DstColor, ///< (dst.r, dst.g, dst.b, dst.a)
OneMinusDstColor, ///< (1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a)
SrcAlpha, ///< (src.a, src.a, src.a, src.a)
OneMinusSrcAlpha, ///< (1, 1, 1, 1) - (src.a, src.a, src.a, src.a)
DstAlpha, ///< (dst.a, dst.a, dst.a, dst.a)
OneMinusDstAlpha ///< (1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a)
};
////////////////////////////////////////////////////////
@ -68,9 +68,9 @@ struct SFML_GRAPHICS_API BlendMode
////////////////////////////////////////////////////////
enum Equation
{
Add, //!< Pixel = Src * SrcFactor + Dst * DstFactor
Subtract, //!< Pixel = Src * SrcFactor - Dst * DstFactor
ReverseSubtract //!< Pixel = Dst * DstFactor - Src * SrcFactor
Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor
Subtract, ///< Pixel = Src * SrcFactor - Dst * DstFactor
ReverseSubtract ///< Pixel = Dst * DstFactor - Src * SrcFactor
};
////////////////////////////////////////////////////////////
@ -112,12 +112,12 @@ struct SFML_GRAPHICS_API BlendMode
////////////////////////////////////////////////////////////
// Member Data
////////////////////////////////////////////////////////////
Factor colorSrcFactor; //!< Source blending factor for the color channels
Factor colorDstFactor; //!< Destination blending factor for the color channels
Equation colorEquation; //!< Blending equation for the color channels
Factor alphaSrcFactor; //!< Source blending factor for the alpha channel
Factor alphaDstFactor; //!< Destination blending factor for the alpha channel
Equation alphaEquation; //!< Blending equation for the alpha channel
Factor colorSrcFactor; ///< Source blending factor for the color channels
Factor colorDstFactor; ///< Destination blending factor for the color channels
Equation colorEquation; ///< Blending equation for the color channels
Factor alphaSrcFactor; ///< Source blending factor for the alpha channel
Factor alphaDstFactor; ///< Destination blending factor for the alpha channel
Equation alphaEquation; ///< Blending equation for the alpha channel
};
////////////////////////////////////////////////////////////
@ -147,10 +147,10 @@ SFML_GRAPHICS_API bool operator !=(const BlendMode& left, const BlendMode& right
////////////////////////////////////////////////////////////
// Commonly used blending modes
////////////////////////////////////////////////////////////
SFML_GRAPHICS_API extern const BlendMode BlendAlpha; //!< Blend source and dest according to dest alpha
SFML_GRAPHICS_API extern const BlendMode BlendAdd; //!< Add source to dest
SFML_GRAPHICS_API extern const BlendMode BlendMultiply; //!< Multiply source and dest
SFML_GRAPHICS_API extern const BlendMode BlendNone; //!< Overwrite dest with source
SFML_GRAPHICS_API extern const BlendMode BlendAlpha; ///< Blend source and dest according to dest alpha
SFML_GRAPHICS_API extern const BlendMode BlendAdd; ///< Add source to dest
SFML_GRAPHICS_API extern const BlendMode BlendMultiply; ///< Multiply source and dest
SFML_GRAPHICS_API extern const BlendMode BlendNone; ///< Overwrite dest with source
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -111,8 +111,8 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
float m_radius; //!< Radius of the circle
std::size_t m_pointCount; //!< Number of points composing the circle
float m_radius; ///< Radius of the circle
std::size_t m_pointCount; ///< Number of points composing the circle
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -80,23 +80,23 @@ public:
////////////////////////////////////////////////////////////
// Static member data
////////////////////////////////////////////////////////////
static const Color Black; //!< Black predefined color
static const Color White; //!< White predefined color
static const Color Red; //!< Red predefined color
static const Color Green; //!< Green predefined color
static const Color Blue; //!< Blue predefined color
static const Color Yellow; //!< Yellow predefined color
static const Color Magenta; //!< Magenta predefined color
static const Color Cyan; //!< Cyan predefined color
static const Color Transparent; //!< Transparent (black) predefined color
static const Color Black; ///< Black predefined color
static const Color White; ///< White predefined color
static const Color Red; ///< Red predefined color
static const Color Green; ///< Green predefined color
static const Color Blue; ///< Blue predefined color
static const Color Yellow; ///< Yellow predefined color
static const Color Magenta; ///< Magenta predefined color
static const Color Cyan; ///< Cyan predefined color
static const Color Transparent; ///< Transparent (black) predefined color
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Uint8 r; //!< Red component
Uint8 g; //!< Green component
Uint8 b; //!< Blue component
Uint8 a; //!< Alpha (opacity) component
Uint8 r; ///< Red component
Uint8 g; ///< Green component
Uint8 b; ///< Blue component
Uint8 a; ///< Alpha (opacity) component
};
////////////////////////////////////////////////////////////

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -112,7 +112,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<Vector2f> m_points; //!< Points composing the convex polygon
std::vector<Vector2f> m_points; ///< Points composing the convex polygon
};
} // namespace sf

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -57,7 +57,7 @@ public:
////////////////////////////////////////////////////////////
struct Info
{
std::string family; //!< The font family
std::string family; ///< The font family
};
public:
@ -166,10 +166,6 @@ public:
/// might be available. If the glyph is not available at the
/// requested size, an empty glyph is returned.
///
/// You may want to use \ref hasGlyph to determine if the
/// glyph exists before requesting it. If the glyph does not
/// exist, a font specific default is returned.
///
/// Be aware that using a negative value for the outline
/// thickness will cause distorted rendering.
///
@ -183,24 +179,6 @@ public:
////////////////////////////////////////////////////////////
const Glyph& getGlyph(Uint32 codePoint, unsigned int characterSize, bool bold, float outlineThickness = 0) const;
////////////////////////////////////////////////////////////
/// \brief Determine if this font has a glyph representing the requested code point
///
/// Most fonts only include a very limited selection of glyphs from
/// specific Unicode subsets, like Latin, Cyrillic, or Asian characters.
///
/// While code points without representation will return a font specific
/// default character, it might be useful to verify whether specific
/// code points are included to determine whether a font is suited
/// to display text in a specific language.
///
/// \param codePoint Unicode code point to check
///
/// \return True if the codepoint has a glyph representation, false otherwise
///
////////////////////////////////////////////////////////////
bool hasGlyph(Uint32 codePoint) const;
////////////////////////////////////////////////////////////
/// \brief Get the kerning offset of two glyphs
///
@ -275,32 +253,6 @@ public:
////////////////////////////////////////////////////////////
const Texture& getTexture(unsigned int characterSize) const;
////////////////////////////////////////////////////////////
/// \brief Enable or disable the smooth filter
///
/// When the filter is activated, the font appears smoother
/// so that pixels are less noticeable. However if you want
/// the font to look exactly the same as its source file,
/// you should disable it.
/// The smooth filter is enabled by default.
///
/// \param smooth True to enable smoothing, false to disable it
///
/// \see isSmooth
///
////////////////////////////////////////////////////////////
void setSmooth(bool smooth);
////////////////////////////////////////////////////////////
/// \brief Tell whether the smooth filter is enabled or not
///
/// \return True if smoothing is enabled, false if it is disabled
///
/// \see setSmooth
///
////////////////////////////////////////////////////////////
bool isSmooth() const;
////////////////////////////////////////////////////////////
/// \brief Overload of assignment operator
///
@ -321,15 +273,15 @@ private:
{
Row(unsigned int rowTop, unsigned int rowHeight) : width(0), top(rowTop), height(rowHeight) {}
unsigned int width; //!< Current width of the row
unsigned int top; //!< Y position of the row into the texture
unsigned int height; //!< Height of the row
unsigned int width; ///< Current width of the row
unsigned int top; ///< Y position of the row into the texture
unsigned int height; ///< Height of the row
};
////////////////////////////////////////////////////////////
// Types
////////////////////////////////////////////////////////////
typedef std::map<Uint64, Glyph> GlyphTable; //!< Table mapping a codepoint to its glyph
typedef std::map<Uint64, Glyph> GlyphTable; ///< Table mapping a codepoint to its glyph
////////////////////////////////////////////////////////////
/// \brief Structure defining a page of glyphs
@ -339,10 +291,10 @@ private:
{
Page();
GlyphTable glyphs; //!< Table mapping code points to their corresponding glyph
Texture texture; //!< Texture containing the pixels of the glyphs
unsigned int nextRow; //!< Y position of the next new row in the texture
std::vector<Row> rows; //!< List containing the position of all the existing rows
GlyphTable glyphs; ///< Table mapping code points to their corresponding glyph
Texture texture; ///< Texture containing the pixels of the glyphs
unsigned int nextRow; ///< Y position of the next new row in the texture
std::vector<Row> rows; ///< List containing the position of all the existing rows
};
////////////////////////////////////////////////////////////
@ -389,22 +341,21 @@ private:
////////////////////////////////////////////////////////////
// Types
////////////////////////////////////////////////////////////
typedef std::map<unsigned int, Page> PageTable; //!< Table mapping a character size to its page (texture)
typedef std::map<unsigned int, Page> PageTable; ///< Table mapping a character size to its page (texture)
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
void* m_library; //!< Pointer to the internal library interface (it is typeless to avoid exposing implementation details)
void* m_face; //!< Pointer to the internal font face (it is typeless to avoid exposing implementation details)
void* m_streamRec; //!< Pointer to the stream rec instance (it is typeless to avoid exposing implementation details)
void* m_stroker; //!< Pointer to the stroker (it is typeless to avoid exposing implementation details)
int* m_refCount; //!< Reference counter used by implicit sharing
bool m_isSmooth; //!< Status of the smooth filter
Info m_info; //!< Information about the font
mutable PageTable m_pages; //!< Table containing the glyphs pages by character size
mutable std::vector<Uint8> m_pixelBuffer; //!< Pixel buffer holding a glyph's pixels before being written to the texture
void* m_library; ///< Pointer to the internal library interface (it is typeless to avoid exposing implementation details)
void* m_face; ///< Pointer to the internal font face (it is typeless to avoid exposing implementation details)
void* m_streamRec; ///< Pointer to the stream rec instance (it is typeless to avoid exposing implementation details)
void* m_stroker; ///< Pointer to the stroker (it is typeless to avoid exposing implementation details)
int* m_refCount; ///< Reference counter used by implicit sharing
Info m_info; ///< Information about the font
mutable PageTable m_pages; ///< Table containing the glyphs pages by character size
mutable std::vector<Uint8> m_pixelBuffer; ///< Pixel buffer holding a glyph's pixels before being written to the texture
#ifdef SFML_SYSTEM_ANDROID
void* m_stream; //!< Asset file streamer (if loaded from file)
void* m_stream; ///< Asset file streamer (if loaded from file)
#endif
};

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org)
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
//
// 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.
@ -81,7 +81,7 @@ struct Matrix
copyMatrix(transform, *this);
}
float array[Columns * Rows]; //!< Array holding matrix data
float array[Columns * Rows]; ///< Array holding matrix data
};
////////////////////////////////////////////////////////////
@ -148,8 +148,8 @@ struct Vector4
copyVector(color, *this);
}
T x; //!< 1st component (X) of the 4D vector
T y; //!< 2nd component (Y) of the 4D vector
T z; //!< 3rd component (Z) of the 4D vector
T w; //!< 4th component (W) of the 4D vector
T x; ///< 1st component (X) of the 4D vector
T y; ///< 2nd component (Y) of the 4D vector
T z; ///< 3rd component (Z) of the 4D vector
T w; ///< 4th component (W) of the 4D vector
};

Some files were not shown because too many files have changed in this diff Show more