Commit Graph

2499 Commits

Author SHA1 Message Date
Ahmad Fatoum
e82505b873
Add projects/CMake example
The CMakeLists.txt checks for an installed raylib and downloads and
installs one if none is found. Afterwards, it builds core_basic_window.c
2018-07-29 18:27:59 +02:00
Ahmad Fatoum
548dbeb1ca
Fix typo (s/proedural/procedural) 2018-07-29 13:04:16 +02:00
Ahmad Fatoum
6905a875ed
Merge pull request #608 from a3f/master
CMake: Major cleanup to support find_package(raylib)
2018-07-29 12:56:19 +02:00
Ahmad Fatoum
5a94a280d0
CMake: include rlgl_standalone in -DBUILD_EXAMPLES
With the recent CMake cleanup, getting raylib's dependencies for use
when building rlgl_standalone is quite straight forward, so lets enable
it again.

Fixes #508, just properly this time. :)
2018-07-29 12:35:36 +02:00
Ahmad Fatoum
2ae6df47fc
CMake: Set -DMACOS_FATLIB=OFF by default
Homebrew doesn't ship 32-bit libraries anymore, so using both
-DUSE_EXTERNAL_GLFW and -DMACOS_FATLIB with a Homebrew GLFW would fail.
With -DUSE_EXTERNAL_GLFW=OFF, this is not a problem, but I think keeping
it off by default makes more sense. If someone wants universal
libraries, they can just toggle it.
2018-07-29 12:35:36 +02:00
Ahmad Fatoum
4d209d45aa
core: Don't use GLFW_TRANSPARENT_FRAMEBUFFER with older GLFWs
PLATFORM_WEB is not the only platform that doesn't define
GLFW_TRANSPARENT_FRAMEBUFFER, it's also recent enough that it's not
included in the most recent GLFW 3.2.1 release, so this error can creep
up when using USE_EXTERNAL_GLFW.
2018-07-29 12:35:36 +02:00
Ahmad Fatoum
3f09726331
CMake: Major cleanup to support find_package(raylib)
Remove that link_libraries_to_executable() hack and defines a proper
raylib target that can be used with target_link_libraries.

The same target is also available for external (user) code by using
find_package(raylib).

This results in:

- Remove hardcoded build directories from examples and games CMakeLists.txt
- Allow rlgl_standalone and other special examples to be built easily
- Allow CMake projects to find_package(raylib instead of fiddling with pkg-config
- Makes code a little more maintainable
- Fixes #471, #606.
- Makes code less confusing by removing the double use of PLATFORM (#584).

Note that this is still not _The Right Way_(TM), because normally
raylib-config.cmake (or its includes) would be automatically generated.
I didn't manage to get that to work though, so I went the easier route
of just wrapping pkg_check_modules for consumption by find_package.
2018-07-29 12:35:35 +02:00
Ahmad Fatoum
3e5093eab0
CI: Build with all optional formats enabled
also makes one configuration shared-only

dr_flac is not built on i386, because GCC 4.8 complains about asm("cpuid"
clobbering ebx, as it's using ebx for PIC.

Instead of downloading a newer GCC (and multilib),
disable FLAC for that one configuration...
2018-07-29 12:13:01 +02:00
Ahmad Fatoum
69e147417b
Travis CI: Add OpenAL-Configuration 2018-07-29 12:13:00 +02:00
Ray
cf021e3811
Merge pull request #607 from jubalh/fixmu
Fix bug in LoadMusicStream
2018-07-29 10:36:52 +02:00
Michael Vetter
186c1b157e Fix bug in LoadMusicStream
free() and NULL at the end.
2018-07-29 09:52:18 +02:00
raysan5
7964b28fac Corrected bug LoadMusicStream() 2018-07-28 18:19:53 +02:00
raysan5
0cf92c59d7 Corrected timing typo 2018-07-28 18:13:19 +02:00
raysan5
dc3327fba8 Reviewed music loading 2018-07-28 18:07:06 +02:00
raysan5
6f61e26a3c Reviewed custom logging functionality 2018-07-28 17:57:05 +02:00
Ray
9150b54b3e
Merge pull request #603 from jubalh/lse
Deal with failed LoadMusicStream
2018-07-28 11:15:41 +02:00
Michael Vetter
7a5b1b13e2 Deal with failed LoadMusicStream
It would be good to have a way to continue execution even when loading a stream didn't work.
 Free music and set it to NULL in case something went wrong, so that users can check for it.
2018-07-27 15:58:27 +02:00
Pablo Marcos Oltra
c69f7953c7 Add SetTraceLogCallback to enable users setting custom logging (#597) 2018-07-26 21:57:45 +02:00
Ray
64e9d72c07 Reviewed audio example 2018-07-25 14:38:12 +02:00
Ray
4d45173a77
Merge pull request #591 from triplefox/patch-1
Complete raw_audio_stream example
2018-07-25 14:25:55 +02:00
Ray
78c8774685
Merge pull request #593 from jubalh/update_builder_example
Update Builder example
2018-07-25 13:56:47 +02:00
Michael Vetter
01197172cc Update Builder example
Update Builder example for raylib 2.0.0.
External OpenAL and GLFW are not required anymore.
2018-07-25 13:01:16 +02:00
James Hofmann
959f8e45f8
Complete raw_audio_stream example
1. Always synthesize a complete frame of audio, using a second buffer (this prevents gaps in playback)
2. Sine is computed correctly, with an adjustable frequency
3. User can modulate frequency in real-time with mouse
4. Entire audio buffer data is shown, visually demonstrating how sine changes in wavelength
2018-07-25 03:01:48 -07:00
Ray
94b0c49f5d
Merge pull request #590 from pamarcos/fix_rlgl_standalone
Fix rlgl.h to be used as a standalone
2018-07-25 11:10:04 +02:00
Pablo Marcos Oltra
8d134edaf7 Fix rlgl.h to be used as a standalone 2018-07-25 10:36:18 +02:00
Ahmad Fatoum
184e6de775
CMake: Don't build rlgl_standalone as part of the examples
Closes #588.
2018-07-25 00:51:42 +02:00
Ahmad Fatoum
b7d8c62bfd
Traivs CI: Add newer (9.4.1) Xcode configuration 2018-07-25 00:51:39 +02:00
Pablo Marcos Oltra
fa0de480f0 Fix HTML5 examples and games using CMake (#589)
Mimic the Makefile by outputting html + js instead of LLVM IR.
2018-07-25 00:39:17 +02:00
Ray
361d878b4c Updated animations support 2018-07-24 18:52:56 +02:00
Ray
198a023527 First working version of IQM animations
Still a work in progress but it already works...
Current riqm API could be simplified...
2018-07-24 18:28:58 +02:00
Ahmad Fatoum
a5311eddf0
Travis CI: remove stray $ in .travis.yml
Fixes: 1d0ba96 ("Add GLFW-installed-but-using-our-GLFW-anyway configuration")
2018-07-23 21:13:54 +02:00
Ahmad Fatoum
2b8c9f9a17
CMake: Fail when -D{PLATFORM,OPENGL_VERSION}=INVALID_VALUE
as well as -DUSE_EXTERNAL_GLFW.

Nips issues like #584 in the bud.
2018-07-23 21:00:48 +02:00
Ahmad Fatoum
1d0ba96c9e
Travis CI: Add GLFW-installed-but-using-our-GLFW-anyway configuration 2018-07-23 19:45:44 +02:00
Ray
f992609184
Create CODE_OF_CONDUCT.md 2018-07-23 13:37:25 +02:00
Ray
cae8f96361
Merge pull request #583 from leereilly/exclamation-period
Remove period after exclamation
2018-07-23 10:08:08 +02:00
Lee Reilly
e0c19ab5af
Remove period
Fixes https://www.reddit.com/r/gamedev/comments/90z6fy/raylib_20_released/e2v5qpl/ :)
2018-07-22 23:31:03 -07:00
raysan5
eadd72a639 Updated MSVC lib release 2018-07-22 19:28:05 +02:00
Ahmad Fatoum
639ce09c9d
Travis CI: Fix emscripten build breakage 2018-07-21 19:42:23 +02:00
Ray
3632b160d5
Merge pull request #579 from jessp/patch-2
Convert window render sizes to floats
2018-07-21 19:37:35 +02:00
Jess Peter
f3d144bf0e
Convert window render sizes to floats
GLSL 1.10 is typesafe ([PDF specs](https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.1.10.pdf), page 22), so this shader will not load properly during build.

It's not a super important change, but I came across it while playing with the examples on my pi.
2018-07-21 18:56:16 +02:00
raysan5
82e4a12fd3 Added Android Makefile for games 2018-07-21 17:38:47 +02:00
raysan5
74a0814a8f Review formatting 2018-07-21 17:19:44 +02:00
raysan5
08f2725c8b Review templates Makefiles 2018-07-21 17:14:29 +02:00
raysan5
e5030e28f6 Updated html5 library 2018-07-21 17:14:13 +02:00
raysan5
4c15515ba6 Support examples with Emterpreter
Examples can be compiled for web with no code change at all! Usually
examples need to be refactored for web... using emscripten code
interpreter (emterpreter), it can manage synchronous while() loops
internally... as a downside, execution is very slow...
2018-07-21 17:13:59 +02:00
raysan5
7dc66d2d3f Looking for a place for raylib resource file 2018-07-21 16:18:33 +02:00
raysan5
864511fe57 Review VS2015 and VS2017 projects 2018-07-21 15:44:59 +02:00
raysan5
2875f4cf11 Remove VS2017 UWP project
Not properly configured, use VS2015.UWP as reference
2018-07-21 15:44:06 +02:00
Ray
6e812cf147 Working on MP3 support 2018-07-19 23:15:46 +02:00
Ray
103044926b Avoid config.h in standalone mode 2018-07-16 19:24:40 +02:00