Merge branch 'master' of https://github.com/raysan5/raylib into dr/mini_al
This commit is contained in:
commit
f5ebbfb6bc
394 changed files with 64624 additions and 24400 deletions
25
.gitignore
vendored
25
.gitignore
vendored
|
|
@ -83,20 +83,20 @@ xcschememanagement.plist
|
||||||
xcuserdata/
|
xcuserdata/
|
||||||
DerivedData/
|
DerivedData/
|
||||||
|
|
||||||
# external libraries DLLs
|
|
||||||
!src/external/glfw3/lib/win32/glfw3.dll
|
|
||||||
!src/external/openal_soft/lib/win32/OpenAL32.dll
|
|
||||||
|
|
||||||
# Visual Studio project
|
# Visual Studio project
|
||||||
project/vs2015/*.db
|
project/vs2015/*.db
|
||||||
project/vs2015/*.opendb
|
project/vs2015/*.opendb
|
||||||
|
project/vs2015.UWP/packages
|
||||||
|
project/vs2015.UWP/*.db
|
||||||
!project/vs2015/raylib.sln
|
!project/vs2015/raylib.sln
|
||||||
!project/vs2015/raylib/*.vcxproj
|
!project/vs2015/raylib/*.vcxproj
|
||||||
!project/vs2015/examples/*.vcxproj
|
!project/vs2015/examples/*.vcxproj
|
||||||
!project/vs2015/external/glfw3/lib/win32/glfw3.dll
|
!project/vs2017/raylib.sln
|
||||||
!project/vs2015/external/openal_soft/lib/win32/OpenAL32.dll
|
!project/vs2017/raylib/*.vcxproj
|
||||||
!project/vs2015/external/openal_soft/lib/win64/OpenAL32.dll
|
!project/vs2017/examples/*.vcxproj
|
||||||
!project/vs2015/external/lua/lib/win32/lua53.dll
|
!project/vs2015.UWP/raylib/*.vcxproj
|
||||||
|
!project/vs2015.UWP/*.sln
|
||||||
|
!project/vs2015.UWP/raylib.App.UWP/*.vcxproj
|
||||||
|
|
||||||
# Web examples
|
# Web examples
|
||||||
docs/examples/web/*.html
|
docs/examples/web/*.html
|
||||||
|
|
@ -111,15 +111,11 @@ docs/examples/web/*/*.html
|
||||||
!docs/examples/web/shaders/loader.html
|
!docs/examples/web/shaders/loader.html
|
||||||
!docs/examples/web/models/loader.html
|
!docs/examples/web/models/loader.html
|
||||||
|
|
||||||
# Meson build system
|
|
||||||
builddir/
|
|
||||||
|
|
||||||
# CMake stuff
|
# CMake stuff
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
CMakeFiles
|
CMakeFiles
|
||||||
CMakeScripts
|
CMakeScripts
|
||||||
Testing
|
Testing
|
||||||
Makefile
|
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
install_manifest.txt
|
install_manifest.txt
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
|
@ -133,3 +129,8 @@ build
|
||||||
|
|
||||||
# Ignore Android generated files and folders
|
# Ignore Android generated files and folders
|
||||||
templates/android_project/output
|
templates/android_project/output
|
||||||
|
|
||||||
|
# Ignore GNU global tags
|
||||||
|
GPATH
|
||||||
|
GRTAGS
|
||||||
|
GTAGS
|
||||||
|
|
|
||||||
72
.travis.yml
72
.travis.yml
|
|
@ -1,50 +1,62 @@
|
||||||
language: c
|
language: c
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 3
|
depth: 3
|
||||||
|
|
||||||
os:
|
# TODO we could use a 32 bit Docker container for running true 32-bit tests
|
||||||
- osx
|
# services: - docker
|
||||||
- linux
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- VERBOSE=1
|
|
||||||
matrix:
|
matrix:
|
||||||
- CFLAGS=-m64
|
include:
|
||||||
- CFLAGS=-m32
|
- os: linux
|
||||||
|
env: ARCH=i386
|
||||||
|
sudo: required
|
||||||
|
- os: linux
|
||||||
|
env: ARCH=amd64
|
||||||
|
sudo: required
|
||||||
|
- os: osx
|
||||||
|
env: ARCH=universal
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- export CFLAGS="-std=gnu99 $CFLAGS"
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||||
sudo apt-get install -y gcc-multilib
|
sudo apt-get install -y gcc-multilib
|
||||||
libopenal-dev
|
libasound2-dev:$ARCH
|
||||||
libxcursor-dev libxinerama-dev
|
libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH
|
||||||
mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev;
|
libx11-dev:$ARCH libxrandr-dev:$ARCH libxi-dev:$ARCH
|
||||||
wget 'https://github.com/a3f/GLFW-3.2.1-Debian-binary-package/releases/download/v3.2.1/GLFW-3.2.1-Linux.deb' && sudo dpkg -i GLFW-3.2.1-Linux.deb;
|
libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH;
|
||||||
|
export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
|
||||||
|
if [ "$ARCH" == "i386" ]; then export CFLAGS="-m32"; fi;
|
||||||
|
if [ "$ARCH" == "amd64" ]; then export CFLAGS="-m64"; fi;
|
||||||
|
if [ "$GLFW" == "SYSTEM" ]; then
|
||||||
|
wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3_3.2.1-1_amd64.deb';
|
||||||
|
wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3-dev_3.2.1-1_amd64.deb';
|
||||||
|
sudo dpkg -i libglfw3_3.2.1-1_amd64.deb libglfw3-dev_3.2.1-1_amd64.deb;
|
||||||
|
fi;
|
||||||
|
fi
|
||||||
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||||
|
export RAYLIB_PACKAGE_SUFFIX="-macOS";
|
||||||
|
if [ "$GLFW" == "SYSTEM" ]; then brew update; brew install glfw; fi;
|
||||||
fi
|
fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; brew install glfw; fi
|
|
||||||
- "$CC --version"
|
- "$CC --version"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake -DBUILD_EXAMPLES=OFF -DBUILD_GAMES=OFF ..
|
- cmake -DMACOS_FATLIB=ON -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON -DUSE_EXTERNAL_GLFW=IF_POSSIBLE ..
|
||||||
- make
|
- make VERBOSE=1
|
||||||
# - make package
|
- make package
|
||||||
# - sudo make install
|
|
||||||
#
|
deploy:
|
||||||
#deploy:
|
provider: releases
|
||||||
# provider: releases
|
api_key:
|
||||||
# api_key:
|
secure: LvqUIAN/3dJul+Ra2iK3tSaNG5IwsNMmGIwVMy0DK5IBCxiQPBc9pWGiE30RTBPt6Z+N4BhMEE8DtUl+vnISlMoHWNIIhF2zwC66hs/F7zY7qEITMRSmfiLcqxQysknFOnJB06CATgXcFqlEo9j+t4abrG/f3qcb92J4O2uNz336Au2myTx93Q5MxbyA7KiUuEutFnb2dWiPCY4d+sGeXEfsiD2R7aj/8MaWOkoGdZVrTkI9juMgvpImkjQBArvqdjUMeT3MsRrwgOIq5v2GFV9dOl8k1WzPeT8B2JHh00ed/o1/wuFq/cLLOxtYo2+Pv3+xatOrlexoX0WkDm7C9/L1W5U4rLexU3CQ9mMBmHPnp6k/WXZ5QXEE4uUF0+LpN3XlIXzFpdZmZiVV8VLxg2WvyncMmivYiu7/MTkyfZxyKkzwl7sZZslzHA9kOGedGaN7b7/2B77OFHoQK8lKfdFml7jJnarh+89nenNZYMab0E8qkOJOyb2bYlDTa0/2nyxGiyymYgq6YHLNrDbhqB/1LzdgzjMliQ8ri5q9Ux2vjfcqOzhfAmcwFwnY/D6yXJWYi0DWpHZdpKl3du6dYDrypW91/yDWbwiJ/YhrE7ZunzrcB6GH/QkbuzWxdCth39rQAHih8DG01co/K3Gvi4yGjvIH5tFUpyEolMnpMiA=
|
||||||
# secure: XXX
|
file_glob: true
|
||||||
# file_glob: true
|
file: raylib-*.tar.gz
|
||||||
# file: raylib-*.tar.gz
|
skip_cleanup: true
|
||||||
# skip_cleanup: true
|
on:
|
||||||
# on:
|
repo: raysan5/raylib
|
||||||
# branch: master
|
branch: master
|
||||||
# tags: true
|
tags: true
|
||||||
|
|
|
||||||
51
CMakeLists.txt
Normal file → Executable file
51
CMakeLists.txt
Normal file → Executable file
|
|
@ -1,8 +1,54 @@
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
# Config options
|
# Config options
|
||||||
set(BUILD_EXAMPLES ON CACHE BOOL "Build the examples.")
|
option(BUILD_EXAMPLES "Build the examples." ON)
|
||||||
set(BUILD_GAMES ON CACHE BOOL "Build the example games.")
|
option(BUILD_GAMES "Build the example games." ON)
|
||||||
|
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
||||||
|
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
||||||
|
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended for run with ASAN)" OFF)
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set (CMAKE_C_STANDARD 99)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
function(add_if_flag_works flag)
|
||||||
|
CHECK_C_COMPILER_FLAG("${flag}" COMPILER_HAS_THOSE_TOGGLES)
|
||||||
|
set(outcome "Failed")
|
||||||
|
if(COMPILER_HAS_THOSE_TOGGLES)
|
||||||
|
foreach(var ${ARGN})
|
||||||
|
set(${var} "${flag} ${${var}}" PARENT_SCOPE)
|
||||||
|
endforeach()
|
||||||
|
set(outcome "works")
|
||||||
|
endif()
|
||||||
|
message(STATUS "Testing if ${flag} can be used -- ${outcome}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
add_if_flag_works(-Werror=pointer-arith CMAKE_C_FLAGS)
|
||||||
|
add_if_flag_works(-Werror=implicit-function-declaration CMAKE_C_FLAGS)
|
||||||
|
# src/external/jar_xm.h does shady stuff
|
||||||
|
add_if_flag_works(-fno-strict-aliasing CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
if (ENABLE_ASAN)
|
||||||
|
add_if_flag_works(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
add_if_flag_works(-fsanitize=address CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
endif()
|
||||||
|
if (ENABLE_UBSAN)
|
||||||
|
add_if_flag_works(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
add_if_flag_works(-fsanitize=undefined CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
endif()
|
||||||
|
if (ENABLE_MSAN)
|
||||||
|
add_if_flag_works(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
add_if_flag_works(-fsanitize=memory CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_MSAN AND ENABLE_ASAN)
|
||||||
|
MESSAGE(WARNING "Compiling with both AddressSanitizer and MemorySanitizer is not recommended")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src release)
|
add_subdirectory(src release)
|
||||||
|
|
||||||
|
|
@ -13,4 +59,3 @@ endif()
|
||||||
if (${BUILD_GAMES})
|
if (${BUILD_GAMES})
|
||||||
add_subdirectory(games)
|
add_subdirectory(games)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
128
CONTRIBUTING.md
Normal file
128
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
## Contributing to raylib
|
||||||
|
|
||||||
|
Hello contributors! Welcome to raylib!
|
||||||
|
|
||||||
|
This document contains a set of guidelines to contribute to the project. These are mostly guidelines, not rules.
|
||||||
|
Use your best judgement, and feel free to propose changes to this document in a pull-request.
|
||||||
|
|
||||||
|
### raylib philosophy
|
||||||
|
|
||||||
|
- raylib is a tool to LEARN videogames programming, every single function in raylib should be a tutorial on itself.
|
||||||
|
- raylib is SIMPLE and EASY-TO-USE, I tried to keep it compact with a small set of functions, if a function is too complex or is not clearly useful, better not to include it.
|
||||||
|
- raylib is open source and free; educators and institutions can use this tool to TEACH videogames programming completely by free.
|
||||||
|
- raylib is collaborative; contribution of tutorials / code-examples / bugs-solving / code-comments are highly appreciated.
|
||||||
|
- raylib's license (and its external libs respective licenses) allow using it for commercial products.
|
||||||
|
|
||||||
|
### Some interesting reads to start with
|
||||||
|
|
||||||
|
- [raylib history](HISTORY.md)
|
||||||
|
- [raylib architecture](https://github.com/raysan5/raylib/wiki/raylib-architecture)
|
||||||
|
- [raylib license](LICENSE.md)
|
||||||
|
- [raylib roadmap](ROADMAP.md)
|
||||||
|
|
||||||
|
[raylib Wiki](https://github.com/raysan5/raylib/wiki) contains some information about the library and is open to anyone for edit.
|
||||||
|
Feel free to review it if required, just take care not to break anything.
|
||||||
|
|
||||||
|
### raylib C coding conventions
|
||||||
|
|
||||||
|
Despite being written in C, raylib does not follow the standard Hungarian notation for C,
|
||||||
|
it [follows Pascal-case/camel-case notation](https://github.com/raysan5/raylib/wiki/raylib-coding-conventions),
|
||||||
|
more common on C# language. All code formatting decisions have been carefully taken
|
||||||
|
to make it easier for students to read, write and understand code.
|
||||||
|
|
||||||
|
Source code is extensively commented for that purpose, raylib primary learning method is:
|
||||||
|
|
||||||
|
> learn by reading code and examples
|
||||||
|
|
||||||
|
For detailed information on building raylib and examples, please check [raylib Wiki](https://github.com/raysan5/raylib/wiki).
|
||||||
|
|
||||||
|
### Opening new Issues
|
||||||
|
|
||||||
|
To open new issue for raylib (bug, enhancement, discussion...), just try to follow these rules:
|
||||||
|
|
||||||
|
- Make sure the issue has not already been reported before by searching on GitHub under Issues.
|
||||||
|
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a
|
||||||
|
title and clear description, as much relevant information as possible, and a code sample demonstrating the unexpected behavior.
|
||||||
|
- If applies, attach some screenshot of the issue and a .zip file with the code sample and required resources.
|
||||||
|
- On issue description, add a brackets tag about the raylib module that relates to this issue.
|
||||||
|
If don't know the module, just report the issue, I will review it.
|
||||||
|
- You can check other issues to see how is being done!
|
||||||
|
|
||||||
|
### Sending a Pull-Request
|
||||||
|
|
||||||
|
- Make sure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
|
||||||
|
- Don't send big pull-requests (lots of changelists), they are difficult to review. It's better to send small pull-request, one at a time.
|
||||||
|
- Verify that changes don't break the build (at least on Windows platform). As many platforms where you can test it, the better, but don't worry
|
||||||
|
if you cannot test all the platforms.
|
||||||
|
|
||||||
|
### raylib bindings
|
||||||
|
|
||||||
|
Some people ported raylib to other languages in form of bindings or wrappers to the library, here is a list with the ones I'm aware of:
|
||||||
|
|
||||||
|
- [raylib C/C++ version (default)](https://github.com/raysan5/raylib)
|
||||||
|
- [raylib Lua binding](https://github.com/raysan5/raylib-lua)
|
||||||
|
- [raylib Go binding](https://github.com/gen2brain/raylib-go)
|
||||||
|
- [raylib Nim binding](https://gitlab.com/define-private-public/raylib-Nim)
|
||||||
|
- [raylib Crystal binding](https://gitlab.com/Zatherz/cray)
|
||||||
|
- [raylib Perl wrapper](https://metacpan.org/pod/Graphics::Raylib)
|
||||||
|
- raylib Pascal binding with custom IDE (closed-source)
|
||||||
|
|
||||||
|
Usually, raylib bindings follow the convention: `raylib-{language}`
|
||||||
|
|
||||||
|
Let me know if you're writing a new binding for raylib, I will list it here and I usually
|
||||||
|
provide the icon/logo for that new language binding.
|
||||||
|
|
||||||
|
### Contact information
|
||||||
|
|
||||||
|
If you have any doubt, don't hesitate to [contact me](mailto:ray@raylib.com)!.
|
||||||
|
You can write me a direct mail but you can also contact me on the following networks:
|
||||||
|
|
||||||
|
- [raylib forum](http://forum.raylib.com/) - A good place for discussions or to ask for help.
|
||||||
|
- [raylib gitter](https://gitter.im/raylib) - A direct communication channel for project discussions.
|
||||||
|
- [raylib twitter](https://twitter.com/raysan5) - My personal twitter account, I usually post about raylib, you can send me PMs.
|
||||||
|
- [raylib web](http://www.raylib.com/) - On top-right corner there is a bunch of networks where you can find me.
|
||||||
|
|
||||||
|
Thank you very much for your time! :)
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Here is a list of raylib contributors, these people have invested part of their time
|
||||||
|
contributing (in some way or another) to make the raylib project better. Huge thanks to all of them!
|
||||||
|
|
||||||
|
- [Zopokx](https://github.com/Zopokx) for testing the web.
|
||||||
|
- [Elendow](http://www.elendow.com) for testing and helping on web development.
|
||||||
|
- Victor Dual for implementing and testing 3D shapes functions.
|
||||||
|
- Marc Palau for implementing and testing 3D shapes functions and contribute on camera and gestures modules.
|
||||||
|
- Kevin Gato for improving texture internal formats support and helping on raygui development.
|
||||||
|
- Daniel Nicolas for improving texture internal formats support and helping on raygui development.
|
||||||
|
- Marc Agüera for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
||||||
|
- Daniel Moreno for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
||||||
|
- Daniel Gomez for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
||||||
|
- [Sergio Martinez](https://github.com/anidealgift) for helping on raygui development and tools development (raygui_styler).
|
||||||
|
- [Victor Fisac](https://github.com/victorfisac) for developing physics raylib module (physac) and implementing PBR materials and lighting systems... among multiple other improvements and multiple tools and games.
|
||||||
|
- Albert Martos for helping on raygui and porting examples and game-templates to Android and HTML5.
|
||||||
|
- Ian Eito for helping on raygui and porting examples and game-templates to Android and HTML5.
|
||||||
|
- [procedural](https://github.com/procedural) for testing raylib on Linux, correcting some bugs and adding several mouse functions.
|
||||||
|
- [Chris Hemingway](https://github.com/cHemingway) for improving raylib on OSX build system.
|
||||||
|
- [Emanuele Petriglia](https://github.com/LelixSuper) for working on multiple GNU/Linux improvements and developing [TicTacToe](https://github.com/LelixSuper/TicTacToe) raylib game.
|
||||||
|
- [Joshua Reisenauer](https://github.com/kd7tck) for adding audio modules support (XM, MOD) and reviewing audio system.
|
||||||
|
- [Marcelo Paez](https://github.com/paezao) for his help on OSX to solve High DPI display issue. Thanks Marcelo!
|
||||||
|
- [Ghassan Al-Mashareqa](https://github.com/ghassanpl) for his amazing contribution with raylib Lua module, I just work over his code to implement [rlua](https://github.com/raysan5/raylib/blob/master/src/rlua.h)
|
||||||
|
- [Teodor Stoenescu](https://github.com/teodor-stoenescu) for his improvements on OBJ object loading.
|
||||||
|
- [RDR8](https://github.com/RDR8) for helping with Linux build improvements
|
||||||
|
- [Saggi Mizrahi](https://github.com/ficoos) for multiple fixes on Linux and audio system
|
||||||
|
- [Daniel Lemos](https://github.com/xspager) for fixing issues on Linux games building
|
||||||
|
- [Joel Davis](https://github.com/joeld42) for adding raycast picking utilities and a [great example](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_picking.c)
|
||||||
|
- [Richard Goodwin](https://github.com/AudioMorphology) for adding RPI touchscreen support
|
||||||
|
- [Milan Nikolic](https://github.com/gen2brain) for adding Android build support with custom standalone toolchain
|
||||||
|
- [Michael Vetter](https://github.com/jubalh) for improvements on build system and adding meson support for Linux
|
||||||
|
- [Wilhem Barbier](https://github.com/nounoursheureux) for adding Image generation functions and some fixes
|
||||||
|
- [Benjamin Summerton](https://github.com/define-private-public) for improving OSX building and his amazing work on CMake build sytem
|
||||||
|
- [MartinFX](https://github.com/Martinfx) for adding compilation support for FreeBSD OS
|
||||||
|
- [Wilhem Barbier](https://github.com/nounoursheureux) for supporting default shaders on shader loading, if shader not provided
|
||||||
|
- [Ahmad Fatoum](https://github.com/a3f) for implementing continuus integration support for raylib (Travis and AppVeyor) and greatly improving build system.
|
||||||
|
- [SamNChiet](https://github.com/SamNChiet) for his work on UWP inputs implementation.
|
||||||
|
- [David Reid](https://github.com/mackron) for a complete review of audio module to support his amazing mini_al audio library.
|
||||||
|
- [Kai](https://github.com/questor) for multiple code reviews and improvements.
|
||||||
|
|
||||||
|
Please, if I forget someone in this list, excuse me and write me an email to remind me to add you!
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
|
|
||||||
I believe that time is the most valuable resource and the following people have invested part of their time
|
|
||||||
contributing (in some way or another) to make raylib project better. Huge thanks!
|
|
||||||
|
|
||||||
- [Zopokx](https://github.com/Zopokx) for testing the web.
|
|
||||||
- [Elendow](http://www.elendow.com) for testing and helping on web development.
|
|
||||||
- Victor Dual for implementing and testing 3D shapes functions.
|
|
||||||
- Marc Palau for implementing and testing 3D shapes functions and contribute on camera and gestures modules.
|
|
||||||
- Kevin Gato for improving texture internal formats support and helping on raygui development.
|
|
||||||
- Daniel Nicolas for improving texture internal formats support and helping on raygui development.
|
|
||||||
- Marc Agüera for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
|
||||||
- Daniel Moreno for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
|
||||||
- Daniel Gomez for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
|
||||||
- [Sergio Martinez](https://github.com/anidealgift) for helping on raygui development and tools development (raygui_styler).
|
|
||||||
- [Victor Fisac](https://github.com/victorfisac) for developing physics raylib module (physac) and implementing PBR materials and lighting systems... among multiple other improvements and multiple tools and games.
|
|
||||||
- Albert Martos for helping on raygui and porting examples and game-templates to Android and HTML5.
|
|
||||||
- Ian Eito for helping on raygui and porting examples and game-templates to Android and HTML5.
|
|
||||||
- [procedural](https://github.com/procedural) for testing raylib on Linux, correcting some bugs and adding several mouse functions.
|
|
||||||
- [Chris Hemingway](https://github.com/cHemingway) for improving raylib on OSX build system.
|
|
||||||
- [Emanuele Petriglia](https://github.com/LelixSuper) for working on multiple GNU/Linux improvements and developing [TicTacToe](https://github.com/LelixSuper/TicTacToe) raylib game.
|
|
||||||
- [Joshua Reisenauer](https://github.com/kd7tck) for adding audio modules support (XM, MOD) and reviewing audio system.
|
|
||||||
- [Marcelo Paez](https://github.com/paezao) for his help on OSX to solve High DPI display issue. Thanks Marcelo!
|
|
||||||
- [Ghassan Al-Mashareqa](https://github.com/ghassanpl) for his amazing contribution with raylib Lua module, I just work over his code to implement [rlua](https://github.com/raysan5/raylib/blob/master/src/rlua.h)
|
|
||||||
- [Teodor Stoenescu](https://github.com/teodor-stoenescu) for his improvements on OBJ object loading.
|
|
||||||
- [RDR8](https://github.com/RDR8) for helping with Linux build improvements
|
|
||||||
- [Saggi Mizrahi](https://github.com/ficoos) for multiple fixes on Linux and audio system
|
|
||||||
- [Daniel Lemos](https://github.com/xspager) for fixing issues on Linux games building
|
|
||||||
- [Joel Davis](https://github.com/joeld42) for adding raycast picking utilities and a [great example](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_picking.c)
|
|
||||||
- [Richard Goodwin](https://github.com/AudioMorphology) for adding RPI touchscreen support
|
|
||||||
- [Milan Nikolic](https://github.com/gen2brain) for adding Android build support with custom standalone toolchain
|
|
||||||
- [Michael Vetter](https://github.com/jubalh) for improvements on build system and adding meson support for Linux
|
|
||||||
- [Wilhem Barbier](https://github.com/nounoursheureux) for adding Image generation functions and some fixes
|
|
||||||
- [Benjamin Summerton](https://github.com/define-private-public) for improving OSX building and his amazing work on CMake build sytem
|
|
||||||
|
|
||||||
Please, if I forget someone in this list, excuse me and write me an email to remind me to add you!
|
|
||||||
42
HISTORY.md
42
HISTORY.md
|
|
@ -73,12 +73,12 @@ attached to 3d models or used as fullscreen postrocessing effects. A bunch of po
|
||||||
in this release, check raylib/shaders folder.
|
in this release, check raylib/shaders folder.
|
||||||
|
|
||||||
Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files.
|
Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files.
|
||||||
A brand new [camera](https://github.com/raysan5/raylib/blob/develop/src/camera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person).
|
A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/camera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person).
|
||||||
Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/develop/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/develop/examples/core_3d_camera_first_person.c).
|
Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c).
|
||||||
|
|
||||||
New [gestures](https://github.com/raysan5/raylib/blob/develop/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs.
|
New [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs.
|
||||||
|
|
||||||
[raygui](https://github.com/raysan5/raylib/blob/develop/src/raygui.h), the new IMGUI (Immediate Mode GUI) module offers a set of functions to create simple user interfaces,
|
[raygui](https://github.com/raysan5/raylib/blob/master/src/raygui.h), the new IMGUI (Immediate Mode GUI) module offers a set of functions to create simple user interfaces,
|
||||||
primary intended for tools development. It's still in experimental state but already fully functional.
|
primary intended for tools development. It's still in experimental state but already fully functional.
|
||||||
|
|
||||||
Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features.
|
Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features.
|
||||||
|
|
@ -91,18 +91,18 @@ notes on raylib 1.4
|
||||||
On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For this new version,
|
On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For this new version,
|
||||||
lots of parts of the library have been reviewed, lots of bugs have been solved and some interesting features have been added.
|
lots of parts of the library have been reviewed, lots of bugs have been solved and some interesting features have been added.
|
||||||
|
|
||||||
First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/develop/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image.
|
First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image.
|
||||||
Now a basic image processing can be done before converting the image to texture for usage.
|
Now a basic image processing can be done before converting the image to texture for usage.
|
||||||
|
|
||||||
SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library).
|
SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library).
|
||||||
Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file.
|
Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file.
|
||||||
|
|
||||||
New [physac](https://github.com/raysan5/raylib/blob/develop/src/physac.h) physics module for basic 2D physics support. Still in development but already functional.
|
New [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) physics module for basic 2D physics support. Still in development but already functional.
|
||||||
Module comes with some usage examples for basic jump and level interaction and also force-based physic movements.
|
Module comes with some usage examples for basic jump and level interaction and also force-based physic movements.
|
||||||
|
|
||||||
[raymath](https://github.com/raysan5/raylib/blob/develop/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline.
|
[raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline.
|
||||||
|
|
||||||
[gestures](https://github.com/raysan5/raylib/blob/develop/src/gestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse.
|
[gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse.
|
||||||
This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
|
This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
|
||||||
|
|
||||||
Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`).
|
Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`).
|
||||||
|
|
@ -110,7 +110,7 @@ Gamepad support has also been added (experimental).
|
||||||
|
|
||||||
Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions,
|
Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions,
|
||||||
and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported).
|
and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported).
|
||||||
A simple [easings](https://github.com/raysan5/raylib/blob/develop/src/easings.h) module has also been added for values animation.
|
A simple [easings](https://github.com/raysan5/raylib/blob/master/src/easings.h) module has also been added for values animation.
|
||||||
|
|
||||||
Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn
|
Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn
|
||||||
how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris.
|
how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris.
|
||||||
|
|
@ -122,7 +122,7 @@ notes on raylib 1.5
|
||||||
|
|
||||||
On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new version is the biggest boost of the library until now, lots of parts of the library have been redesigned, lots of bugs have been solved and some **AMAZING** new features have been added.
|
On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new version is the biggest boost of the library until now, lots of parts of the library have been redesigned, lots of bugs have been solved and some **AMAZING** new features have been added.
|
||||||
|
|
||||||
VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/develop/examples/core_oculus_rift.c).
|
VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/master/examples/core_oculus_rift.c).
|
||||||
|
|
||||||
New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally.
|
New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally.
|
||||||
|
|
||||||
|
|
@ -130,15 +130,15 @@ New lighting system: added support for up to 8 configurable lights and 3 light t
|
||||||
|
|
||||||
Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread.
|
Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread.
|
||||||
|
|
||||||
Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/develop/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/develop/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread.
|
Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/master/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread.
|
||||||
|
|
||||||
Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck.
|
Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck.
|
||||||
|
|
||||||
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/develop/examples/core_2d_camera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/develop/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
|
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_camera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
|
||||||
|
|
||||||
This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/develop/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/develop/CHANGELOG) file for a more detailed list of changes.
|
This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes.
|
||||||
|
|
||||||
Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/develop/examples/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/develop/examples/audio_standalone.c) raylib modules as standalone libraries.
|
Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/master/examples/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/master/examples/audio_standalone.c) raylib modules as standalone libraries.
|
||||||
|
|
||||||
Lots of code changes (+400 commits) and lots of hours of hard work have concluded in this amazing new raylib 1.5.
|
Lots of code changes (+400 commits) and lots of hours of hard work have concluded in this amazing new raylib 1.5.
|
||||||
|
|
||||||
|
|
@ -149,7 +149,7 @@ On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new v
|
||||||
|
|
||||||
Complete [raylib Lua binding](https://github.com/raysan5/raylib-lua). All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality.
|
Complete [raylib Lua binding](https://github.com/raysan5/raylib-lua). All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality.
|
||||||
|
|
||||||
Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/develop/src/audio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/develop/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more!
|
Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/master/src/audio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/master/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more!
|
||||||
|
|
||||||
[Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
|
[Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
|
||||||
|
|
||||||
|
|
@ -187,17 +187,17 @@ notes on raylib 1.8
|
||||||
|
|
||||||
October 2017, around 5 months after latest raylib version, another release is published: raylib 1.8. Again, several modules of the library have been reviewed and some new functionality added. Main changes of this new release are:
|
October 2017, around 5 months after latest raylib version, another release is published: raylib 1.8. Again, several modules of the library have been reviewed and some new functionality added. Main changes of this new release are:
|
||||||
|
|
||||||
[Procedural image generation](https://github.com/raysan5/raylib/blob/develop/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning pourpouses.
|
[Procedural image generation](https://github.com/raysan5/raylib/blob/master/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning pourpouses.
|
||||||
|
|
||||||
[Parametric mesh generation](https://github.com/raysan5/raylib/blob/develop/examples/models/models_mesh_generation.c) functions, create 3d meshes from scratch just defining a set of parameters, meshes like cube, sphere, cylinder, torus, knot and more can be very useful for prototyping or for lighting and texture testing.
|
[Parametric mesh generation](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_generation.c) functions, create 3d meshes from scratch just defining a set of parameters, meshes like cube, sphere, cylinder, torus, knot and more can be very useful for prototyping or for lighting and texture testing.
|
||||||
|
|
||||||
PBR Materials support, a completely redesigned shaders and material system allows advance materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/develop/examples/models/models_material_pbr.c) is also provided for reference.
|
PBR Materials support, a completely redesigned shaders and material system allows advance materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) is also provided for reference.
|
||||||
|
|
||||||
Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/develop/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
|
Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/master/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
|
||||||
|
|
||||||
[rlgl](https://github.com/raysan5/raylib/blob/develop/src/rlgl.c) module has been completely reviewed and most of the functions renamed for consistency. This way, standalone usage of rlgl is promoted, with a [complete example provided](https://github.com/raysan5/raylib/blob/develop/examples/others/rlgl_standalone.c). rlgl offers a pseudo-OpenGL 1.1 immediate-mode programming-style layer, with backends to multiple OpenGL versions.
|
[rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) module has been completely reviewed and most of the functions renamed for consistency. This way, standalone usage of rlgl is promoted, with a [complete example provided](https://github.com/raysan5/raylib/blob/master/examples/others/rlgl_standalone.c). rlgl offers a pseudo-OpenGL 1.1 immediate-mode programming-style layer, with backends to multiple OpenGL versions.
|
||||||
|
|
||||||
[raymath](https://github.com/raysan5/raylib/blob/develop/src/rlgl.c) library has been also reviewed to align with other advance math libraries like [GLM](https://github.com/g-truc/glm). Matrix math has been improved and simplified, some new Quaternion functions have been added and Vector3 functions have been renamed all around the library for consistency with new Vector2 functionality.
|
[raymath](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) library has been also reviewed to align with other advance math libraries like [GLM](https://github.com/g-truc/glm). Matrix math has been improved and simplified, some new Quaternion functions have been added and Vector3 functions have been renamed all around the library for consistency with new Vector2 functionality.
|
||||||
|
|
||||||
Additionally, as always, examples and templates have been reviewed to work with new version (some new examples have been added), all external libraries have been updated to latest stable version and latest Notepad++ and MinGW have been configured to work with new raylib. For a full list of changes, just check [CHANGELOG](CHANGELOG).
|
Additionally, as always, examples and templates have been reviewed to work with new version (some new examples have been added), all external libraries have been updated to latest stable version and latest Notepad++ and MinGW have been configured to work with new raylib. For a full list of changes, just check [CHANGELOG](CHANGELOG).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ applications, and to alter it and redistribute it freely, subject to the followi
|
||||||
fonts
|
fonts
|
||||||
------
|
------
|
||||||
|
|
||||||
The following fonts [provided with raylib](https://github.com/raysan5/raylib/tree/develop/examples/text/resources/fonts) are free to use (freeware) and have been designed by the following people:
|
The following fonts [provided with raylib](https://github.com/raysan5/raylib/tree/master/examples/text/resources/fonts) are free to use (freeware) and have been designed by the following people:
|
||||||
|
|
||||||
* Alpha Beta - Brian Kent (AEnigma)
|
* Alpha Beta - Brian Kent (AEnigma)
|
||||||
* Setback - Brian Kent (AEnigma)
|
* Setback - Brian Kent (AEnigma)
|
||||||
|
|
@ -41,9 +41,9 @@ The following fonts [provided with raylib](https://github.com/raysan5/raylib/tre
|
||||||
2d art
|
2d art
|
||||||
------
|
------
|
||||||
|
|
||||||
[scarfy spritesheet](https://github.com/raysan5/raylib/blob/develop/examples/textures/resources/scarfy.png) and [fudesumi image](https://github.com/raysan5/raylib/blob/develop/examples/textures/resources/fudesumi.png) have been created by [Eiden Marsal](https://www.artstation.com/artist/marshall_z) and licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode)
|
[scarfy spritesheet](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/scarfy.png) and [fudesumi image](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/fudesumi.png) have been created by [Eiden Marsal](https://www.artstation.com/artist/marshall_z) and licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode)
|
||||||
|
|
||||||
3d models
|
3d models
|
||||||
---------
|
---------
|
||||||
|
|
||||||
[dwarf 3d model and textures](https://github.com/raysan5/raylib/tree/develop/examples/models/resources/model) have been created by David Moreno and licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode)
|
[dwarf 3d model and textures](https://github.com/raysan5/raylib/tree/master/examples/models/resources/model) have been created by David Moreno and licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode)
|
||||||
|
|
|
||||||
38
README.md
38
README.md
|
|
@ -1,4 +1,4 @@
|
||||||
<img align="left" src="https://github.com/raysan5/raylib/blob/master/logo/logo256x256.png" width=256>
|
<img align="left" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_256x256.png" width=256>
|
||||||
|
|
||||||
**raylib is a simple and easy-to-use library to learn videogames programming.**
|
**raylib is a simple and easy-to-use library to learn videogames programming.**
|
||||||
|
|
||||||
|
|
@ -11,39 +11,46 @@ no fancy interface, no visual helpers, no auto-debugging... just coding in the m
|
||||||
pure spartan-programmers way. Are you ready to learn? Jump to [code examples!](http://www.raylib.com/examples.html)
|
pure spartan-programmers way. Are you ready to learn? Jump to [code examples!](http://www.raylib.com/examples.html)
|
||||||
|
|
||||||
[](https://travis-ci.org/raysan5/raylib)
|
[](https://travis-ci.org/raysan5/raylib)
|
||||||
|
[](https://ci.appveyor.com/project/raysan5/raylib)
|
||||||
|
[](https://gitter.im/raylib/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
[](https://discord.gg/VkzNHUE)
|
||||||
|
[](LICENSE.md)
|
||||||
|
[](https://twitter.com/raysan5)
|
||||||
|
|
||||||
features
|
features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* Written in plain C code (C99) in PascalCase/camelCase notation
|
* Written in plain C code (C99) in PascalCase/camelCase notation
|
||||||
* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES2)
|
* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES2 - choose at compile)
|
||||||
* Unique OpenGL abstraction layer (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c)
|
* Unique OpenGL abstraction layer (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c)
|
||||||
* Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF)
|
* Powerful fonts module with SpriteFonts support (XNA fonts, AngelCode fonts, TTF)
|
||||||
* Outstanding texture formats support, including compressed formats (DXT, ETC, PVRT, ASTC)
|
* Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
|
||||||
* Basic 3d support for Geometrics, Models, Billboards, Heightmaps and Cubicmaps
|
* Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
|
||||||
* Flexible Materials system, supporting classic maps and PBR maps
|
* Flexible Materials system, supporting classic maps and PBR maps
|
||||||
* Shaders support, including Model shaders and Postprocessing shaders
|
* Shaders support, including Model shaders and Postprocessing shaders
|
||||||
* Powerful math module for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
|
* Powerful math module for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
|
||||||
* Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD)
|
* Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD)
|
||||||
* Multiple platforms support: Windows, Linux, Mac, **Android**, **Raspberry Pi** and **HTML5**
|
* Multiple platforms support: Windows, Linux, FreeBSD, MacOS, UWP, Android, Raspberry Pi, HTML5.
|
||||||
* VR stereo rendering support with configurable HMD device parameters
|
* VR stereo rendering with configurable HMD device parameters
|
||||||
* Minimal external dependencies (GLFW3, OpenGL, OpenAL)
|
* NO external dependencies, all required libraries included with raylib
|
||||||
* Complete bindings to LUA ([raylib-lua](https://github.com/raysan5/raylib-lua)) and Go ([raylib-go](https://github.com/gen2brain/raylib-go))
|
* Complete bindings to LUA ([raylib-lua](https://github.com/raysan5/raylib-lua)) and Go ([raylib-go](https://github.com/gen2brain/raylib-go))
|
||||||
|
|
||||||
raylib uses on its core module the outstanding [GLFW3](http://www.glfw.org/) library. The best option I found for
|
raylib uses on its [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module the outstanding [GLFW3](http://www.glfw.org/) library, embedded inside raylib in the form of [rglfw](https://github.com/raysan5/raylib/blob/master/src/rglfw.c) module, avoiding that way external dependencies.
|
||||||
multiplatform (Windows, Linux, Mac) window/context and input management (clean, focused, great license, well documented, modern, maintained, ...).
|
|
||||||
|
|
||||||
raylib uses on its [audio](https://github.com/raysan5/raylib/blob/master/src/audio.c) module, [OpenAL Soft](http://kcat.strangesoft.net/openal.html) audio library, in multiple flavours,
|
raylib uses on its [audio](https://github.com/raysan5/raylib/blob/master/src/audio.c) module, the amazing [mini_al](https://github.com/dr-soft/mini_al) audio library, single-file header-only and supporting multiple platforms and multiple audio backends.
|
||||||
to accomodate to Android, Raspberry Pi and HTML5.
|
|
||||||
|
raylib uses internally multiple single-file header-only libraries to support multiple fileformats loading and saving, all those libraries are embedded with raylib and available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory.
|
||||||
|
|
||||||
*On Android, `native_app_glue module` (provided by Android NDK) and native Android libraries are used to manage window/context, inputs and activity life cycle.*
|
*On Android, `native_app_glue module` (provided by Android NDK) and native Android libraries are used to manage window/context, inputs and activity life cycle.*
|
||||||
|
|
||||||
*On Raspberry Pi, Videocore API and EGL libraries are used for window/context management and raw inputs reading.*
|
*On Raspberry Pi, Videocore API and EGL libraries are used for window/context management and raw inputs reading.*
|
||||||
|
|
||||||
building
|
build and installation
|
||||||
--------
|
----------------------
|
||||||
|
|
||||||
For detailed building instructions, check [raylib Wiki](https://github.com/raysan5/raylib/wiki).
|
Binary releases for Windows, Linux and macOS are available at the [Github Releases](https://github.com/raysan5/raylib/releases) page. raylib is also available via multiple package managers on multiple OS distributions. For more info check [raylib Wiki](https://github.com/raysan5/raylib/wiki).
|
||||||
|
|
||||||
|
To build raylib yourself, check out also the [raylib Wiki](https://github.com/raysan5/raylib/wiki) for detailed instructions.
|
||||||
|
|
||||||
raylib has been developed using exclusively two tools:
|
raylib has been developed using exclusively two tools:
|
||||||
|
|
||||||
|
|
@ -61,6 +68,7 @@ contact
|
||||||
* Reddit: [https://www.reddit.com/r/raylib](https://www.reddit.com/r/raylib)
|
* Reddit: [https://www.reddit.com/r/raylib](https://www.reddit.com/r/raylib)
|
||||||
* Twitch: [http://www.twitch.tv/raysan5](http://www.twitch.tv/raysan5)
|
* Twitch: [http://www.twitch.tv/raysan5](http://www.twitch.tv/raysan5)
|
||||||
* Patreon: [https://www.patreon.com/raysan5](https://www.patreon.com/raysan5)
|
* Patreon: [https://www.patreon.com/raysan5](https://www.patreon.com/raysan5)
|
||||||
|
* YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/channel/UC8WIBkhYb5sBNqXO1mZ7WSQ)
|
||||||
|
|
||||||
If you are using raylib and you enjoy it, please, [let me know][raysan5].
|
If you are using raylib and you enjoy it, please, [let me know][raysan5].
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ roadmap
|
||||||
Current version of raylib is complete and functional but there is still a lot of room for improvement.
|
Current version of raylib is complete and functional but there is still a lot of room for improvement.
|
||||||
Here it is a wish-list with features and ideas to improve the library.
|
Here it is a wish-list with features and ideas to improve the library.
|
||||||
|
|
||||||
Note that [raylib source code](https://github.com/raysan5/raylib/tree/develop/src) has some *TODO* marks around code with pending things to review and improve. Check [GitHub Issues](https://github.com/raysan5/raylib/issues) for further details!
|
Note that [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has some *TODO* marks around code with pending things to review and improve. Check [GitHub Issues](https://github.com/raysan5/raylib/issues) for further details!
|
||||||
|
|
||||||
**raylib 1.x**
|
**raylib 1.x**
|
||||||
- [ ] Basic GPU stats sytem (memory, draws, time...)
|
- [ ] Basic GPU stats sytem (memory, draws, time...)
|
||||||
|
|
|
||||||
65
appveyor.yml
Normal file
65
appveyor.yml
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
#os: Visual Studio 2015
|
||||||
|
|
||||||
|
clone_depth: 5
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||||
|
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
||||||
|
|
||||||
|
init:
|
||||||
|
- cmake -E remove c:\programdata\chocolatey\bin\cpack.exe
|
||||||
|
- set PATH=%PATH:C:\Program Files (x86)\Git\usr\bin;=%
|
||||||
|
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
||||||
|
- if [%BITS%]==[32] set MINGW=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32
|
||||||
|
- if [%BITS%]==[64] set MINGW=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
|
||||||
|
- if [%COMPILER%]==[mingw] set PATH=%MINGW%\bin;%PATH%
|
||||||
|
- set RAYLIB_PACKAGE_SUFFIX=-Win%BITS%-%COMPILER%
|
||||||
|
- set VERBOSE=1
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- compiler: mingw
|
||||||
|
bits: 32
|
||||||
|
examples: ON
|
||||||
|
- compiler: mingw
|
||||||
|
bits: 64
|
||||||
|
examples: ON
|
||||||
|
- compiler: msvc15
|
||||||
|
bits: 32
|
||||||
|
examples: OFF
|
||||||
|
- compiler: msvc15
|
||||||
|
bits: 64
|
||||||
|
examples: OFF
|
||||||
|
|
||||||
|
before_build:
|
||||||
|
- if [%compiler%]==[mingw] set CFLAGS=-m%BITS% & set LDFLAGS=-m%BITS% & set GENERATOR="MinGW Makefiles"
|
||||||
|
- if [%COMPILER%]==[msvc15] if [%BITS%]==[32] set GENERATOR="Visual Studio 14 2015"
|
||||||
|
- if [%COMPILER%]==[msvc15] if [%BITS%]==[64] set GENERATOR="Visual Studio 14 2015 Win64"
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- cmake -G %GENERATOR% -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=%examples% -DBUILD_GAMES=%examples% ..
|
||||||
|
- cmake --build . --target install
|
||||||
|
|
||||||
|
after_build:
|
||||||
|
- cmake --build . --target package
|
||||||
|
|
||||||
|
before_test:
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: 'build\*.zip'
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
- provider: GitHub
|
||||||
|
auth_token:
|
||||||
|
secure: OxKnnT3tlkPl9365cOO84rDWU4UkHIYJc0D3r3Tv7rB3HaR2BBhlhCnl7g3nuOJy
|
||||||
|
artifact: /.*\.zip/
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
force_update: true
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
appveyor_repo_tag: true # deploy on tag push only
|
||||||
|
|
@ -7,9 +7,20 @@ include("../utils.cmake")
|
||||||
# TODO `build` directory should maybe be something else...
|
# TODO `build` directory should maybe be something else...
|
||||||
# TODO place somewhere else?
|
# TODO place somewhere else?
|
||||||
include_directories("../build/release")
|
include_directories("../build/release")
|
||||||
|
include_directories("../src/external")
|
||||||
|
include_directories("../src/external/glfw/include")
|
||||||
|
|
||||||
# Get the sources together
|
# Get the sources together
|
||||||
set(example_dirs audio core models others physac shaders text texutures)
|
set(example_dirs audio core models others shaders shapes text textures)
|
||||||
|
set(CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=199309L)
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_CLOCK_MONOTONIC)
|
||||||
|
check_symbol_exists(QueryPerformanceCounter windows.h HAVE_QPC)
|
||||||
|
set(CMAKE_REQUIRED_DEFINITIONS)
|
||||||
|
if(HAVE_QPC OR HAVE_CLOCK_MONOTONIC)
|
||||||
|
set(example_dirs ${example_dirs} physac)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(example_sources)
|
set(example_sources)
|
||||||
set(example_resources)
|
set(example_resources)
|
||||||
foreach(example_dir ${example_dirs})
|
foreach(example_dir ${example_dirs})
|
||||||
|
|
@ -22,6 +33,14 @@ foreach(example_dir ${example_dirs})
|
||||||
list(APPEND example_resources ${resources})
|
list(APPEND example_resources ${resources})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
check_include_files(OVR_CAPI_GL.h HAVE_OCULUS_CAPI)
|
||||||
|
if(NOT HAVE_OCULUS_CAPI)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/oculus_rift.c)
|
||||||
|
endif()
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/standard_lighting.c)
|
||||||
|
|
||||||
|
|
||||||
# Do each example
|
# Do each example
|
||||||
foreach(example_source ${example_sources})
|
foreach(example_source ${example_sources})
|
||||||
# Create the basename for the example
|
# Create the basename for the example
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
|
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5)
|
# Copyright (c) 2013-2018 Ramon Santamaria (@raysan5)
|
||||||
#
|
#
|
||||||
# This software is provided "as-is", without any express or implied warranty. In no event
|
# 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.
|
# will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
|
@ -24,81 +24,138 @@
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
# Define required raylib variables
|
# Define required raylib variables
|
||||||
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
PROJECT_NAME ?= raylib_examples
|
||||||
PLATFORM ?= PLATFORM_DESKTOP
|
RAYLIB_VERSION ?= 1.9.7
|
||||||
|
RAYLIB_API_VERSION ?= 1
|
||||||
RAYLIB_PATH ?= ..
|
RAYLIB_PATH ?= ..
|
||||||
PROJECT_NAME ?= raylib_example
|
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
# Define default options
|
||||||
RAYLIB_PATH ?= /home/pi/raylib
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Library type used for raylib and OpenAL Soft: STATIC (.a) or SHARED (.so/.dll)
|
# One of PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||||
# NOTE: Libraries should be provided in the selected form
|
PLATFORM ?= PLATFORM_DESKTOP
|
||||||
|
|
||||||
|
# Locations of your newly installed library and associated headers. See ../src/Makefile
|
||||||
|
# On Linux, if you have installed raylib but cannot compile the examples, check that
|
||||||
|
# the *_INSTALL_PATH values here are the same as those in src/Makefile or point to known locations.
|
||||||
|
# To enable system-wide compile-time and runtime linking to libraylib.so, run ../src/$ sudo make install RAYLIB_LIBTYPE_SHARED.
|
||||||
|
# To enable compile-time linking to a special version of libraylib.so, change these variables here.
|
||||||
|
# To enable runtime linking to a special version of libraylib.so, see EXAMPLE_RUNTIME_PATH below.
|
||||||
|
# If there is a libraylib in both EXAMPLE_RUNTIME_PATH and RAYLIB_INSTALL_PATH, at runtime,
|
||||||
|
# the library at EXAMPLE_RUNTIME_PATH, if present, will take precedence over the one at RAYLIB_INSTALL_PATH.
|
||||||
|
# RAYLIB_INSTALL_PATH should be the desired full path to libraylib. No relative paths.
|
||||||
|
DESTDIR ?= /usr/local
|
||||||
|
RAYLIB_INSTALL_PATH ?= $(DESTDIR)/lib
|
||||||
|
# RAYLIB_H_INSTALL_PATH locates the installed raylib header and associated source files.
|
||||||
|
RAYLIB_H_INSTALL_PATH ?= $(DESTDIR)/include
|
||||||
|
|
||||||
|
# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
|
||||||
RAYLIB_LIBTYPE ?= STATIC
|
RAYLIB_LIBTYPE ?= STATIC
|
||||||
OPENAL_LIBTYPE ?= STATIC
|
|
||||||
|
|
||||||
# On PLATFORM_WEB force OpenAL Soft shared library
|
# Build mode for project: DEBUG or RELEASE
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
RAYLIB_BUILD_MODE ?= RELEASE
|
||||||
OPENAL_LIBTYPE = SHARED
|
|
||||||
endif
|
# Use external GLFW library instead of rglfw module
|
||||||
|
# TODO: Review usage on Linux. Target version of choice. Switch on -lglfw or -lglfw3
|
||||||
|
USE_EXTERNAL_GLFW ?= FALSE
|
||||||
|
|
||||||
|
# Use Wayland display server protocol on Linux desktop
|
||||||
|
# by default it uses X11 windowing system
|
||||||
|
USE_WAYLAND_DISPLAY ?= FALSE
|
||||||
|
|
||||||
|
# NOTE: On PLATFORM_WEB OpenAL Soft backend is used by default (check raylib/src/Makefile)
|
||||||
|
|
||||||
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
# No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows
|
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
|
||||||
|
# ifeq ($(UNAME),Msys) -> Windows
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
PLATFORM_OS=WINDOWS
|
PLATFORM_OS=WINDOWS
|
||||||
LIBPATH=win32
|
|
||||||
else
|
else
|
||||||
UNAMEOS=$(shell uname)
|
UNAMEOS=$(shell uname)
|
||||||
ifeq ($(UNAMEOS),Linux)
|
ifeq ($(UNAMEOS),Linux)
|
||||||
PLATFORM_OS=LINUX
|
PLATFORM_OS=LINUX
|
||||||
LIBPATH=linux
|
endif
|
||||||
else
|
ifeq ($(UNAMEOS),FreeBSD)
|
||||||
|
PLATFORM_OS=FREEBSD
|
||||||
|
endif
|
||||||
ifeq ($(UNAMEOS),Darwin)
|
ifeq ($(UNAMEOS),Darwin)
|
||||||
PLATFORM_OS=OSX
|
PLATFORM_OS=OSX
|
||||||
LIBPATH=osx
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
|
UNAMEOS=$(shell uname)
|
||||||
|
ifeq ($(UNAMEOS),Linux)
|
||||||
|
PLATFORM_OS=LINUX
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# RAYLIB_PATH adjustment for different platforms.
|
||||||
|
# If using GNU make, we can get the full path to the top of the tree. Windows? BSD?
|
||||||
|
# Required for ldconfig or other tools that do not perform path expansion.
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
|
RAYLIB_PREFIX ?= ..
|
||||||
|
RAYLIB_PATH = $(realpath $(RAYLIB_PREFIX))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
# Default path for raylib on Raspberry Pi, if installed in different path, update it!
|
||||||
|
# This is not currently used by src/Makefile. Not sure of its origin or usage. Refer to wiki.
|
||||||
|
# TODO: update install: target in src/Makefile for RPI, consider relation to LINUX.
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
# RPI cross-compiler
|
RAYLIB_PATH ?= /home/pi/raylib
|
||||||
RPI_CROSS_COMPILE ?= NO
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# Emscripten required variables
|
# Emscripten required variables
|
||||||
EMSDK_PATH = C:/emsdk
|
EMSDK_PATH = C:/emsdk
|
||||||
EMSCRIPTEN_VERSION = 1.37.21
|
EMSCRIPTEN_VERSION = 1.37.28
|
||||||
CLANG_VERSION=e1.37.21_64bit
|
CLANG_VERSION=e1.37.28_64bit
|
||||||
PYTHON_VERSION=2.7.5.3_64bit
|
PYTHON_VERSION=2.7.5.3_64bit
|
||||||
NODE_VERSION=4.1.1_64bit
|
NODE_VERSION=4.1.1_64bit
|
||||||
export PATH=$(EMSDK_PATH);$(EMSDK_PATH)\clang\$(CLANG_VERSION);$(EMSDK_PATH)\node\$(NODE_VERSION)\bin;$(EMSDK_PATH)\python\$(PYTHON_VERSION);$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION);C:\raylib\MinGW\bin:$$(PATH)
|
export PATH=$(EMSDK_PATH);$(EMSDK_PATH)\clang\$(CLANG_VERSION);$(EMSDK_PATH)\node\$(NODE_VERSION)\bin;$(EMSDK_PATH)\python\$(PYTHON_VERSION);$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION);C:\raylib\MinGW\bin:$$(PATH)
|
||||||
EMSCRIPTEN=$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION)
|
EMSCRIPTEN=$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define raylib release directory for compiled library
|
# Define raylib release directory for compiled library.
|
||||||
|
# RAYLIB_RELEASE_PATH points to provided binaries or your freshly built version.
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
RAYLIB_RELEASE = $(RAYLIB_PATH)/release/libs/win32/mingw32
|
RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/win32/mingw32
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
RAYLIB_RELEASE = $(RAYLIB_PATH)/release/libs/linux
|
RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/linux
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
RAYLIB_RELEASE = $(RAYLIB_PATH)/release/libs/osx
|
RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/osx
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),FREEBSD)
|
||||||
|
RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/freebsd
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
|
||||||
RAYLIB_RELEASE = $(RAYLIB_PATH)/release/libs/html5
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
RAYLIB_RELEASE = $(RAYLIB_PATH)/release/libs/rpi
|
RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/rpi
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
|
RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/html5
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EXAMPLE_RUNTIME_PATH embeds a custom runtime location of libraylib.so or other desired libraries
|
||||||
|
# into each example binary compiled with RAYLIB_LIBTYPE=SHARED. It defaults to RAYLIB_RELEASE_PATH
|
||||||
|
# so that these examples link at runtime with your version of libraylib.so in ../release/libs/linux
|
||||||
|
# without formal installation from ../src/Makefile. It aids portability and is useful if you have
|
||||||
|
# multiple versions of raylib, have raylib installed to a non-standard location, or want to
|
||||||
|
# bundle libraylib.so with your game. Change it to your liking.
|
||||||
|
# Note: If, at runtime, there is a libraylib.so at both EXAMPLE_RUNTIME_PATH and RAYLIB_INSTALL_PATH,
|
||||||
|
# The library at EXAMPLE_RUNTIME_PATH, if present, will take precedence over RAYLIB_INSTALL_PATH,
|
||||||
|
# Implemented for LINUX below with CFLAGS += -Wl,-rpath,$(EXAMPLE_RUNTIME_PATH)
|
||||||
|
# To see the result, run readelf -d core/core_basic_window; looking at the RPATH or RUNPATH attribute.
|
||||||
|
# To see which libraries a built example is linking to, ldd core/core_basic_window;
|
||||||
|
# Look for libraylib.so.1 => $(RAYLIB_INSTALL_PATH)/libraylib.so.1 or similar listing.
|
||||||
|
EXAMPLE_RUNTIME_PATH ?= $(RAYLIB_RELEASE_PATH)
|
||||||
|
|
||||||
# Define default C compiler: gcc
|
# Define default C compiler: gcc
|
||||||
|
# NOTE: define g++ compiler if using C++
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
|
@ -106,14 +163,20 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
# OSX default compiler
|
# OSX default compiler
|
||||||
CC = clang
|
CC = clang
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),FREEBSD)
|
||||||
|
# FreeBSD default compiler
|
||||||
|
CC = clang
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
ifeq ($(RPI_CROSS_COMPILE),YES)
|
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
|
||||||
# RPI cross-compiler
|
# Define RPI cross-compiler
|
||||||
CC = armv6j-hardfloat-linux-gnueabi-gcc
|
#CC = armv6j-hardfloat-linux-gnueabi-gcc
|
||||||
|
CC = $(RPI_TOOLCHAIN)/bin/arm-linux-gnueabihf-gcc
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
|
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
|
||||||
# HTML5 emscripten compiler
|
# HTML5 emscripten compiler
|
||||||
CC = emcc
|
CC = emcc
|
||||||
endif
|
endif
|
||||||
|
|
@ -129,15 +192,14 @@ endif
|
||||||
|
|
||||||
# Define compiler flags:
|
# Define compiler flags:
|
||||||
# -O1 defines optimization level
|
# -O1 defines optimization level
|
||||||
# -Og enable debugging
|
# -g enable debugging
|
||||||
# -s strip unnecessary data from build
|
# -s strip unnecessary data from build
|
||||||
# -Wall turns on most, but not all, compiler warnings
|
# -Wall turns on most, but not all, compiler warnings
|
||||||
# -std=c99 defines C language mode (standard C from 1999 revision)
|
# -std=c99 defines C language mode (standard C from 1999 revision)
|
||||||
# -std=gnu99 defines C language mode (GNU C from 1999 revision)
|
# -std=gnu99 defines C language mode (GNU C from 1999 revision)
|
||||||
# -fgnu89-inline declaring inline functions support (GCC optimized)
|
|
||||||
# -Wno-missing-braces ignore invalid warning (GCC bug 53119)
|
# -Wno-missing-braces ignore invalid warning (GCC bug 53119)
|
||||||
# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
|
# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
|
||||||
CFLAGS += -O1 -s -Wall -std=c99 -D_DEFAULT_SOURCE -fgnu89-inline -Wno-missing-braces
|
CFLAGS += -O1 -s -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces
|
||||||
|
|
||||||
# Additional flags for compiler (if desired)
|
# Additional flags for compiler (if desired)
|
||||||
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
|
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
|
||||||
|
|
@ -148,8 +210,18 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
CFLAGS += $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows
|
CFLAGS += $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
|
ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
|
||||||
|
CFLAGS += -g
|
||||||
|
#CC = clang
|
||||||
|
endif
|
||||||
|
ifeq ($(RAYLIB_LIBTYPE),STATIC)
|
||||||
CFLAGS += -no-pie -D_DEFAULT_SOURCE
|
CFLAGS += -no-pie -D_DEFAULT_SOURCE
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||||
|
# Explicitly enable runtime link to libraylib.so
|
||||||
|
CFLAGS += -Wl,-rpath,$(EXAMPLE_RUNTIME_PATH)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
CFLAGS += -std=gnu99
|
CFLAGS += -std=gnu99
|
||||||
|
|
@ -160,23 +232,54 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing
|
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing
|
||||||
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
|
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
|
||||||
# -s USE_PTHREADS=1 # multithreading support
|
# -s USE_PTHREADS=1 # multithreading support
|
||||||
CFLAGS += -s USE_GLFW=3 -s ASSERTIONS=1 --profiling -s TOTAL_MEMORY=16777216 --preload-file resources
|
# -s WASM=1 # support Web Assembly (https://github.com/kripken/emscripten/wiki/WebAssembly)
|
||||||
|
# --preload-file resources # specify a resources folder for data compilation
|
||||||
|
CFLAGS += -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 --profiling --preload-file resources
|
||||||
|
|
||||||
|
# Define a custom shell .html and output extension
|
||||||
|
CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html
|
||||||
|
EXT = .html
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define include paths for required headers
|
# Define include paths for required headers.
|
||||||
|
# Precedence: immediately local, raysan5 provided sources
|
||||||
# NOTE: Several external required libraries (stb and others)
|
# NOTE: Several external required libraries (stb and others)
|
||||||
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/release/include -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
|
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/release/include -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
|
||||||
|
|
||||||
# Define additional directories containing required header files
|
# Define additional directories containing required header files
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
# RPI requried libraries
|
# RPI required libraries
|
||||||
INCLUDE_PATHS += -I/opt/vc/include
|
INCLUDE_PATHS += -I/opt/vc/include
|
||||||
INCLUDE_PATHS += -I/opt/vc/include/interface/vmcs_host/linux
|
INCLUDE_PATHS += -I/opt/vc/include/interface/vmcs_host/linux
|
||||||
INCLUDE_PATHS += -I/opt/vc/include/interface/vcos/pthreads
|
INCLUDE_PATHS += -I/opt/vc/include/interface/vcos/pthreads
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
ifeq ($(PLATFORM_OS),FREEBSD)
|
||||||
|
# Consider -L$(RAYLIB_H_INSTALL_PATH)
|
||||||
|
INCLUDE_PATHS += -I/usr/local/include
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
|
# Reset everything.
|
||||||
|
# Precedence: immediately local, installed version, raysan5 provided libs -I$(RAYLIB_H_INSTALL_PATH) -I$(RAYLIB_PATH)/release/include
|
||||||
|
INCLUDE_PATHS = -I$(RAYLIB_H_INSTALL_PATH) -isystem. -isystem$(RAYLIB_PATH)/src -isystem$(RAYLIB_PATH)/release/include -isystem$(RAYLIB_PATH)/src/external
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Define library paths containing required libs
|
# Define library paths containing required libs.
|
||||||
LDFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src
|
# Precedence: immediately local, then raysan5 provided libs
|
||||||
|
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
ifeq ($(PLATFORM_OS),FREEBSD)
|
||||||
|
# Consider -L$(RAYLIB_INSTALL_PATH)
|
||||||
|
LDFLAGS += -L. -Lsrc -L/usr/local/lib
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
|
# Reset everything.
|
||||||
|
# Precedence: immediately local, installed version, raysan5 provided libs
|
||||||
|
LDFLAGS = -L. -L$(RAYLIB_INSTALL_PATH) -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
LDFLAGS += -L/opt/vc/lib
|
LDFLAGS += -L/opt/vc/lib
|
||||||
|
|
@ -186,50 +289,53 @@ endif
|
||||||
# if you want to link libraries (libname.so or libname.a), use the -lname
|
# if you want to link libraries (libname.so or libname.a), use the -lname
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
# Libraries for Windows desktop compiling
|
# Libraries for Windows desktop compilation
|
||||||
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
LDLIBS = -lraylib -lopengl32 -lgdi32
|
||||||
LDLIBS = -lraylib -lglfw3 -lopengl32 -lgdi32
|
|
||||||
|
|
||||||
# Define required flags and libs for OpenAL Soft STATIC/SHARED usage
|
|
||||||
# NOTE: ALLIBS flag only required for raylib Win32 SHARED library building
|
|
||||||
ifeq ($(OPENAL_LIBTYPE),STATIC)
|
|
||||||
LDLIBS += -lopenal32 -lwinmm
|
|
||||||
CFLAGS += -DAL_LIBTYPE_STATIC -Wl,-allow-multiple-definition
|
|
||||||
else
|
|
||||||
LDLIBS += -lopenal32dll
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Required for physac examples
|
# Required for physac examples
|
||||||
LDLIBS += -static -lpthread
|
LDLIBS += -static -lpthread
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
# Libraries for Debian GNU/Linux desktop compiling
|
# Libraries for Debian GNU/Linux desktop compiling
|
||||||
# NOTE: Required packages: libglfw3-dev libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl
|
LDLIBS = -lraylib -lGL -lm -lpthread -ldl -lrt
|
||||||
|
# On X11 requires also below libraries
|
||||||
# On XWindow requires also below libraries
|
LDLIBS += -lX11
|
||||||
LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
# NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them
|
||||||
|
#LDLIBS += -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||||
|
# On Wayland windowing system, additional libraries requires
|
||||||
|
ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
|
||||||
|
LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
|
||||||
|
endif
|
||||||
|
# Explicit link to libc
|
||||||
|
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||||
|
LDLIBS += -lc
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libglfw3-dev libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa
|
LDLIBS = -lraylib -framework OpenGL -framework OpenAL -framework Cocoa
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),FREEBSD)
|
||||||
|
# Libraries for FreeBSD desktop compiling
|
||||||
|
# NOTE: Required packages: mesa-libs
|
||||||
|
LDLIBS = -lraylib -lGL -lpthread -lm
|
||||||
|
# On XWindow requires also below libraries
|
||||||
|
LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||||
|
endif
|
||||||
|
ifeq ($(USE_EXTERNAL_GLFW),TRUE)
|
||||||
|
# NOTE: It could require additional packages installed: libglfw3-dev
|
||||||
|
LDLIBS += -lglfw
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
# Libraries for Raspberry Pi compiling
|
# Libraries for Raspberry Pi compiling
|
||||||
# NOTE: Required packages: libopenal1
|
# NOTE: Required packages: libasound2-dev (ALSA)
|
||||||
LDLIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal
|
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# Libraries for web (HTML5) compiling
|
# Libraries for web (HTML5) compiling
|
||||||
LDLIBS = $(RAYLIB_RELEASE)/libraylib.bc
|
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.bc
|
||||||
endif
|
|
||||||
|
|
||||||
# Define output extension to generate a .html file using provided shell
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
|
||||||
EXT = .html
|
|
||||||
WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define all object files required
|
# Define all object files required
|
||||||
|
|
@ -266,6 +372,7 @@ EXAMPLES = \
|
||||||
textures/textures_image_processing \
|
textures/textures_image_processing \
|
||||||
textures/textures_image_drawing \
|
textures/textures_image_drawing \
|
||||||
textures/textures_image_generation \
|
textures/textures_image_generation \
|
||||||
|
textures/textures_image_text \
|
||||||
text/text_sprite_fonts \
|
text/text_sprite_fonts \
|
||||||
text/text_bmfont_ttf \
|
text/text_bmfont_ttf \
|
||||||
text/text_raylib_fonts \
|
text/text_raylib_fonts \
|
||||||
|
|
@ -282,9 +389,9 @@ EXAMPLES = \
|
||||||
models/models_cubicmap \
|
models/models_cubicmap \
|
||||||
models/models_mesh_picking \
|
models/models_mesh_picking \
|
||||||
models/models_mesh_generation \
|
models/models_mesh_generation \
|
||||||
models/models_yaw_pitch_roll \
|
|
||||||
models/models_material_pbr \
|
models/models_material_pbr \
|
||||||
models/models_skybox \
|
models/models_skybox \
|
||||||
|
models/models_yaw_pitch_roll \
|
||||||
shaders/shaders_model_shader \
|
shaders/shaders_model_shader \
|
||||||
shaders/shaders_shapes_textures \
|
shaders/shaders_shapes_textures \
|
||||||
shaders/shaders_custom_uniform \
|
shaders/shaders_custom_uniform \
|
||||||
|
|
@ -298,7 +405,7 @@ EXAMPLES = \
|
||||||
physac/physics_movement \
|
physac/physics_movement \
|
||||||
physac/physics_restitution \
|
physac/physics_restitution \
|
||||||
physac/physics_shatter \
|
physac/physics_shatter \
|
||||||
fix_dylib \
|
|
||||||
|
|
||||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||||
|
|
||||||
|
|
@ -327,7 +434,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
del *.o *.exe /s
|
del *.o *.exe /s
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
|
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -fv
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
find . -type f -perm +ugo+x -delete
|
find . -type f -perm +ugo+x -delete
|
||||||
|
|
@ -336,10 +443,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
find . -type f -executable -delete
|
find . -type f -executable -delete
|
||||||
rm -f *.o
|
rm -fv *.o
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
del *.o *.html *.js
|
del *.o *.html *.js
|
||||||
endif
|
endif
|
||||||
@echo Cleaning done
|
@echo Cleaning done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,12 @@ int main()
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera first person");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera first person");
|
||||||
|
|
||||||
// Define the camera to look into our 3d world (position, target, up vector)
|
// Define the camera to look into our 3d world (position, target, up vector)
|
||||||
Camera camera = {{ 4.0f, 2.0f, 4.0f }, { 0.0f, 1.8f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 60.0f };
|
Camera camera = { 0 };
|
||||||
|
camera.position = (Vector3){ 4.0f, 2.0f, 4.0f };
|
||||||
|
camera.target = (Vector3){ 0.0f, 1.8f, 0.0f };
|
||||||
|
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||||
|
camera.fovy = 60.0f;
|
||||||
|
camera.type = CAMERA_PERSPECTIVE;
|
||||||
|
|
||||||
// Generates some random columns
|
// Generates some random columns
|
||||||
float heights[MAX_COLUMNS];
|
float heights[MAX_COLUMNS];
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ int main()
|
||||||
Vector3 cubePosition = { 0.0f, 1.0f, 0.0f };
|
Vector3 cubePosition = { 0.0f, 1.0f, 0.0f };
|
||||||
Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
|
Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
|
||||||
|
|
||||||
Ray ray; // Picking line ray
|
Ray ray = {0.0f, 0.0f, 0.0f}; // Picking line ray
|
||||||
|
|
||||||
bool collision = false;
|
bool collision = false;
|
||||||
|
|
||||||
|
|
@ -79,7 +79,6 @@ int main()
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawRay(ray, MAROON);
|
DrawRay(ray, MAROON);
|
||||||
|
|
||||||
DrawGrid(10, 1.0f);
|
DrawGrid(10, 1.0f);
|
||||||
|
|
||||||
End3dMode();
|
End3dMode();
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,12 @@ int main()
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free");
|
||||||
|
|
||||||
// Define the camera to look into our 3d world
|
// Define the camera to look into our 3d world
|
||||||
Camera camera = {{ 10.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
|
Camera camera = { 0 };
|
||||||
|
camera.position = (Vector3){ 10.0f, 10.0f, 10.0f };
|
||||||
|
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||||
|
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||||
|
camera.fovy = 45.0f;
|
||||||
|
camera.type = CAMERA_PERSPECTIVE;
|
||||||
|
|
||||||
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,13 @@ int main()
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - drawing billboards");
|
InitWindow(screenWidth, screenHeight, "raylib [models] example - drawing billboards");
|
||||||
|
|
||||||
// Define the camera to look into our 3d world
|
// Define the camera to look into our 3d world
|
||||||
Camera camera = {{ 5.0f, 4.0f, 5.0f }, { 0.0f, 2.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
|
Camera camera = { 0 };
|
||||||
|
camera.position = (Vector3){ 5.0f, 4.0f, 5.0f };
|
||||||
|
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f };
|
||||||
|
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||||
|
camera.fovy = 45.0f;
|
||||||
|
camera.type = CAMERA_PERSPECTIVE;
|
||||||
|
|
||||||
|
|
||||||
Texture2D bill = LoadTexture("resources/billboard.png"); // Our texture billboard
|
Texture2D bill = LoadTexture("resources/billboard.png"); // Our texture billboard
|
||||||
Vector3 billPosition = { 0.0f, 2.0f, 0.0f }; // Position where draw billboard
|
Vector3 billPosition = { 0.0f, 2.0f, 0.0f }; // Position where draw billboard
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ int main()
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - box collisions");
|
InitWindow(screenWidth, screenHeight, "raylib [models] example - box collisions");
|
||||||
|
|
||||||
// Define the camera to look into our 3d world
|
// Define the camera to look into our 3d world
|
||||||
Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
|
Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
||||||
|
|
||||||
Vector3 playerPosition = { 0.0f, 1.0f, 2.0f };
|
Vector3 playerPosition = { 0.0f, 1.0f, 2.0f };
|
||||||
Vector3 playerSize = { 1.0f, 2.0f, 1.0f };
|
Vector3 playerSize = { 1.0f, 2.0f, 1.0f };
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ int main()
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - cubesmap loading and drawing");
|
InitWindow(screenWidth, screenHeight, "raylib [models] example - cubesmap loading and drawing");
|
||||||
|
|
||||||
// Define the camera to look into our 3d world
|
// Define the camera to look into our 3d world
|
||||||
Camera camera = {{ 16.0f, 14.0f, 16.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
|
Camera camera = {{ 16.0f, 14.0f, 16.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
||||||
|
|
||||||
Image image = LoadImage("resources/cubicmap.png"); // Load cubicmap image (RAM)
|
Image image = LoadImage("resources/cubicmap.png"); // Load cubicmap image (RAM)
|
||||||
Texture2D cubicmap = LoadTextureFromImage(image); // Convert image to texture to display (VRAM)
|
Texture2D cubicmap = LoadTextureFromImage(image); // Convert image to texture to display (VRAM)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,12 @@ int main()
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - geometric shapes");
|
InitWindow(screenWidth, screenHeight, "raylib [models] example - geometric shapes");
|
||||||
|
|
||||||
// Define the camera to look into our 3d world
|
// Define the camera to look into our 3d world
|
||||||
Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
|
Camera camera = { 0 };
|
||||||
|
camera.position = (Vector3){ 0.0f, 10.0f, 10.0f };
|
||||||
|
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||||
|
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||||
|
camera.fovy = 45.0f;
|
||||||
|
camera.type = CAMERA_PERSPECTIVE;
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ int main()
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - heightmap loading and drawing");
|
InitWindow(screenWidth, screenHeight, "raylib [models] example - heightmap loading and drawing");
|
||||||
|
|
||||||
// Define our custom camera to look into our 3d world
|
// Define our custom camera to look into our 3d world
|
||||||
Camera camera = {{ 18.0f, 16.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
|
Camera camera = {{ 18.0f, 16.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
||||||
|
|
||||||
Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
|
Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
|
||||||
Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM)
|
Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM)
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue