Commit Graph

2204 Commits

Author SHA1 Message Date
Max Danielsson
5ecee69088 Add 3d orthographic projection mode 2018-03-25 18:33:19 +02:00
Ray
22c8ea76aa
Merge pull request #510 from mackron/patch-2
Fix an infinite loop in ALSA backend of mini_al.
2018-03-20 09:53:08 +01:00
David Reid
a8e2c7de9c
Fix an infinite loop in ALSA backend of mini_al. 2018-03-20 18:39:21 +10:00
Ray
deffad1701 Review tabs issue when compiling...
...PLATFORM_ANDROID on Windows, using MinGW-w64 (x86) provided Make (GCC
7.2)
2018-03-19 23:49:14 +01:00
Ray
aab6c11ce1
Merge pull request #509 from mackron/patch-1
Fix a buffer overflow in the OSS/BSD backend of mini_al.
2018-03-18 13:15:32 +01:00
David Reid
4a69c2d75e
Fix a buffer overflow in the OSS/BSD backend. 2018-03-18 14:37:41 +10:00
Ahmad Fatoum
2c219fb814
Allow use of main instead of android_main
Inspired by #504.
Instead of requiring the user to do PLATFORM_ANDROID #ifdefery,
have the android_main entry point exported by raylib and call
the user-defined main. This way many games could (in theory)
run unmodified on Android and elsewhere.

This is untested!
2018-03-16 21:37:22 +01:00
Ray
61e0e4b4f3 Complete review of raymath for API consistency 2018-03-16 13:47:01 +01:00
Ray San
9318dc98ce Support case-insensitive extension check 2018-03-16 13:09:49 +01:00
Ray
487bc613fd Updated raylib dev version 2018-03-15 12:37:52 +01:00
Ray
9d8f15c19d Reviewed raymath changes 2018-03-15 12:37:23 +01:00
Ray
6c6d6776c0
Merge pull request #482 from a3f/master
raymath.h: Use C99 inline semantics
2018-03-15 12:27:40 +01:00
Ray
4cae2b8829
Merge pull request #505 from Martinfx/max-add-memory-sanitizer
Add memory sanitizer for better debug
2018-03-14 16:11:29 +01:00
maficccc@gmail.com
4c0925067a Add message warning for msan 2018-03-14 15:23:14 +01:00
maficccc@gmail.com
82491fcf6c Add memory sanitizer for better debug 2018-03-14 00:13:23 +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
Ray
8bc2813b0c
Merge pull request #500 from victorfisac/fork/master
[fork/master] Fixed some memory leaks and add null checks for consistency
2018-03-11 10:51:15 +01:00
raysan5
a0127d8300 Corrected typo 2018-03-11 10:49:51 +01:00
raysan5
fd5e457bb4 Correct issue with triangleCount 2018-03-11 10:41:49 +01:00
victorfisac
5b4197afeb Updated copyright years 2018-03-10 21:14:11 +01:00
victorfisac
d6fee9da29 Fixed compilation code comment in header 2018-03-10 19:30:25 +01:00
victorfisac
3201bad65a Fixed memory leaks in physics step operations 2018-03-10 19:25:17 +01:00
victorfisac
8f1d6f3850 Merge branch 'master' of github.com:raysan5/raylib into fork/master 2018-03-10 19:10:37 +01:00
Ray San
df50eada53 Added new functions
- SetWindowSize() to scale Windows in runtime
- SetMouseScale() to scale mouse input, useful when rendering game to a
RenderTexture2D that will be scaled to Window size (used on rFXGen tool)
2018-03-09 11:43:53 +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
raysan5
85850a955a Removed additional code
GLFW has been updated to latest version, probably this code is not
required any more due to already been integrated into library... but it
needs to be tested...
2018-03-03 16:01:24 +01:00
raysan5
3b4a64f2d6 Updated GLFW library to latest version 2018-03-03 15:58:44 +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
Ray
a7207dc6d4 Removed tangents generation
It has no sense to be inside LoadOBJ(), mesh processing moved to own functions: MeshTangents() and MeshBinormals(). Not exposed to user yet.
2018-02-26 12:02:05 +01:00
Ahmad Fatoum
3f48ffb1b6
Fix two memory leaks in jar_xm.h
Found by LeakSanitizer in #494.
2018-02-26 00:14:19 +01:00
RDR8
18f61948ce Update Makefile
$ make clean
Makefile:296: *** missing separator.  Stop.
2018-02-25 22:27:32 +01:00
Ahmad Fatoum
80bf636f81
Don't exceed signed int range when shifting left
Fixes UB in #489, found by UBSan.
2018-02-25 03:17:57 +01:00
Ahmad Fatoum
76aca9b0d1
Fix possible buffer overflow in LoadBMFont
Width specifier doesn't include NUL terminator.
Fixes #487 found by AddressSanitizer.
2018-02-25 03:03:37 +01:00
Ray
c5f7863689
Merge pull request #492 from a3f/raylib-master
jar_xm: Workaround for unaligned pointer accesses
2018-02-25 00:04:50 +01:00
Ahmad Fatoum
1430d01906
jar_xm: Workaround for unaligned pointer accesses
jar_xm.h does some shady pointer casts leading to unaligned accesses
and breaking strict aliasing. x86 has special circuitry for doing
unaligned accesses, but on other architectures, it may trap and require
kernel fix-up or crash outright. With this patch, one obstacle in
porting raylib to the GameBoy Advance has been removed. Go for it ;-)

To avoid having to rewrite that `mempool' code, insert padding before
structs and instruct the compiler (GCC, most importantly), to be gentle
when optimizing.

This fixes #490 (Unless we got ourselves 256-bit pointers, if so,
hello future!)
2018-02-24 23:59:56 +01:00
Ray
6026ed61a5
Merge pull request #480 from RDR8/master-patch-makefiles
Update Makefiles. Automate example usage of staged libraylib.so.
2018-02-24 23:57:46 +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
Ahmad Fatoum
ed6962edd3
Make MatrixToFloat and Vector3ToFloat reentrant
Besides making it thread-safe, it suppresses a GCC warning
when making them static inline in an upcoming patch.
2018-02-24 23:39:17 +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
c9043b5a87
CMake: Add options to use -fsanitize={address,undefined}
To make bugs like #485, #486, #487 and #488 easier to find in future.
2018-02-24 15:37:38 +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
Ahmad Fatoum
e4d7bbec1e
Make MatrixToFloat and Vector3ToFloat reentrant
Besides making it thread-safe, it suppresses a GCC warning
when making them static inline in an upcoming patch.
2018-02-24 15:37:37 +01:00
Ray
077bef4286 Support 4 components mesh.tangent data
Added struct Vector4 for convenience
2018-02-24 12:31:32 +01:00
Ray
6d64327a87 Reviewed unloading model data
When UnloadModel() --> UnloadMaterial(), avoid unloading default shader (if used) and avoid unlaoding default texture (if used), that data is managed by raylib internally. The question is... should UnloadModel() also UnloadMaterial()?
2018-02-22 12:39:17 +01:00
Ray
cd5e2e0f17 Corrected cursor issue for Wayland 2018-02-22 00:01:13 +01:00
Ray
326fe09777 Reviewed compilation for OpenGL 1.1 2018-02-21 23:47:48 +01:00
Ray
97bf2706c4 Removed flag -fgnu89-inline 2018-02-21 23:28:34 +01:00