Fix whitespace: Convert tabs to spaces and remove trailing whitespace.

This commit is contained in:
binary1248 2015-04-01 04:08:23 +02:00 committed by Lukas Dürrenberger
parent 075d7b3b50
commit e80bf0ba92
54 changed files with 262 additions and 262 deletions

View File

@ -91,12 +91,12 @@ if(SFML_OS_ANDROID)
if(NOT ANDROID_NDK) if(NOT ANDROID_NDK)
message(FATAL_ERROR "The Android NDK couldn't be found. Please adjust the CMake variable 'ANDROID_NDK' to point to the NDK directory.") message(FATAL_ERROR "The Android NDK couldn't be found. Please adjust the CMake variable 'ANDROID_NDK' to point to the NDK directory.")
endif() endif()
# CMake doesn't support defining the STL to be used with Nsight Tegra, so warn the user # CMake doesn't support defining the STL to be used with Nsight Tegra, so warn the user
if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
message(WARNING "CMake might not properly support setting the STL. Make sure to adjust all generated library projects!") message(WARNING "CMake might not properly support setting the STL. Make sure to adjust all generated library projects!")
endif() endif()
# install everything in $NDK/sources/ because this path is appended by the NDK (convenient) # install everything in $NDK/sources/ because this path is appended by the NDK (convenient)
set(CMAKE_INSTALL_PREFIX ${ANDROID_NDK}/sources/sfml) set(CMAKE_INSTALL_PREFIX ${ANDROID_NDK}/sources/sfml)
@ -107,7 +107,7 @@ if(SFML_OS_ANDROID)
if (ANDROID_STL MATCHES "_shared") if (ANDROID_STL MATCHES "_shared")
add_definitions("-DSTL_LIBRARY=${ANDROID_STL}") add_definitions("-DSTL_LIBRARY=${ANDROID_STL}")
endif() endif()
# this is a workaround to compile sfml-activity without the stl library as a dependency # this is a workaround to compile sfml-activity without the stl library as a dependency
# we save the original compilation command line to restore it later in Macro.cmake # we save the original compilation command line to restore it later in Macro.cmake
set(CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STL ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) set(CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STL ${CMAKE_CXX_CREATE_SHARED_LIBRARY})

View File

@ -9,6 +9,6 @@
find_path(EGL_INCLUDE_DIR EGL/egl.h) find_path(EGL_INCLUDE_DIR EGL/egl.h)
find_library(EGL_LIBRARY NAMES EGL) find_library(EGL_LIBRARY NAMES EGL)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR) find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)

View File

@ -9,6 +9,6 @@
find_path(GLES_INCLUDE_DIR GLES/gl.h) find_path(GLES_INCLUDE_DIR GLES/gl.h)
find_library(GLES_LIBRARY NAMES GLESv1_CM) find_library(GLES_LIBRARY NAMES GLESv1_CM)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLES DEFAULT_MSG GLES_LIBRARY GLES_INCLUDE_DIR) find_package_handle_standard_args(GLES DEFAULT_MSG GLES_LIBRARY GLES_INCLUDE_DIR)

View File

@ -181,7 +181,7 @@ foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
# library found # library found
set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE) set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE)
# if both are found, set SFML_XXX_LIBRARY to contain both # if both are found, set SFML_XXX_LIBRARY to contain both
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG} set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}
@ -309,7 +309,7 @@ if(SFML_STATIC_LIBRARIES)
# sfml-graphics # sfml-graphics
list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT) list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT)
if(NOT ${FIND_SFML_GRAPHICS_COMPONENT} EQUAL -1) if(NOT ${FIND_SFML_GRAPHICS_COMPONENT} EQUAL -1)
# find libraries # find libraries
find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype) find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype)
find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg) find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg)

View File

@ -29,9 +29,9 @@ IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE) execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE)
# retvale is 0 of the condition is "true" so we need to negate the value... # retvale is 0 of the condition is "true" so we need to negate the value...
if (UDEV_STABLE) if (UDEV_STABLE)
set(UDEV_STABLE 0) set(UDEV_STABLE 0)
else (UDEV_STABLE) else (UDEV_STABLE)
set(UDEV_STABLE 1) set(UDEV_STABLE 1)
endif (UDEV_STABLE) endif (UDEV_STABLE)
message(STATUS "libudev stable: ${UDEV_STABLE}") message(STATUS "libudev stable: ${UDEV_STABLE}")
ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)

View File

@ -2,14 +2,14 @@
# find doxygen # find doxygen
if(SFML_OS_MACOSX) if(SFML_OS_MACOSX)
# Add some path to search doxygen in more directories. # Add some path to search doxygen in more directories.
set(ADDITIONAL_PATHS set(ADDITIONAL_PATHS
/Developer/Applications/Doxygen.app/Contents/Resources /Developer/Applications/Doxygen.app/Contents/Resources
/Developer/Applications/Doxygen.app/Contents/MacOS /Developer/Applications/Doxygen.app/Contents/MacOS
$ENV{HOME}/Applications/Doxygen.app/Contents/Resources $ENV{HOME}/Applications/Doxygen.app/Contents/Resources
$ENV{HOME}/Applications/Doxygen.app/Contents/MacOS $ENV{HOME}/Applications/Doxygen.app/Contents/MacOS
$ENV{HOME}/Applications/Developer/Doxygen.app/Contents/Resources $ENV{HOME}/Applications/Developer/Doxygen.app/Contents/Resources
$ENV{HOME}/Applications/Developer/Doxygen.app/Contents/MacOS) $ENV{HOME}/Applications/Developer/Doxygen.app/Contents/MacOS)
set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${ADDITIONAL_PATHS}) set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${ADDITIONAL_PATHS})
endif() endif()

View File

@ -44,14 +44,14 @@ PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short. # quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = PROJECT_BRIEF =
# With the PROJECT_LOGO tag one can specify an logo or icon that is included in # With the PROJECT_LOGO tag one can specify an logo or icon that is included in
# the documentation. The maximum height of the logo should not exceed 55 pixels # the documentation. The maximum height of the logo should not exceed 55 pixels
# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
# to the output directory. # to the output directory.
PROJECT_LOGO = PROJECT_LOGO =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is # into which the generated documentation will be written. If a relative path is
@ -162,7 +162,7 @@ FULL_PATH_NAMES = NO
# will be relative from the directory where doxygen is started. # will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES. # This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH = STRIP_FROM_PATH =
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which # path mentioned in the documentation of a class, which tells the reader which
@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler # specify the list of include paths that are normally passed to the compiler
# using the -I flag. # using the -I flag.
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't # less readable) file names. This can be useful is your file systems doesn't
@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert # "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines. # newlines.
ALIASES = ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only). # This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class" # A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning. # will allow you to use the command class in the itcl::class meaning.
TCL_SUBST = TCL_SUBST =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For # only. Doxygen will then generate output that is more tailored for C. For
@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen. # the files are not read by doxygen.
EXTENSION_MAPPING = EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable # according to the Markdown format, which allows for more readable
@ -627,7 +627,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if <section_label> ... \endif and \cond <section_label> # sections, marked by \if <section_label> ... \endif and \cond <section_label>
# ... \endcond blocks. # ... \endcond blocks.
ENABLED_SECTIONS = ENABLED_SECTIONS =
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
# initial value of a variable or macro / define can have for it to appear in the # initial value of a variable or macro / define can have for it to appear in the
@ -669,7 +669,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file # by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation. # version. For an example see the documentation.
FILE_VERSION_FILTER = FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated # by doxygen. The layout file controls the global structure of the generated
@ -682,7 +682,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty. # tag is left empty.
LAYOUT_FILE = LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib # the reference definitions. This must be a list of .bib files. The .bib
@ -692,7 +692,7 @@ LAYOUT_FILE =
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references. # search path. See also \cite for info how to create references.
CITE_BIB_FILES = CITE_BIB_FILES =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to warning and progress messages # configuration options related to warning and progress messages
@ -751,7 +751,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard # messages should be written. If left blank the output is written to standard
# error (stderr). # error (stderr).
WARN_LOGFILE = WARN_LOGFILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the input files # Configuration options related to the input files
@ -799,7 +799,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is # Note that relative paths are relative to the directory from which doxygen is
# run. # run.
EXCLUDE = EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded # directories that are symbolic links (a Unix filesystem feature) are excluded
@ -838,7 +838,7 @@ EXCLUDE_SYMBOLS = priv
# that contain example code fragments that are included (see the \include # that contain example code fragments that are included (see the \include
# command). # command).
EXAMPLE_PATH = EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@ -858,7 +858,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the # that contain images that are to be included in the documentation (see the
# \image command). # \image command).
IMAGE_PATH = IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should # The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program # invoke to filter for each input file. Doxygen will invoke the filter program
@ -875,7 +875,7 @@ IMAGE_PATH =
# code is scanned, but not when the output code is generated. If lines are added # code is scanned, but not when the output code is generated. If lines are added
# or removed, the anchors will not be placed correctly. # or removed, the anchors will not be placed correctly.
INPUT_FILTER = INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the # basis. Doxygen will compare the file name with each pattern and apply the
@ -884,7 +884,7 @@ INPUT_FILTER =
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the # filters are used. If the FILTER_PATTERNS tag is empty or if none of the
# patterns match the file name, INPUT_FILTER is applied. # patterns match the file name, INPUT_FILTER is applied.
FILTER_PATTERNS = FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER ) will also be used to filter the input files that are used for # INPUT_FILTER ) will also be used to filter the input files that are used for
@ -899,14 +899,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter). # *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. # This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
FILTER_SOURCE_PATTERNS = FILTER_SOURCE_PATTERNS =
# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
# is part of the input, its contents will be placed on the main page # is part of the input, its contents will be placed on the main page
# (index.html). This can be useful if you have a project on for instance GitHub # (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output. # and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE = USE_MDFILE_AS_MAINPAGE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to source browsing # Configuration options related to source browsing
@ -1013,7 +1013,7 @@ VERBATIM_HEADERS = YES
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
# Generates warnings with Clang # Generates warnings with Clang
#CLANG_OPTIONS = #CLANG_OPTIONS =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index # Configuration options related to the alphabetical class index
@ -1039,7 +1039,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers. # while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
IGNORE_PREFIX = IGNORE_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the HTML output # Configuration options related to the HTML output
@ -1122,7 +1122,7 @@ HTML_STYLESHEET = "@DOXYGEN_INPUT_DIR@/doc/doxygen.css"
# list). For an example see the documentation. # list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET = HTML_EXTRA_STYLESHEET =
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note # other source files which should be copied to the HTML output directory. Note
@ -1132,7 +1132,7 @@ HTML_EXTRA_STYLESHEET =
# files will be copied as-is; there are no commands or markers available. # files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES = HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the stylesheet and background images according to # will adjust the colors in the stylesheet and background images according to
@ -1281,7 +1281,7 @@ GENERATE_CHI = NO
# and project file content. # and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING = CHM_INDEX_ENCODING =
# The BINARY_TOC flag controls whether a binary table of contents is generated ( # The BINARY_TOC flag controls whether a binary table of contents is generated (
# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it # YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
@ -1312,7 +1312,7 @@ GENERATE_QHP = NO
# the HTML output folder. # the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QCH_FILE = QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace # Project output. For more information please see Qt Help Project / Namespace
@ -1337,7 +1337,7 @@ QHP_VIRTUAL_FOLDER = doc
# filters). # filters).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME = QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom # custom filter to add. For more information please see Qt Help Project / Custom
@ -1345,21 +1345,21 @@ QHP_CUST_FILTER_NAME =
# filters). # filters).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS = QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see: # project's filter section matches. Qt Help Project / Filter Attributes (see:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS = QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location of Qt's # The QHG_LOCATION tag can be used to specify the location of Qt's
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
# generated .qhp file. # generated .qhp file.
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHG_LOCATION = QHG_LOCATION =
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
# generated, together with the HTML files, they form an Eclipse help plugin. To # generated, together with the HTML files, they form an Eclipse help plugin. To
@ -1492,7 +1492,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES. # This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_EXTENSIONS = MATHJAX_EXTENSIONS =
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site # of code that will be used on startup of the MathJax code. See the MathJax site
@ -1500,7 +1500,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation. # example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES. # This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_CODEFILE = MATHJAX_CODEFILE =
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for # When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and # the HTML output. The underlying search engine uses javascript and DHTML and
@ -1560,7 +1560,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details. # Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES. # This tag requires that the tag SEARCHENGINE is set to YES.
SEARCHENGINE_URL = SEARCHENGINE_URL =
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
# search data is written to a file for indexing by an external tool. With the # search data is written to a file for indexing by an external tool. With the
@ -1576,7 +1576,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project. # projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES. # This tag requires that the tag SEARCHENGINE is set to YES.
EXTERNAL_SEARCH_ID = EXTERNAL_SEARCH_ID =
# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
# projects other than the one defined by this configuration file, but that are # projects other than the one defined by this configuration file, but that are
@ -1586,7 +1586,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES. # This tag requires that the tag SEARCHENGINE is set to YES.
EXTRA_SEARCH_MAPPINGS = EXTRA_SEARCH_MAPPINGS =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the LaTeX output # Configuration options related to the LaTeX output
@ -1647,7 +1647,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included. # If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
EXTRA_PACKAGES = EXTRA_PACKAGES =
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
# generated LaTeX document. The header should contain everything until the first # generated LaTeX document. The header should contain everything until the first
@ -1663,7 +1663,7 @@ EXTRA_PACKAGES =
# HTML_HEADER. # HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HEADER = LATEX_HEADER =
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
# generated LaTeX document. The footer should contain everything after the last # generated LaTeX document. The footer should contain everything after the last
@ -1674,7 +1674,7 @@ LATEX_HEADER =
# Note: Only use a user-defined footer if you know what you are doing! # Note: Only use a user-defined footer if you know what you are doing!
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_FOOTER = LATEX_FOOTER =
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the LATEX_OUTPUT output # other source files which should be copied to the LATEX_OUTPUT output
@ -1682,7 +1682,7 @@ LATEX_FOOTER =
# markers available. # markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_EXTRA_FILES = LATEX_EXTRA_FILES =
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
@ -1782,14 +1782,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses. # default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES. # This tag requires that the tag GENERATE_RTF is set to YES.
RTF_STYLESHEET_FILE = RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is # Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config file. A template extensions file can be generated # similar to doxygen's config file. A template extensions file can be generated
# using doxygen -e rtf extensionFile. # using doxygen -e rtf extensionFile.
# This tag requires that the tag GENERATE_RTF is set to YES. # This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTENSIONS_FILE = RTF_EXTENSIONS_FILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the man page output # Configuration options related to the man page output
@ -1824,7 +1824,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed. # MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES. # This tag requires that the tag GENERATE_MAN is set to YES.
MAN_SUBDIR = MAN_SUBDIR =
# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
# will generate one additional man file for each entity documented in the real # will generate one additional man file for each entity documented in the real
@ -1937,7 +1937,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables. # overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES. # This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_MAKEVAR_PREFIX = PERLMOD_MAKEVAR_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the preprocessor # Configuration options related to the preprocessor
@ -1978,7 +1978,7 @@ SEARCH_INCLUDES = YES
# preprocessor. # preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES. # This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH = INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the # patterns (like *.h and *.hpp) to filter out the header-files in the
@ -1986,7 +1986,7 @@ INCLUDE_PATH =
# used. # used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
# The PREDEFINED tag can be used to specify one or more macro names that are # The PREDEFINED tag can be used to specify one or more macro names that are
# defined before the preprocessor is started (similar to the -D option of e.g. # defined before the preprocessor is started (similar to the -D option of e.g.
@ -2009,7 +2009,7 @@ PREDEFINED = SFML_SYSTEM_API \
# definition found in the source code. # definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_AS_DEFINED = EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
# remove all references to function-like macros that are alone on a line, have # remove all references to function-like macros that are alone on a line, have
@ -2038,13 +2038,13 @@ SKIP_FUNCTION_MACROS = YES
# the path). If a tag file is not located in the directory in which doxygen is # the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here. # run, you must also specify the path to the tagfile here.
TAGFILES = TAGFILES =
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a # When a file name is specified after GENERATE_TAGFILE, doxygen will create a
# tag file that is based on the input files it reads. See section "Linking to # tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files. # external documentation" for more information about the usage of tag files.
GENERATE_TAGFILE = GENERATE_TAGFILE =
# If the ALLEXTERNALS tag is set to YES all external class will be listed in the # If the ALLEXTERNALS tag is set to YES all external class will be listed in the
# class index. If set to NO only the inherited external classes will be listed. # class index. If set to NO only the inherited external classes will be listed.
@ -2092,14 +2092,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the # the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path. # default search path.
MSCGEN_PATH = MSCGEN_PATH =
# You can include diagrams made with dia in doxygen documentation. Doxygen will # You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The # then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides. # DIA_PATH tag allows you to specify the directory where the dia binary resides.
# If left empty dia is assumed to be found in the default search path. # If left empty dia is assumed to be found in the default search path.
DIA_PATH = DIA_PATH =
# If set to YES, the inheritance and collaboration graphs will hide inheritance # If set to YES, the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class. # and usage relations if the target is undocumented or is not a class.
@ -2148,7 +2148,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag. # the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTPATH = DOT_FONTPATH =
# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
# each documented class showing the direct and indirect inheritance relations. # each documented class showing the direct and indirect inheritance relations.
@ -2286,26 +2286,26 @@ INTERACTIVE_SVG = NO
# found. If left blank, it is assumed the dot tool can be found in the path. # found. If left blank, it is assumed the dot tool can be found in the path.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_PATH = DOT_PATH =
# The DOTFILE_DIRS tag can be used to specify one or more directories that # The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the \dotfile # contain dot files that are included in the documentation (see the \dotfile
# command). # command).
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOTFILE_DIRS = DOTFILE_DIRS =
# The MSCFILE_DIRS tag can be used to specify one or more directories that # The MSCFILE_DIRS tag can be used to specify one or more directories that
# contain msc files that are included in the documentation (see the \mscfile # contain msc files that are included in the documentation (see the \mscfile
# command). # command).
MSCFILE_DIRS = MSCFILE_DIRS =
# The DIAFILE_DIRS tag can be used to specify one or more directories that # The DIAFILE_DIRS tag can be used to specify one or more directories that
# contain dia files that are included in the documentation (see the \diafile # contain dia files that are included in the documentation (see the \diafile
# command). # command).
DIAFILE_DIRS = DIAFILE_DIRS =
# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
# path where java can find the plantuml.jar file. If left blank, it is assumed # path where java can find the plantuml.jar file. If left blank, it is assumed
@ -2314,7 +2314,7 @@ DIAFILE_DIRS =
# will not generate output for the diagram. # will not generate output for the diagram.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
PLANTUML_JAR_PATH = PLANTUML_JAR_PATH =
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
# that will be shown in the graph. If the number of nodes in a graph becomes # that will be shown in the graph. If the number of nodes in a graph becomes

View File

@ -233,7 +233,7 @@ p.formulaDsp {
} }
img.formulaDsp { img.formulaDsp {
} }
img.formulaInl { img.formulaInl {
@ -291,20 +291,20 @@ span.charliteral {
color: #008080 color: #008080
} }
span.vhdldigit { span.vhdldigit {
color: #ff00ff color: #ff00ff
} }
span.vhdlchar { span.vhdlchar {
color: #000000 color: #000000
} }
span.vhdlkeyword { span.vhdlkeyword {
color: #700070 color: #700070
} }
span.vhdllogic { span.vhdllogic {
color: #ff0000 color: #ff0000
} }
blockquote { blockquote {
@ -464,7 +464,7 @@ table.memberdecls {
} }
.memdoc, dl.reflist dd { .memdoc, dl.reflist dd {
border: 1px solid #A8B8D9; border: 1px solid #A8B8D9;
padding: 6px 10px 2px 10px; padding: 6px 10px 2px 10px;
background-color: #FBFCFD; background-color: #FBFCFD;
background-color: #FFFFFF; background-color: #FFFFFF;
@ -507,18 +507,18 @@ dl.reflist dd {
.params, .retval, .exception, .tparams { .params, .retval, .exception, .tparams {
margin-left: 0px; margin-left: 0px;
padding-left: 0px; padding-left: 0px;
} }
.params .paramname, .retval .paramname { .params .paramname, .retval .paramname {
font-weight: bold; font-weight: bold;
vertical-align: top; vertical-align: top;
} }
.params .paramtype { .params .paramtype {
font-style: italic; font-style: italic;
vertical-align: top; vertical-align: top;
} }
.params .paramdir { .params .paramdir {
font-family: "courier new",courier,monospace; font-family: "courier new",courier,monospace;
vertical-align: top; vertical-align: top;
@ -754,7 +754,7 @@ table.fieldtable {
color: #283A5D; color: #283A5D;
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
text-decoration: none; text-decoration: none;
} }
.navpath li.navelem a:hover { .navpath li.navelem a:hover {
@ -777,7 +777,7 @@ table.fieldtable {
div.summary { div.summary {
font-size: 8pt; font-size: 8pt;
padding-right: 5px; padding-right: 5px;
} }
div.summary a { div.summary a {
white-space: nowrap; white-space: nowrap;
@ -875,17 +875,17 @@ dl.section dd {
vertical-align: bottom; vertical-align: bottom;
border-collapse: separate; border-collapse: separate;
} }
#projectlogo img { #projectlogo img {
border: 0px none; border: 0px none;
} }
#projectname { #projectname {
font: 300% Tahoma, Arial,sans-serif; font: 300% Tahoma, Arial,sans-serif;
margin: 0px; margin: 0px;
padding: 2px 0px; padding: 2px 0px;
} }
#projectbrief { #projectbrief {
font: 120% Tahoma, Arial,sans-serif; font: 120% Tahoma, Arial,sans-serif;
margin: 0px; margin: 0px;
@ -971,7 +971,7 @@ div.toc ul {
list-style: none outside none; list-style: none outside none;
border: medium none; border: medium none;
padding: 0px; padding: 0px;
} }
div.toc li.level1 { div.toc li.level1 {
margin-left: 0px; margin-left: 0px;
@ -1022,7 +1022,7 @@ tr.heading h2 {
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
.summary { display: none; } .summary { display: none; }
.memitem { page-break-inside: avoid; } .memitem { page-break-inside: avoid; }
#doc-content { #doc-content {
margin-left:0 !important; margin-left:0 !important;
height:auto !important; height:auto !important;

View File

@ -14,24 +14,24 @@
/// ///
/// #include <SFML/Audio.hpp> /// #include <SFML/Audio.hpp>
/// #include <SFML/Graphics.hpp> /// #include <SFML/Graphics.hpp>
/// ///
/// int main() /// int main()
/// { /// {
/// // Create the main window /// // Create the main window
/// sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window"); /// sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
/// ///
/// // Load a sprite to display /// // Load a sprite to display
/// sf::Texture texture; /// sf::Texture texture;
/// if (!texture.loadFromFile("cute_image.jpg")) /// if (!texture.loadFromFile("cute_image.jpg"))
/// return EXIT_FAILURE; /// return EXIT_FAILURE;
/// sf::Sprite sprite(texture); /// sf::Sprite sprite(texture);
/// ///
/// // Create a graphical text to display /// // Create a graphical text to display
/// sf::Font font; /// sf::Font font;
/// if (!font.loadFromFile("arial.ttf")) /// if (!font.loadFromFile("arial.ttf"))
/// return EXIT_FAILURE; /// return EXIT_FAILURE;
/// sf::Text text("Hello SFML", font, 50); /// sf::Text text("Hello SFML", font, 50);
/// ///
/// // Load a music to play /// // Load a music to play
/// sf::Music music; /// sf::Music music;
/// if (!music.openFromFile("nice_music.ogg")) /// if (!music.openFromFile("nice_music.ogg"))
@ -39,7 +39,7 @@
/// ///
/// // Play the music /// // Play the music
/// music.play(); /// music.play();
/// ///
/// // Start the game loop /// // Start the game loop
/// while (window.isOpen()) /// while (window.isOpen())
/// { /// {
@ -51,20 +51,20 @@
/// if (event.type == sf::Event::Closed) /// if (event.type == sf::Event::Closed)
/// window.close(); /// window.close();
/// } /// }
/// ///
/// // Clear screen /// // Clear screen
/// window.clear(); /// window.clear();
/// ///
/// // Draw the sprite /// // Draw the sprite
/// window.draw(sprite); /// window.draw(sprite);
/// ///
/// // Draw the string /// // Draw the string
/// window.draw(text); /// window.draw(text);
/// ///
/// // Update the window /// // Update the window
/// window.display(); /// window.display();
/// } /// }
/// ///
/// return EXIT_SUCCESS; /// return EXIT_SUCCESS;
/// } /// }
/// \endcode /// \endcode

View File

@ -19,8 +19,8 @@
android:label="@string/app_name" android:label="@string/app_name"
android:icon="@drawable/sfml_logo" android:icon="@drawable/sfml_logo"
android:configChanges="keyboardHidden|orientation|screenSize"> android:configChanges="keyboardHidden|orientation|screenSize">
<meta-data android:name="android.app.lib_name" android:value="sfml-activity" /> <meta-data android:name="android.app.lib_name" android:value="sfml-activity" />
<meta-data android:name="sfml.app.lib_name" android:value="sfml-example" /> <meta-data android:name="sfml.app.lib_name" android:value="sfml-example" />
<intent-filter> <intent-filter>

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
} }
window.clear(sf::Color::White); window.clear(sf::Color::White);
window.draw(image); window.draw(image);
window.display(); window.display();
} }
} }

View File

@ -26,7 +26,7 @@ set_source_files_properties(${RESOURCES} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources) MACOSX_PACKAGE_LOCATION Resources)
set_target_properties(cocoa PROPERTIES set_target_properties(cocoa PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${SRCROOT}/resources/Cocoa-Info.plist) MACOSX_BUNDLE_INFO_PLIST ${SRCROOT}/resources/Cocoa-Info.plist)
target_link_libraries(cocoa "-framework Cocoa -framework Foundation" target_link_libraries(cocoa "-framework Cocoa -framework Foundation"
sfml-system sfml-window sfml-graphics) sfml-system sfml-window sfml-graphics)
# set the target's folder (for IDEs that support it, e.g. Visual Studio) # set the target's folder (for IDEs that support it, e.g. Visual Studio)
@ -42,10 +42,10 @@ set(XIB_OUTPUT_PATH "${RESOURCE_PATH}/")
set(XIB_INPUT_PATH "${SRCROOT}/") set(XIB_INPUT_PATH "${SRCROOT}/")
foreach(XIB ${XIBS}) foreach(XIB ${XIBS})
add_custom_command(TARGET cocoa add_custom_command(TARGET cocoa
POST_BUILD POST_BUILD
COMMAND ${IBTOOL} --errors COMMAND ${IBTOOL} --errors
--output-format human-readable-text --output-format human-readable-text
--compile ${XIB_OUTPUT_PATH}/${XIB}.nib --compile ${XIB_OUTPUT_PATH}/${XIB}.nib
${XIB_INPUT_PATH}/${XIB}.xib ${XIB_INPUT_PATH}/${XIB}.xib
COMMENT "Compiling ${XIB}.xib") COMMENT "Compiling ${XIB}.xib")
# deactivated options: --warnings --notices # deactivated options: --warnings --notices

View File

@ -6,10 +6,10 @@ This is a small example of the integration of SFML in a Cocoa application.
Features Features
-------- --------
* This example shows how basic UI elements can interact with SFML * This example shows how basic UI elements can interact with SFML
render areas such as sf::RenderWindow (you can use sf::Window and render areas such as sf::RenderWindow (you can use sf::Window and
OpenGL code too, of course). OpenGL code too, of course).
* It also provides tools for converting NSString to and from * It also provides tools for converting NSString to and from
std::[w]string in an Objective-C Category of NSString. std::[w]string in an Objective-C Category of NSString.
* Moreover, it shows how you can prevent annoying the system alerts * Moreover, it shows how you can prevent annoying the system alerts
produced when the SFML view has focus and the user press a key produced when the SFML view has focus and the user press a key

View File

@ -91,7 +91,7 @@ int main()
while (window.pollEvent(event)) while (window.pollEvent(event))
{ {
// Window closed or escape key pressed: exit // Window closed or escape key pressed: exit
if ((event.type == sf::Event::Closed) || if ((event.type == sf::Event::Closed) ||
((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Escape))) ((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Escape)))
{ {
window.close(); window.close();
@ -188,7 +188,7 @@ int main()
// Check the collisions between the ball and the paddles // Check the collisions between the ball and the paddles
// Left Paddle // Left Paddle
if (ball.getPosition().x - ballRadius < leftPaddle.getPosition().x + paddleSize.x / 2 && if (ball.getPosition().x - ballRadius < leftPaddle.getPosition().x + paddleSize.x / 2 &&
ball.getPosition().x - ballRadius > leftPaddle.getPosition().x && ball.getPosition().x - ballRadius > leftPaddle.getPosition().x &&
ball.getPosition().y + ballRadius >= leftPaddle.getPosition().y - paddleSize.y / 2 && ball.getPosition().y + ballRadius >= leftPaddle.getPosition().y - paddleSize.y / 2 &&
ball.getPosition().y - ballRadius <= leftPaddle.getPosition().y + paddleSize.y / 2) ball.getPosition().y - ballRadius <= leftPaddle.getPosition().y + paddleSize.y / 2)

View File

@ -5,5 +5,5 @@ void main()
{ {
vec4 pixel = gl_Color; vec4 pixel = gl_Color;
pixel.a = blink_alpha; pixel.a = blink_alpha;
gl_FragColor = pixel; gl_FragColor = pixel;
} }

View File

@ -3,10 +3,10 @@ uniform float blur_radius;
void main() void main()
{ {
vec2 offx = vec2(blur_radius, 0.0); vec2 offx = vec2(blur_radius, 0.0);
vec2 offy = vec2(0.0, blur_radius); vec2 offy = vec2(0.0, blur_radius);
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 4.0 + vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 4.0 +
texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 + texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 +
texture2D(texture, gl_TexCoord[0].xy + offx) * 2.0 + texture2D(texture, gl_TexCoord[0].xy + offx) * 2.0 +
texture2D(texture, gl_TexCoord[0].xy - offy) * 2.0 + texture2D(texture, gl_TexCoord[0].xy - offy) * 2.0 +
@ -16,5 +16,5 @@ void main()
texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 + texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 +
texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0; texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0;
gl_FragColor = gl_Color * (pixel / 16.0); gl_FragColor = gl_Color * (pixel / 16.0);
} }

View File

@ -4,17 +4,17 @@ uniform float edge_threshold;
void main() void main()
{ {
const float offset = 1.0 / 512.0; const float offset = 1.0 / 512.0;
vec2 offx = vec2(offset, 0.0); vec2 offx = vec2(offset, 0.0);
vec2 offy = vec2(0.0, offset); vec2 offy = vec2(0.0, offset);
vec4 hEdge = texture2D(texture, gl_TexCoord[0].xy - offy) * -2.0 + vec4 hEdge = texture2D(texture, gl_TexCoord[0].xy - offy) * -2.0 +
texture2D(texture, gl_TexCoord[0].xy + offy) * 2.0 + texture2D(texture, gl_TexCoord[0].xy + offy) * 2.0 +
texture2D(texture, gl_TexCoord[0].xy - offx - offy) * -1.0 + texture2D(texture, gl_TexCoord[0].xy - offx - offy) * -1.0 +
texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1.0 + texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1.0 +
texture2D(texture, gl_TexCoord[0].xy + offx - offy) * -1.0 + texture2D(texture, gl_TexCoord[0].xy + offx - offy) * -1.0 +
texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0; texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0;
vec4 vEdge = texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 + vec4 vEdge = texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 +
texture2D(texture, gl_TexCoord[0].xy + offx) * -2.0 + texture2D(texture, gl_TexCoord[0].xy + offx) * -2.0 +
texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1.0 + texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1.0 +
texture2D(texture, gl_TexCoord[0].xy - offx + offy) * -1.0 + texture2D(texture, gl_TexCoord[0].xy - offx + offy) * -1.0 +
@ -28,5 +28,5 @@ void main()
pixel.rgb = vec3(0.0, 0.0, 0.0); pixel.rgb = vec3(0.0, 0.0, 0.0);
else else
pixel.a = edge_threshold; pixel.a = edge_threshold;
gl_FragColor = pixel; gl_FragColor = pixel;
} }

View File

@ -4,6 +4,6 @@ uniform float pixel_threshold;
void main() void main()
{ {
float factor = 1.0 / (pixel_threshold + 0.001); float factor = 1.0 / (pixel_threshold + 0.001);
vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor; vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor;
gl_FragColor = texture2D(texture, pos) * gl_Color; gl_FragColor = texture2D(texture, pos) * gl_Color;
} }

View File

@ -13,7 +13,7 @@ void main()
vertex.xy = storm_position + normalize(offset) * push_distance; vertex.xy = storm_position + normalize(offset) * push_distance;
} }
gl_Position = gl_ProjectionMatrix * vertex; gl_Position = gl_ProjectionMatrix * vertex;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_FrontColor = gl_Color; gl_FrontColor = gl_Color;
} }

View File

@ -9,7 +9,7 @@ void main()
vertex.y += sin(gl_Vertex.x * 0.02 + wave_phase * 2.4) * wave_amplitude.y vertex.y += sin(gl_Vertex.x * 0.02 + wave_phase * 2.4) * wave_amplitude.y
+ cos(gl_Vertex.x * 0.02 + wave_phase * 5.2) * wave_amplitude.y * 0.3; + cos(gl_Vertex.x * 0.02 + wave_phase * 5.2) * wave_amplitude.y * 0.3;
gl_Position = gl_ModelViewProjectionMatrix * vertex; gl_Position = gl_ModelViewProjectionMatrix * vertex;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_FrontColor = gl_Color; gl_FrontColor = gl_Color;
} }

View File

@ -90,7 +90,7 @@ int main()
// Play music from an ogg file // Play music from an ogg file
playMusic("orchestral.ogg"); playMusic("orchestral.ogg");
// Play music from a flac file // Play music from a flac file
playMusic("ding.flac"); playMusic("ding.flac");

View File

@ -50,7 +50,7 @@ LRESULT CALLBACK onEvent(HWND handle, UINT message, WPARAM wParam, LPARAM lParam
int main() int main()
{ {
HINSTANCE instance = GetModuleHandle(NULL); HINSTANCE instance = GetModuleHandle(NULL);
// Define a class for our main window // Define a class for our main window
WNDCLASS windowClass; WNDCLASS windowClass;
windowClass.style = 0; windowClass.style = 0;

View File

@ -52,5 +52,5 @@
/// ///
/// Sounds, streaming (musics or custom sources), recording, /// Sounds, streaming (musics or custom sources), recording,
/// spatialization. /// spatialization.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -210,7 +210,7 @@ public:
/// audio environment, it defines where and how sounds and musics /// audio environment, it defines where and how sounds and musics
/// are heard. If sf::View is the eyes of the user, then sf::Listener /// are heard. If sf::View is the eyes of the user, then sf::Listener
/// is his ears (by the way, they are often linked together -- /// is his ears (by the way, they are often linked together --
/// same position, orientation, etc.). /// same position, orientation, etc.).
/// ///
/// sf::Listener is a simple interface, which allows to setup the /// sf::Listener is a simple interface, which allows to setup the
/// listener in the 3D audio environment (position, direction and /// listener in the 3D audio environment (position, direction and

View File

@ -146,7 +146,7 @@ SFML_GRAPHICS_API bool operator !=(const BlendMode& left, const BlendMode& right
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Commonly used blending modes // 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 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 BlendAdd; ///< Add source to dest
SFML_GRAPHICS_API extern const BlendMode BlendMultiply; ///< Multiply source and 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 BlendNone; ///< Overwrite dest with source
@ -164,7 +164,7 @@ SFML_GRAPHICS_API extern const BlendMode BlendNone; ///< Overwrite dest with
/// sf::BlendMode is a class that represents a blend mode. A blend /// sf::BlendMode is a class that represents a blend mode. A blend
/// mode determines how the colors of an object you draw are /// mode determines how the colors of an object you draw are
/// mixed with the colors that are already in the buffer. /// mixed with the colors that are already in the buffer.
/// ///
/// The class is composed of 6 components, each of which has its /// The class is composed of 6 components, each of which has its
/// own public member variable: /// own public member variable:
/// \li %Color Source Factor (@ref colorSrcFactor) /// \li %Color Source Factor (@ref colorSrcFactor)
@ -173,7 +173,7 @@ SFML_GRAPHICS_API extern const BlendMode BlendNone; ///< Overwrite dest with
/// \li Alpha Source Factor (@ref alphaSrcFactor) /// \li Alpha Source Factor (@ref alphaSrcFactor)
/// \li Alpha Destination Factor (@ref alphaDstFactor) /// \li Alpha Destination Factor (@ref alphaDstFactor)
/// \li Alpha Blend Equation (@ref alphaEquation) /// \li Alpha Blend Equation (@ref alphaEquation)
/// ///
/// The source factor specifies how the pixel you are drawing contributes /// The source factor specifies how the pixel you are drawing contributes
/// to the final color. The destination factor specifies how the pixel /// to the final color. The destination factor specifies how the pixel
/// already drawn in the buffer contributes to the final color. /// already drawn in the buffer contributes to the final color.

View File

@ -68,7 +68,7 @@ public:
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
explicit Color(Uint32 color); explicit Color(Uint32 color);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Retrieve the color as a 32-bit unsigned integer /// \brief Retrieve the color as a 32-bit unsigned integer
/// ///

View File

@ -262,7 +262,7 @@ private:
/// // Declare and load a texture /// // Declare and load a texture
/// sf::Texture texture; /// sf::Texture texture;
/// texture.loadFromFile("texture.png"); /// texture.loadFromFile("texture.png");
/// ///
/// // Create a sprite /// // Create a sprite
/// sf::Sprite sprite; /// sf::Sprite sprite;
/// sprite.setTexture(texture); /// sprite.setTexture(texture);

View File

@ -291,7 +291,7 @@ private:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Make sure the text's geometry is updated /// \brief Make sure the text's geometry is updated
/// ///
/// All the attributes related to rendering are cached, such /// All the attributes related to rendering are cached, such
/// that the geometry is only updated when necessary. /// that the geometry is only updated when necessary.
/// ///
@ -356,7 +356,7 @@ private:
/// // Declare and load a font /// // Declare and load a font
/// sf::Font font; /// sf::Font font;
/// font.loadFromFile("arial.ttf"); /// font.loadFromFile("arial.ttf");
/// ///
/// // Create a text /// // Create a text
/// sf::Text text("hello", font); /// sf::Text text("hello", font);
/// text.setCharacterSize(30); /// text.setCharacterSize(30);

View File

@ -413,7 +413,7 @@ private:
/// \endcode /// \endcode
/// ///
/// A note on coordinates and undistorted rendering: \n /// A note on coordinates and undistorted rendering: \n
/// By default, SFML (or more exactly, OpenGL) may interpolate drawable objects /// By default, SFML (or more exactly, OpenGL) may interpolate drawable objects
/// such as sprites or texts when rendering. While this allows transitions /// such as sprites or texts when rendering. While this allows transitions
/// like slow movements or rotations to appear smoothly, it can lead to /// like slow movements or rotations to appear smoothly, it can lead to
/// unwanted results in some cases, for example blurred or distorted objects. /// unwanted results in some cases, for example blurred or distorted objects.
@ -423,7 +423,7 @@ private:
/// * The object's position, origin and scale have no fractional part /// * The object's position, origin and scale have no fractional part
/// * The object's and the view's rotation are a multiple of 90 degrees /// * The object's and the view's rotation are a multiple of 90 degrees
/// * The view's center and size have no fractional part /// * The view's center and size have no fractional part
/// ///
/// \see sf::Transform /// \see sf::Transform
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -313,7 +313,7 @@ private:
/// \code /// \code
/// sf::RenderWindow window; /// sf::RenderWindow window;
/// sf::View view; /// sf::View view;
/// ///
/// // Initialize the view to a rectangle located at (100, 100) and with a size of 400x200 /// // Initialize the view to a rectangle located at (100, 100) and with a size of 400x200
/// view.reset(sf::FloatRect(100, 100, 400, 200)); /// view.reset(sf::FloatRect(100, 100, 400, 200));
/// ///

View File

@ -207,7 +207,7 @@ private:
/// stream of data (TCP). Therefore, one call to send will always /// stream of data (TCP). Therefore, one call to send will always
/// match one call to receive (if the datagram is not lost), /// match one call to receive (if the datagram is not lost),
/// with the same data that was sent. /// with the same data that was sent.
/// ///
/// The UDP protocol is lightweight but unreliable. Unreliable /// The UDP protocol is lightweight but unreliable. Unreliable
/// means that datagrams may be duplicated, be lost or /// means that datagrams may be duplicated, be lost or
/// arrive reordered. However, if a datagram arrives, its /// arrive reordered. However, if a datagram arrives, its

View File

@ -56,5 +56,5 @@
/// Base module of SFML, defining various utilities. It provides /// Base module of SFML, defining various utilities. It provides
/// vector classes, Unicode strings and conversion functions, /// vector classes, Unicode strings and conversion functions,
/// threads and mutexes, timing classes. /// threads and mutexes, timing classes.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -94,16 +94,16 @@ private:
/// Usage example: /// Usage example:
/// \code /// \code
/// sf::Mutex mutex; /// sf::Mutex mutex;
/// ///
/// void function() /// void function()
/// { /// {
/// sf::Lock lock(mutex); // mutex is now locked /// sf::Lock lock(mutex); // mutex is now locked
/// ///
/// functionThatMayThrowAnException(); // mutex is unlocked if this function throws /// functionThatMayThrowAnException(); // mutex is unlocked if this function throws
/// ///
/// if (someCondition) /// if (someCondition)
/// return; // mutex is unlocked /// return; // mutex is unlocked
/// ///
/// } // mutex is unlocked /// } // mutex is unlocked
/// \endcode /// \endcode
/// ///
@ -116,15 +116,15 @@ private:
/// ///
/// \code /// \code
/// sf::Mutex mutex; /// sf::Mutex mutex;
/// ///
/// void function() /// void function()
/// { /// {
/// { /// {
/// sf::Lock lock(mutex); /// sf::Lock lock(mutex);
/// codeThatRequiresProtection(); /// codeThatRequiresProtection();
/// ///
/// } // mutex is unlocked here /// } // mutex is unlocked here
/// ///
/// codeThatDoesntCareAboutTheMutex(); /// codeThatDoesntCareAboutTheMutex();
/// } /// }
/// \endcode /// \endcode

View File

@ -119,7 +119,7 @@ private:
/// database.write(...); /// database.write(...);
/// mutex.unlock(); // if thread2 was waiting, it will now be unblocked /// mutex.unlock(); // if thread2 was waiting, it will now be unblocked
/// } /// }
/// ///
/// void thread2() /// void thread2()
/// { /// {
/// mutex.lock(); // this call will block the thread if the mutex is already locked by thread1 /// mutex.lock(); // this call will block the thread if the mutex is already locked by thread1

View File

@ -174,10 +174,10 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct SensorEvent struct SensorEvent
{ {
Sensor::Type type; ///< Type of the sensor Sensor::Type type; ///< Type of the sensor
float x; ///< Current value of the sensor on X axis float x; ///< Current value of the sensor on X axis
float y; ///< Current value of the sensor on Y axis float y; ///< Current value of the sensor on Y axis
float z; ///< Current value of the sensor on Z axis float z; ///< Current value of the sensor on Z axis
}; };
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -72,7 +72,7 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable a sensor /// \brief Enable or disable a sensor
/// ///
/// All sensors are disabled by default, to avoid consuming too /// All sensors are disabled by default, to avoid consuming too
/// much battery power. Once a sensor is enabled, it starts /// much battery power. Once a sensor is enabled, it starts
/// sending events of the corresponding type. /// sending events of the corresponding type.
/// ///

View File

@ -70,7 +70,7 @@ SoundBuffer::~SoundBuffer()
// called which removes the sound from the internal list. // called which removes the sound from the internal list.
SoundList sounds; SoundList sounds;
sounds.swap(m_sounds); sounds.swap(m_sounds);
// Detach the buffer from the sounds that use it (to avoid OpenAL errors) // Detach the buffer from the sounds that use it (to avoid OpenAL errors)
for (SoundList::const_iterator it = sounds.begin(); it != sounds.end(); ++it) for (SoundList::const_iterator it = sounds.begin(); it != sounds.end(); ++it)
(*it)->resetBuffer(); (*it)->resetBuffer();

View File

@ -74,9 +74,9 @@ bool SoundFileWriterFlac::open(const std::string& filename, unsigned int sampleR
} }
// Setup the encoder // Setup the encoder
FLAC__stream_encoder_set_channels(m_encoder, channelCount); FLAC__stream_encoder_set_channels(m_encoder, channelCount);
FLAC__stream_encoder_set_bits_per_sample(m_encoder, 16); FLAC__stream_encoder_set_bits_per_sample(m_encoder, 16);
FLAC__stream_encoder_set_sample_rate(m_encoder, sampleRate); FLAC__stream_encoder_set_sample_rate(m_encoder, sampleRate);
// Initialize the output stream // Initialize the output stream
if (FLAC__stream_encoder_init_file(m_encoder, filename.c_str(), NULL, NULL) != FLAC__STREAM_ENCODER_INIT_STATUS_OK) if (FLAC__stream_encoder_init_file(m_encoder, filename.c_str(), NULL, NULL) != FLAC__STREAM_ENCODER_INIT_STATUS_OK)

View File

@ -81,7 +81,7 @@ a((color & 0x000000ff) >> 0 )
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Uint32 Color::toInteger() Uint32 Color::toInteger()
{ {
return (r << 24) | (g << 16) | (b << 8) | a; return (r << 24) | (g << 16) | (b << 8) | a;
} }

View File

@ -33,5 +33,5 @@ install(TARGETS sfml-main ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel)
# from depending on shared libraries), we need a boostrap activity which # from depending on shared libraries), we need a boostrap activity which
# will load our shared libraries manually # will load our shared libraries manually
if(SFML_OS_ANDROID) if(SFML_OS_ANDROID)
sfml_add_library(sfml-activity SOURCES ${PROJECT_SOURCE_DIR}/src/SFML/Main/SFMLActivity.cpp) sfml_add_library(sfml-activity SOURCES ${PROJECT_SOURCE_DIR}/src/SFML/Main/SFMLActivity.cpp)
endif() endif()

View File

@ -68,13 +68,13 @@ const char *getLibraryName(JNIEnv* lJNIEnv, jobject& objectActivityInfo)
// Convert the application name to a C++ string and return it // Convert the application name to a C++ string and return it
const jsize applicationNameLength = lJNIEnv->GetStringUTFLength(valueString); const jsize applicationNameLength = lJNIEnv->GetStringUTFLength(valueString);
const char* applicationName = lJNIEnv->GetStringUTFChars(valueString, NULL); const char* applicationName = lJNIEnv->GetStringUTFChars(valueString, NULL);
if (applicationNameLength >= 256) if (applicationNameLength >= 256)
{ {
LOGE("The value of 'sfml.app.lib_name' must not be longer than 255 characters."); LOGE("The value of 'sfml.app.lib_name' must not be longer than 255 characters.");
exit(1); exit(1);
} }
strncpy(name, applicationName, applicationNameLength); strncpy(name, applicationName, applicationNameLength);
name[applicationNameLength] = '\0'; name[applicationNameLength] = '\0';
lJNIEnv->ReleaseStringUTFChars(valueString, applicationName); lJNIEnv->ReleaseStringUTFChars(valueString, applicationName);

View File

@ -38,7 +38,7 @@ class DefaultErrStreamBuf : public std::streambuf
{ {
public: public:
DefaultErrStreamBuf() DefaultErrStreamBuf()
{ {
// Allocate the write buffer // Allocate the write buffer
static const int size = 64; static const int size = 64;
@ -46,7 +46,7 @@ public:
setp(buffer, buffer + size); setp(buffer, buffer + size);
} }
~DefaultErrStreamBuf() ~DefaultErrStreamBuf()
{ {
// Synchronize // Synchronize
sync(); sync();

View File

@ -47,15 +47,15 @@ namespace
#if defined(SFML_SYSTEM_LINUX) #if defined(SFML_SYSTEM_LINUX)
static EGLDisplay display = EGL_NO_DISPLAY; static EGLDisplay display = EGL_NO_DISPLAY;
if (display == EGL_NO_DISPLAY) if (display == EGL_NO_DISPLAY)
{ {
display = eglCheck(eglGetDisplay(EGL_DEFAULT_DISPLAY)); display = eglCheck(eglGetDisplay(EGL_DEFAULT_DISPLAY));
eglCheck(eglInitialize(display, NULL, NULL)); eglCheck(eglInitialize(display, NULL, NULL));
} }
return display; return display;
#elif defined(SFML_SYSTEM_ANDROID) #elif defined(SFML_SYSTEM_ANDROID)
// On Android, its native activity handles this for us // On Android, its native activity handles this for us
@ -63,7 +63,7 @@ namespace
sf::Lock lock(states->mutex); sf::Lock lock(states->mutex);
return states->display; return states->display;
#endif #endif
} }
} }
@ -85,10 +85,10 @@ m_config (NULL)
// Get the best EGL config matching the default video settings // Get the best EGL config matching the default video settings
m_config = getBestConfig(m_display, VideoMode::getDesktopMode().bitsPerPixel, ContextSettings()); m_config = getBestConfig(m_display, VideoMode::getDesktopMode().bitsPerPixel, ContextSettings());
// Note: The EGL specs say that attrib_list can be NULL when passed to eglCreatePbufferSurface, // Note: The EGL specs say that attrib_list can be NULL when passed to eglCreatePbufferSurface,
// but this is resulting in a segfault. Bug in Android? // but this is resulting in a segfault. Bug in Android?
EGLint attrib_list[] = { EGLint attrib_list[] = {
EGL_WIDTH, 1, EGL_WIDTH, 1,
EGL_HEIGHT,1, EGL_HEIGHT,1,
EGL_NONE EGL_NONE
@ -120,15 +120,15 @@ m_config (NULL)
// Get the initialized EGL display // Get the initialized EGL display
m_display = getInitializedDisplay(); m_display = getInitializedDisplay();
// Get the best EGL config matching the requested video settings // Get the best EGL config matching the requested video settings
m_config = getBestConfig(m_display, bitsPerPixel, settings); m_config = getBestConfig(m_display, bitsPerPixel, settings);
// Create EGL context // Create EGL context
createContext(shared); createContext(shared);
#if !defined(SFML_SYSTEM_ANDROID) #if !defined(SFML_SYSTEM_ANDROID)
// Create EGL surface (except on Android because the window is created // Create EGL surface (except on Android because the window is created
// asynchronously, its activity manager will call it for us) // asynchronously, its activity manager will call it for us)
createSurface((EGLNativeWindowType)owner->getSystemHandle()); createSurface((EGLNativeWindowType)owner->getSystemHandle());
#endif #endif
@ -199,7 +199,7 @@ void EglContext::createContext(EglContext* shared)
EGL_CONTEXT_CLIENT_VERSION, 1, EGL_CONTEXT_CLIENT_VERSION, 1,
EGL_NONE EGL_NONE
}; };
EGLContext toShared; EGLContext toShared;
if (shared) if (shared)
@ -243,13 +243,13 @@ EGLConfig EglContext::getBestConfig(EGLDisplay display, unsigned int bitsPerPixe
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT,
EGL_NONE EGL_NONE
}; };
EGLint configCount; EGLint configCount;
EGLConfig configs[1]; EGLConfig configs[1];
// Ask EGL for the best config matching our video settings // Ask EGL for the best config matching our video settings
eglCheck(eglChooseConfig(display, attributes, configs, 1, &configCount)); eglCheck(eglChooseConfig(display, attributes, configs, 1, &configCount));
return configs[0]; return configs[0];
} }
@ -260,44 +260,44 @@ XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsP
{ {
// Get the initialized EGL display // Get the initialized EGL display
EGLDisplay display = getInitializedDisplay(); EGLDisplay display = getInitializedDisplay();
// Get the best EGL config matching the default video settings // Get the best EGL config matching the default video settings
EGLConfig config = getBestConfig(display, bitsPerPixel, settings); EGLConfig config = getBestConfig(display, bitsPerPixel, settings);
// Retrieve the visual id associated with this EGL config // Retrieve the visual id associated with this EGL config
EGLint nativeVisualId; EGLint nativeVisualId;
eglCheck(eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &nativeVisualId)); eglCheck(eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &nativeVisualId));
if (nativeVisualId == 0) if (nativeVisualId == 0)
{ {
// Should never happen... // Should never happen...
err() << "No EGL visual found. You should check your graphics driver" << std::endl; err() << "No EGL visual found. You should check your graphics driver" << std::endl;
return XVisualInfo(); return XVisualInfo();
} }
XVisualInfo vTemplate; XVisualInfo vTemplate;
vTemplate.visualid = static_cast<VisualID>(nativeVisualId); vTemplate.visualid = static_cast<VisualID>(nativeVisualId);
// Get X11 visuals compatible with this EGL config // Get X11 visuals compatible with this EGL config
XVisualInfo *availableVisuals, bestVisual; XVisualInfo *availableVisuals, bestVisual;
int visualCount = 0; int visualCount = 0;
availableVisuals = XGetVisualInfo(XDisplay, VisualIDMask, &vTemplate, &visualCount); availableVisuals = XGetVisualInfo(XDisplay, VisualIDMask, &vTemplate, &visualCount);
if (visualCount == 0) if (visualCount == 0)
{ {
// Can't happen... // Can't happen...
err() << "No X11 visual found. Bug in your EGL implementation ?" << std::endl; err() << "No X11 visual found. Bug in your EGL implementation ?" << std::endl;
return XVisualInfo(); return XVisualInfo();
} }
// Pick up the best one // Pick up the best one
bestVisual = availableVisuals[0]; bestVisual = availableVisuals[0];
XFree(availableVisuals); XFree(availableVisuals);
return bestVisual; return bestVisual;
} }
#endif #endif

View File

@ -148,7 +148,7 @@ public:
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static EGLConfig getBestConfig(EGLDisplay display, unsigned int bitsPerPixel, const ContextSettings& settings); static EGLConfig getBestConfig(EGLDisplay display, unsigned int bitsPerPixel, const ContextSettings& settings);
#ifdef SFML_SYSTEM_LINUX #ifdef SFML_SYSTEM_LINUX
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Select the best EGL visual for a given set of settings /// \brief Select the best EGL visual for a given set of settings

View File

@ -43,5 +43,5 @@ void Keyboard::setVirtualKeyboardVisible(bool visible)
{ {
priv::InputImpl::setVirtualKeyboardVisible(visible); priv::InputImpl::setVirtualKeyboardVisible(visible);
} }
} // namespace sf } // namespace sf

View File

@ -87,7 +87,7 @@ SFOpenGLView* getSFOpenGLViewFromSFMLWindow(const Window& window)
{ {
sf::err() << "The content view is not a valid SFOpenGLView" sf::err() << "The content view is not a valid SFOpenGLView"
<< std::endl; << std::endl;
view = nil; view = nil;
} }
} }

View File

@ -31,7 +31,7 @@
namespace sf namespace sf
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
bool Sensor::isAvailable(Type sensor) bool Sensor::isAvailable(Type sensor)
{ {

View File

@ -71,7 +71,7 @@ public:
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void setEnabled(Sensor::Type sensor, bool enabled); void setEnabled(Sensor::Type sensor, bool enabled);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check if a sensor is enabled /// \brief Check if a sensor is enabled
/// ///
@ -97,7 +97,7 @@ public:
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void update(); void update();
private: private:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -171,7 +171,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+ (Class)layerClass + (Class)layerClass
{ {
return [CAEAGLLayer class]; return [CAEAGLLayer class];
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -181,7 +181,7 @@
self.contentScaleFactor = factor; self.contentScaleFactor = factor;
if (self) if (self)
{ {
self.context = NULL; self.context = NULL;
self.touches = [NSMutableArray array]; self.touches = [NSMutableArray array];
@ -199,7 +199,7 @@
self.multipleTouchEnabled = true; self.multipleTouchEnabled = true;
} }
return self; return self;
} }

View File

@ -14,23 +14,23 @@ export LDFLAGS=$7
if [ "$1" = "arm" ] if [ "$1" = "arm" ]
then then
ARCH=arm-linux ARCH=arm-linux
ANDROID_ABI=armeabi ANDROID_ABI=armeabi
elif [ "$1" = "arm-v7a" ] elif [ "$1" = "arm-v7a" ]
then then
ARCH=arm-linux ARCH=arm-linux
ANDROID_ABI=armeabi-v7a ANDROID_ABI=armeabi-v7a
elif [ "$1" = "x86" ] elif [ "$1" = "x86" ]
then then
ARCH=i686-linux ARCH=i686-linux
ANDROID_ABI=x86 ANDROID_ABI=x86
elif [ "$1" = "mips" ] elif [ "$1" = "mips" ]
then then
ARCH=mips-linux ARCH=mips-linux
ANDROID_ABI=mips ANDROID_ABI=mips
fi fi
HOST="--host=$ARCH" HOST="--host=$ARCH"

View File

@ -2,43 +2,43 @@
create_toolchain () { create_toolchain () {
# abort if already created # abort if already created
if [ -d "$PWD/toolchains/$2" ] if [ -d "$PWD/toolchains/$2" ]
then then
return return
fi fi
# save the working directory and move to the NDK directory
WORKING_DIRECTORY=$PWD
cd $NDK
# prepare the command according to chosen options # save the working directory and move to the NDK directory
PLATFORM=--platform=android-$1 WORKING_DIRECTORY=$PWD
DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2 cd $NDK
MAKE=$NDK/build/tools/make-standalone-toolchain.sh
if [ "$2" = "arm" ] # prepare the command according to chosen options
then PLATFORM=--platform=android-$1
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8 DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2
elif [ "$2" = "x86" ] MAKE=$NDK/build/tools/make-standalone-toolchain.sh
then
TOOLCHAIN=--toolchain=x86-4.8
elif [ "$2" = "mips" ]
then
TOOLCHAIN=--toolchain=mipsel-linux-android-4.8
else
echo "Abort."
exit 1
fi
# create the standalone toolchain if [ "$2" = "arm" ]
$MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++ then
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
elif [ "$2" = "x86" ]
then
TOOLCHAIN=--toolchain=x86-4.8
elif [ "$2" = "mips" ]
then
TOOLCHAIN=--toolchain=mipsel-linux-android-4.8
else
echo "Abort."
exit 1
fi
# go back to our working directory # create the standalone toolchain
cd $WORKING_DIRECTORY $MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++
# move linux/soundcard.h to sys/soundcard.h # go back to our working directory
mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys cd $WORKING_DIRECTORY
# move linux/soundcard.h to sys/soundcard.h
mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys
} }
create_toolchain 9 arm create_toolchain 9 arm

View File

@ -22,43 +22,43 @@ mkdir build
wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz
if [ ! -d "$PWD/tmp/$FLAC" ] if [ ! -d "$PWD/tmp/$FLAC" ]
then then
tar -C build -xf src/$FLAC.tar.gz tar -C build -xf src/$FLAC.tar.gz
fi fi
wget -nc -P src http://downloads.xiph.org/releases/vorbis/$VORBIS.tar.gz wget -nc -P src http://downloads.xiph.org/releases/vorbis/$VORBIS.tar.gz
if [ ! -d "$PWD/tmp/$VORBIS" ] if [ ! -d "$PWD/tmp/$VORBIS" ]
then then
tar -C build -xf src/$VORBIS.tar.gz tar -C build -xf src/$VORBIS.tar.gz
fi fi
wget -nc -P src http://downloads.xiph.org/releases/ogg/$OGG.tar.gz wget -nc -P src http://downloads.xiph.org/releases/ogg/$OGG.tar.gz
if [ ! -d "$PWD/tmp/$OGG" ] if [ ! -d "$PWD/tmp/$OGG" ]
then then
tar -C build -xf src/$OGG.tar.gz tar -C build -xf src/$OGG.tar.gz
fi fi
wget -nc -P src http://www.mega-nerd.com/libsndfile/files/$SNDFILE.tar.gz wget -nc -P src http://www.mega-nerd.com/libsndfile/files/$SNDFILE.tar.gz
if [ ! -d "$PWD/tmp/$SNDFILE" ] if [ ! -d "$PWD/tmp/$SNDFILE" ]
then then
tar -C build -xf src/$SNDFILE.tar.gz tar -C build -xf src/$SNDFILE.tar.gz
fi fi
wget -nc -P src http://www.ijg.org/files/jpegsrc.v$JPEG_VERSION.tar.gz wget -nc -P src http://www.ijg.org/files/jpegsrc.v$JPEG_VERSION.tar.gz
if [ ! -d "$PWD/tmp/$JPEG" ] if [ ! -d "$PWD/tmp/$JPEG" ]
then then
tar -C build -xf src/jpegsrc.v$JPEG_VERSION.tar.gz tar -C build -xf src/jpegsrc.v$JPEG_VERSION.tar.gz
fi fi
wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz
if [ ! -d "$PWD/tmp/$FREETYPE" ] if [ ! -d "$PWD/tmp/$FREETYPE" ]
then then
tar -C build -xf src/$FREETYPE.tar.gz tar -C build -xf src/$FREETYPE.tar.gz
fi fi
wget -nc -P src https://github.com/AerialX/openal-soft-android/archive/master.tar.gz wget -nc -P src https://github.com/AerialX/openal-soft-android/archive/master.tar.gz
if [ ! -d "$PWD/tmp/openal-soft-android-master" ] if [ ! -d "$PWD/tmp/openal-soft-android-master" ]
then then
tar -C build -xf src/master.tar.gz tar -C build -xf src/master.tar.gz
fi fi
patch build/openal-soft-android-master/CMakeLists.txt patches/remove-so-version-suffix.diff patch build/openal-soft-android-master/CMakeLists.txt patches/remove-so-version-suffix.diff

View File

@ -3,9 +3,9 @@
# Abort if no known installation of NDK # Abort if no known installation of NDK
if [ "$NDK" == "" ] if [ "$NDK" == "" ]
then then
echo "Where is the NDK location ?" echo "Where is the NDK location ?"
echo -n "NDK: "; read NDK echo -n "NDK: "; read NDK
export NDK=$NDK export NDK=$NDK
fi fi
export ANDROID_NDK=$NDK export ANDROID_NDK=$NDK
@ -13,9 +13,9 @@ export ANDROID_NDK=$NDK
# Abort if we don't know the Android CMake toolchain location # Abort if we don't know the Android CMake toolchain location
if [ "$ANDROID_CMAKE_TOOLCHAIN" == "" ] if [ "$ANDROID_CMAKE_TOOLCHAIN" == "" ]
then then
echo "Where is the Android CMake toolchain ?" echo "Where is the Android CMake toolchain ?"
echo -n "ANDROID_CMAKE_TOOLCHAIN: "; read ANDROID_CMAKE_TOOLCHAIN echo -n "ANDROID_CMAKE_TOOLCHAIN: "; read ANDROID_CMAKE_TOOLCHAIN
export ANDROID_CMAKE_TOOLCHAIN=$ANDROID_CMAKE_TOOLCHAIN export ANDROID_CMAKE_TOOLCHAIN=$ANDROID_CMAKE_TOOLCHAIN
fi fi
./clean_all.sh ./clean_all.sh

View File

@ -1,5 +1,5 @@
--- CMakeLists.txt.orig 2013-09-21 15:23:49.305453804 +0200 --- CMakeLists.txt.orig 2013-09-21 15:23:49.305453804 +0200
+++ CMakeLists.txt 2013-09-21 15:24:08.621454210 +0200 +++ CMakeLists.txt 2013-09-21 15:24:08.621454210 +0200
@@ -717,9 +717,7 @@ @@ -717,9 +717,7 @@
# Build a library # Build a library
ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS}) ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS})