Commit Graph

2021 Commits

Author SHA1 Message Date
maficccc@gmail.com 82491fcf6c Add memory sanitizer for better debug 2018-03-14 00:13:23 +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
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
Ray 788049df09
Update README.md 2018-02-20 11:04:02 +01:00
Ray 81546308cd
Update README.md 2018-02-20 10:48:34 +01:00
Ray 11612fce27 Reviewed timming system for macOS
Apparently, before macOS Sierra version, clock_gettime was not available, using MATCH timming system instead
2018-02-20 10:30:51 +01:00
Ahmad Fatoum 1652943f98
Docs: Replace references to raylib develop branch
Found by grepping for '(blob|tree)/develop'.  See #443 for more information.
2018-02-19 13:58:25 +01:00
Ahmad Fatoum d892243d18
CI: Build artifacts for master, not develop tags
See #443 for more information.
2018-02-19 13:56:55 +01:00
Ray f6231aa8b6
Merge pull request #474 from raysan5/develop
Integrate develop branch (LAST INTEGRATION)
2018-02-19 12:08:35 +01:00
Ray 7e32a627e8 Corrected path backslash 2018-02-19 00:03:24 +01:00
raysan5 0958904eac Added comments to review function ImageTextEx() 2018-02-18 19:29:13 +01:00
raysan5 4492a70a4b Support UTF8 basic characters on ImageTextEx()
Supported UTF8 range equivalent to [128..255] (80h..FFh)
Exposed and renamed text function GetGlyphIndex()
Renamed spriteFont parameter name to simply font
Small security check on transmission mission ending screen
2018-02-18 18:07:57 +01:00
raysan5 50fc4f7164 Reviewed transmission mission game
Support string replacing to generate newspaper headline
ISSUE: UTF8 characters not supported when drawing to Image
2018-02-17 21:23:45 +01:00
Ray 769cf23e53
Merge pull request #470 from jubalh/develop
Add Builder project files
2018-02-16 12:12:59 +01:00
Michael Vetter 883ed20e7c Add note about glfw3 and openAL 2018-02-16 11:53:04 +01:00
Michael Vetter e0a3a51b75 Builder project: Add note about examples 2018-02-16 11:25:12 +01:00
Michael Vetter 6ebc3fd29a Add core_basic_window project example for Builder 2018-02-16 11:23:02 +01:00
Michael Vetter 988f5b7832 Add Builder project template 2018-02-16 11:20:21 +01:00
Ahmad Fatoum 051040af2d
CMake: Remove _RAYLIB suffix from -D{SHARED,STATIC}_RAYLIB
They were named so for compatibility with make, but make doesn't use
the anymore. I always forget whether it's SHARED_RAYLIB or
RAYLIB_SHARED...

For now, RAYLIB_SHARED and STATIC_RAYLIB may still be used,
but print a deprecation warning.
2018-02-16 05:58:18 +01:00
Ray ffde83d85f
Merge pull request #467 from raysan5/develop
Integrate develop branch
2018-02-14 22:44:09 +01:00
Ray 36750ffb9a BREAKING CHANGE: Renamed function for consistency
Rename: GetHexValue() renamed to ColorToInt()
Added: ColorToHSV()
2018-02-12 11:55:22 +01:00
Ray 7530a60abc
Update README.md 2018-02-12 11:53:47 +01:00
Ray dd8f0765b8
Merge pull request #465 from raysan5/develop
Integrate develop branch into master
2018-02-12 11:27:26 +01:00
Ray 8af5f9dfe0 Avoid rendering SPACE character! 2018-02-12 11:25:00 +01:00
Ray 51124bfb74
Merge pull request #464 from RDR8/develop-make-install-linux
Linux make install improvements
2018-02-12 11:23:31 +01:00
RDR8 97f8b85429
Update Makefile 2018-02-12 09:19:24 +00:00
RDR8 f742f1289d
Update Makefile 2018-02-12 05:17:02 +00:00
RDR8 0be4d802ee
Update Makefile 2018-02-12 01:25:08 +00:00
RDR8 5616314069
Update Makefile 2018-02-12 00:15:58 +00:00
RDR8 4c4b564392
Update Makefiles for Linux installation. See prior commit.
These changes are intended to provide context and control over the Linux make install process. make install RAYLIB_LIBTYPE=SHARED now works as expected. libraylib.so is properly installed with attendant runtime links. The examples will be running against the newly installed libraylib.so unless otherwise specified with RAYLIB_RUNTIME_PATH. See raylib/src/Makefile and raylib/examples/Makefile for usage of RAYLIB_INSTALL_PATH, RAYLIB_H_INSTALL_PATH, and RAYLIB_RUNTIME_PATH variables. RAYLIB_RUNTIME_PATH in particular is interesting for portability since sudo isn't needed.
The default configuration and workflow is essentially unchanged and unaffected.
2018-02-11 23:42:22 +00:00
RDR8 e86b4d4e03 Update Makefiles for Linux installation. 2018-02-11 22:58:15 +00:00