Commit Graph

519 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
raysan5
23e335d933 Implemented MeshTangents()
- Added Vector3OrthoNormalize() to raymath.h - not sure if it is correct
- Implemented MeshBinormals() - Mesh struct has not a place for them...
- Updated model_material_pbr example - tested but not working on my GPU
(old Intel HD), actually, it never worked on it...
2018-04-30 02:47:48 +02:00
Ray San
4cc12ef2b3 Review camera definition on examples 2018-04-11 10:13:00 +02:00
Ray San
cc3b8645df Updated release version 2018-04-10 10:37:48 +02:00
lumaio teon
7bd0f8b28c
Fix mesh picking example 2018-04-07 04:00:06 -04:00
Ray
3e0de31424
Merge pull request #504 from Martinfx/master
Fix potential bugs from static analysis
2018-04-02 18:10:38 +02:00
maficccc@gmail.com
551cf50685 Fix Uninitialized argument value 2018-04-02 13:30:20 +02:00
maficccc@gmail.com
6a3eca3f92 Fix value stored to 'body' is never read 2018-04-02 13:30:20 +02:00
maficccc@gmail.com
9459186125 Fix call argument is an uninitialized value 2018-04-02 13:30:19 +02:00
maficccc@gmail.com
df74607479 Fix warning: illegal character encoding in string literal 2018-04-02 13:30:19 +02:00
Max Danielsson
42e64e931b Simplify camera data switch in orthographic 3d example 2018-03-27 21:16:25 +02:00
Max Danielsson
e38d28543a Remove state bool in camera projection type example.
Changes made based on commentary in pull request 513
2018-03-27 19:58:42 +02:00
Max Danielsson
d91179f8ab Add orthographic projection example 2018-03-25 18:49:15 +02:00
Ray
6c6d6776c0
Merge pull request #482 from a3f/master
raymath.h: Use C99 inline semantics
2018-03-15 12:27:40 +01:00
raysan5
b9573e583f Merge branch 'master' of https://github.com/raysan5/raylib 2018-03-11 11:02:03 +01:00
raysan5
d6c1159fce Corrected typo 2018-03-11 11:01:58 +01:00
victorfisac
5b4197afeb Updated copyright years 2018-03-10 21:14:11 +01:00
victorfisac
3201bad65a Fixed memory leaks in physics step operations 2018-03-10 19:25:17 +01:00
Ray
276847eca9 Correct issue with tangents 2018-03-04 23:24:30 +01:00
maficccc@gmail.com
8cb324b2da Fix result of operation is garbage or undefined 2018-03-04 16:26:49 +01:00
Ray
fd2adbe62d Renamed CalculateBoundingBox() to MeshBoundingBox()
Renamed function for consistency with a possible Mesh manipulation functions (maybe added in a future). Naming follows Image*() manipulation functions.
2018-02-26 12:10:45 +01:00
Ahmad Fatoum
f52d2de582
raymath.h: Use C99 inline semantics
RAYMATH_EXTERN_INLINE was renamed to RAYMATH_HEADER_ONLY, which user code
may define if they want to use it as header-only library. If multiple
files in the same project define RAYMATH_HEADER_ONLY, they might each
have duplicate out-of-line definitions of the same functions.

By default, raymath.h exposes inline definitions, which instructs the
compiler _not_ to generate out-of-line definitons, if out-of-line
definitions are required, those of the file defined with
RAYLIB_IMPLEMENTATION are used instead. There may be only one such file.

In C++ mode, the compiler will select only one out-of-line definition
automatically, so no need to define a RAYLIB_IMPLEMENTATION.

Unfortunately, we have to remove raymath function declaration from
raylib.h as those declarations would lead to duplicate out-of-line
definitions which would yield linker errors. This problem didn't
exist with GNU89 or C++, because there multiple defintions are ok,
but in C99 they aren't.
2018-02-24 23:39:23 +01:00
RDR8
2b5fc12036 Update Makefiles. Enable example usage of staged libraylib.so. 2018-02-24 14:24:55 -06:00
Ahmad Fatoum
a5881fb9cc
Revert "raymath.h: Use C99 inline semantics"
This reverts commit 6ffc8cb799.
and commit e4d7bbec1e.
which I pushed by mistake...
2018-02-24 15:40:08 +01:00
Ahmad Fatoum
6ffc8cb799
raymath.h: Use C99 inline semantics
RAYMATH_EXTERN_INLINE was renamed to RAYMATH_HEADER_ONLY, which user code
may define if they want to use it as header-only library. If multiple
files in the same project define RAYMATH_HEADER_ONLY, they might each
have duplicate out-of-line definitions of the same functions.

By default, raymath.h exposes inline definitions, which instructs the
compiler _not_ to generate out-of-line definitons, if out-of-line
definitions are required, those of the file defined with
RAYLIB_IMPLEMENTATION are used instead. There may be only one such file.

In C++ mode, the compiler will select only one out-of-line definition
automatically, so no need to define a RAYLIB_IMPLEMENTATION.

Unfortunately, we have to remove raymath function declaration from
raylib.h as those declarations would lead to duplicate out-of-line
definitions which would yield linker errors. This problem didn't
exist with GNU89 or C++, because there multiple defintions are ok,
but in C99 they aren't.
2018-02-24 15:37:37 +01:00
Ray
97bf2706c4 Removed flag -fgnu89-inline 2018-02-21 23:28:34 +01:00
RDR8
97f8b85429
Update Makefile 2018-02-12 09:19:24 +00:00
RDR8
0be4d802ee
Update Makefile 2018-02-12 01:25:08 +00:00
RDR8
e86b4d4e03 Update Makefiles for Linux installation. 2018-02-11 22:58:15 +00:00
kai
bdb61306ac CMake: build shape and texture examples (#432) 2018-01-17 20:14:14 +01:00
Ray
c8e97df233 Reviewed function GenImagePerlinNoise()
Added support for noise image offset
2018-01-17 00:43:30 +01:00
-
f2a675ae53 Reviewed Makefiles...
- Renamed VERSION to RAYLIB_VERSION
- Renamed API_VERSION to RAYLIB_API_VERSION
- Renamed RAYLIB_RELEASE to RAYLIB_RELEASE_PATH
- Support Web Assembly compilation on PLATFORM_WEB
2018-01-15 13:54:06 +01:00
-
ddf6c65d00 Review Makefiles and templates 2018-01-15 12:52:58 +01:00
raysan5
e69424c86f Reviewed text input 2017-12-31 23:50:22 +01:00
raysan5
7965f983ba Support Wayland display on Linux desktop 2017-12-28 18:14:39 +01:00
raysan5
c93bca8c27 Review Makefile config flags
Support external GLFW usage
Renamed some flags for consistency
2017-12-28 17:58:09 +01:00
Martinfx
dae426d9c6 Fixed path for FreeBSD 2017-12-23 18:29:44 +01:00
raysan5
5ae2c0d15b Added Wayland support
Updated to latest GLFW library and working on Wayland support, still
looking how to implement it on raylib because it just exposes
PLATFORM_DESKTOP and defaults to X11 windowing system on Linux...
2017-12-09 19:05:42 +01:00
Ray San
3b5a26099e Removed OpenAL Soft dependency on building
OpenAL Soft backend is still available in audio module, I'm thinking if
exposing it for building in some way or just left it there for advance
users to switch to it manually in case of necessity...
2017-12-05 14:01:35 +01:00
Ahmad Fatoum
f991a075e1 Build examples and games on Travis CI
They were disabled because they failed to build,
but this patch set fixes the build on Linux and macOS.

This doesn't apply to the AppVeyor build on Windows yet;
it currently fails at linking with OpenAL.
2017-11-25 21:45:31 +01:00
Ray
6624672bfa
Merge pull request #389 from Martinfx/master
Added  clean to Makefile for FreeBSD
2017-11-21 23:26:01 +01:00
Martinfx
398d793dbb Added FreeBSD clean for Makefile 2017-11-21 19:30:52 +01:00
raysan5
09228752ce Review default shaders usage on loading 2017-11-12 10:33:44 +01:00
Wilhem Barbier
7ef604fbf5 Store the default shaders 2017-11-09 20:47:22 +01:00
Ray San
0eb222bda1 Issue with libraries renamed on Raspbian Stretch
libEGL and libGLESv2 have been renamed on latest Raspbian Stretch
version (also included on latest Jessie upgrade).

It seems to be done to avoid conflicts between official Mesa libs and
Broadcomm provided ones.
2017-11-07 13:02:15 +01:00
Ray San
4fe8e05a7f Review GLSL 120 shaders
Not tested, could have errors
2017-11-06 13:49:33 +01:00
Ray
085779707f Uploaded shaders for GLSL 120 2017-11-05 17:13:17 +01:00
Ray
24657ca789 Review textures to be POT
Could correct possible issues on OpenGL 1.1
2017-11-05 17:06:50 +01:00
Ray San
3d755d617a Some code tweaks... 2017-11-02 20:08:52 +01:00
Ray San
415e7e972c Review some issues, view description
- Review RPI compilation (core_drop_files not supported)
- Review ImageFormat(), some issues
- GetTextureData() reviewed for RPI
2017-10-30 13:51:46 +01:00
Ray San
f460b3842e Added new example: text drawing on image 2017-10-30 09:37:16 +01:00