Commit Graph

469 Commits

Author SHA1 Message Date
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
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
raysan5
6f61e26a3c Reviewed custom logging functionality 2018-07-28 17:57:05 +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
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
Ahmad Fatoum
184e6de775
CMake: Don't build rlgl_standalone as part of the examples
Closes #588.
2018-07-25 00:51:42 +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
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
639ce09c9d
Travis CI: Fix emscripten build breakage 2018-07-21 19:42:23 +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
74a0814a8f Review formatting 2018-07-21 17:19:44 +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
Ray
6e812cf147 Working on MP3 support 2018-07-19 23:15:46 +02:00
Ray
bff3bb758a Reviewed audio_standalone
Now it works with mini_al library
2018-07-16 19:03:52 +02:00
Ray
b80ec381c8 Reviewed lighting example...
No model available, this example should probably be redesigned...
2018-07-16 18:44:18 +02:00
Ray
98273f0152 Reviewed compilation options 2018-07-16 18:43:24 +02:00
Ray
4d4d9b0170 Removed Oculus example
Oculus API has changed so much that it has no sense to keep this example here... it was funny to test it in the past...
2018-07-16 18:41:40 +02:00
Ray
5b37178af9 Reviewed rlgl_standalone example 2018-07-16 18:22:03 +02:00
Ray
096fd6f2c3 Converted rlgl module in header-only
This change allows rlgl.h usage as independent single-file header-only module... still some tweaks required, like removing GLAD dependency... required extensions could be manually loaded!

Also removed shader_distortion.h, embedded in rlgl.h
2018-07-16 17:53:47 +02:00
Ray
7d7c6fc42d Reviewed example for clarity 2018-07-15 20:24:18 +02:00
Ray
dfc4baaa35 Added new example: text_font_sdf 2018-07-15 20:04:12 +02:00
Ray
971a7419ec Start reviewing IQM loader... 2018-07-13 20:29:23 +02:00
Ray
5774d31893 Example tweak 2018-07-12 11:29:41 +02:00
Ray
d34c1285e0 Review Android Makefiles 2018-07-10 11:52:30 +02:00
culacant
b129ba09a6 fixed so it breaks 2018-07-05 23:35:53 +02:00
Ray
311d8b92f5 Upload IQM loader project -WIP- 2018-07-05 21:56:52 +02:00
Ahmad Fatoum
7c36237048
Example: Don't load texture removed from source tree
Fixes: c3b948b1 ("Replaced skybox HDR image")
2018-07-03 23:14:24 +02:00
Ray
a1d9c33995 Reviewed models and examples 2018-06-30 20:02:32 +02:00
Ray
c8b378ae50 Added new example screenshot 2018-06-30 20:01:10 +02:00
Ray
afe81d94ce Re-added: LoadFontEx() 2018-06-30 19:58:44 +02:00
Ray
64207b11c0 Removed unused textures 2018-06-30 19:58:08 +02:00
maficccc@gmail.com
59ebe1b7c3 Added support OpenBSD, NetBSD, DragonFly 2018-06-23 17:02:07 +02:00
Ray
1630597f08 Review OBJ loading example
Replaced old dwarf model
2018-06-21 16:48:54 +02:00
Ray
1ff8947864 Reviewed skybox example 2018-06-21 16:48:20 +02:00
Ray
c3b948b1b2 Replaced skybox HDR image
Note that HDR exposured possibilities are not used on this example...
2018-06-21 00:50:03 +02:00
Ray
d573a5ad60 Removed dwarf 3d model
Replaced by medieval 3d assets
2018-06-21 00:35:50 +02:00
Ray
d873314c27 Reviewed Windows resource file name 2018-05-29 00:52:08 +02:00
Ray
dbff40944a Corrected issue with floats on TCC
It seems TCC was not casting correctly int values to float in some
specific situations
2018-05-28 00:48:07 +02:00
Ahmad Fatoum
bd2300fed3
CMake+Android: Skip tests with SetCameraMode
src/core.c does explicitly skip including <camera.h> on Android
and tests fail. Therefore skip these failing tests.

Closes #507.
2018-05-21 01:17:13 +02:00
Ahmad Fatoum
20ddc6a2bb
Move utils.cmake to separate cmake/ directory 2018-05-21 01:08:28 +02:00
Ahmad Fatoum
c1b9104d54
Makefile: Remove unnecessary -no-pie for older GCC support
Currently, if:
* GCC doesn't supports -no-pie: Build error
* GCC supports -no-pie
    * GCC is not configured with --enable-default-pie: No-op
    * GCC is configured with --enable-default-pie:
            Slightly worse performance because we still generate -fpie code
            (-pie affects linker, -fpie affects compiler)

So instead of probing for existence of -fno-pie -no-pie, remove it altogether.

Fixes #540: Build breakage on Debian 8 with gcc 4.9.
2018-05-12 11:41:12 +02:00
Ray
245704df72 Reviewed examples 2018-05-11 18:14:51 +02:00
Ray
aa76985c0d Review raylib version to 2.0
Review raylib_icon resource
2018-05-11 18:14:19 +02:00
Ray
04db494db0 Renamed shader variable 2018-05-06 00:44:59 +02:00
Ray San
ec33e7d705 BREAKING CHANGE: Renamed SpriteFont type to Font
- Preparing MP3 files support
- Jumped version to raylib 2.0-dev (too many breaking changes...)
2018-05-04 16:59:48 +02:00
Ray San
6045062a05 Renamed some functions
- Renamed Begin3dMode() --> BeginMode3D()
- Renamed Begin2dMode() --> BeginMode2D()
- Renamed End3dMode() --> EndMode3D()
- Renamed End2dMode() --> EndMode2D()
2018-05-04 16:54:05 +02:00
Ray San
6324697ffd Rectangle parameters changed to float
- Some examples tweaks
- Reviewed ImageFormat()
- Use float for text fontSize
2018-05-04 16:25:31 +02:00
raysan5
198d739256 BREAKING CHANGE: Renamed Camera -> Camera3D
Just added a fallback in the meantime...
2018-05-01 12:31:03 +02:00