Commit Graph

2610 Commits

Author SHA1 Message Date
Jorge A. Gomes
c9ca14e659
Update raylib.h
Added NinePatch struc definition and function prototype.
2018-08-03 04:48:46 -03:00
Ray
d999e5a016 Added VSCode project template 2018-07-31 11:26:52 +02:00
Ray
b6f2fb613e
Merge pull request #612 from ethan-tqa/master
fix problem when compiling with MSVC 2017, error C2177
2018-07-30 13:56:28 +02:00
Ethan Trịnh
6ea8c62b43 make sure that the constant is of float type, not double 2018-07-30 19:35:13 +08:00
Ethan Trịnh
741513842a fix problem when compiling with MSVC 2017, built-in CMake: C2177 constant too big 2018-07-30 19:02:20 +08:00
Ahmad Fatoum
8bea6abe8c
Add CMake entry to projects/README.md 2018-07-30 12:24:04 +02:00
Ahmad Fatoum
286c41af52
Sync with upstream GLFW pull request
The GLFW tree distributed with raylib has two modifications:

- GLFW_PKG_{DEPS,LIBS} are exported to PARENT_SCOPE, so we can use them
  in our pkg-config file
- An intermediary glfw_objlib target is added, so we can reexport GLFW
  symbols from libraylib.a

rglfw can fix the second point, but for Wayland usage, we would have to
replicate protocol generation, so we just leverage GLFW's existing
support instead.

To make maintenance easier, I have submitted a pull request for
including these modifications to upstream GLFW.
And to make that one easier, this patch dog-foods the modifications,
so raylib users can help find regressions. :-)

glfw/glfw#1307
2018-07-29 23:56:16 +02:00
Ray
7154a83313
Merge pull request #610 from pamarcos/fix_chdir_macos
[games] Prevent GLFW changing working dir to 'Resources'
2018-07-29 23:40:13 +02:00
Pablo Marcos Oltra
907e27ef4e Fix Physac examples to be run without creating new thread 2018-07-29 21:32:39 +02:00
Ahmad Fatoum
78487f7521
CMake: Make the raylib project as a whole embeddable
So user code can use add_subdirectory to build it (similar to what we do
with GLFW or what the projects/CMake/CMakeLists.txt can do).
2018-07-29 21:28:23 +02:00
Pablo Marcos Oltra
89cec68565 Prevent GLFW changing working dir to 'Resources' 2018-07-29 18:38:31 +02:00
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