summaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
2018-02-26Removed tangents generationRay
It has no sense to be inside LoadOBJ(), mesh processing moved to own functions: MeshTangents() and MeshBinormals(). Not exposed to user yet.
2018-02-26Fix two memory leaks in jar_xm.hAhmad Fatoum
Found by LeakSanitizer in #494.
2018-02-25Update MakefileRDR8
$ make clean Makefile:296: *** missing separator. Stop.
2018-02-25Don't exceed signed int range when shifting leftAhmad Fatoum
Fixes UB in #489, found by UBSan.
2018-02-25Fix possible buffer overflow in LoadBMFontAhmad Fatoum
Width specifier doesn't include NUL terminator. Fixes #487 found by AddressSanitizer.
2018-02-24jar_xm: Workaround for unaligned pointer accessesAhmad Fatoum
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-24raymath.h: Use C99 inline semanticsAhmad Fatoum
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-24Make MatrixToFloat and Vector3ToFloat reentrantAhmad Fatoum
Besides making it thread-safe, it suppresses a GCC warning when making them static inline in an upcoming patch.
2018-02-24Update Makefiles. Enable example usage of staged libraylib.so.RDR8
2018-02-24Revert "raymath.h: Use C99 inline semantics"Ahmad Fatoum
This reverts commit 6ffc8cb7990fb4ff40f205cb53bec797b10e48a2. and commit e4d7bbec1ef08279495ac41f5f8c4be359c58cf0. which I pushed by mistake...
2018-02-24CMake: Add options to use -fsanitize={address,undefined}Ahmad Fatoum
To make bugs like #485, #486, #487 and #488 easier to find in future.
2018-02-24raymath.h: Use C99 inline semanticsAhmad Fatoum
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-24Make MatrixToFloat and Vector3ToFloat reentrantAhmad Fatoum
Besides making it thread-safe, it suppresses a GCC warning when making them static inline in an upcoming patch.
2018-02-24Support 4 components mesh.tangent dataRay
Added struct Vector4 for convenience
2018-02-22Reviewed unloading model dataRay
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-22Corrected cursor issue for WaylandRay
2018-02-21Reviewed compilation for OpenGL 1.1Ray
2018-02-21Removed flag -fgnu89-inlineRay
2018-02-20Reviewed timming system for macOSRay
Apparently, before macOS Sierra version, clock_gettime was not available, using MATCH timming system instead
2018-02-18Added comments to review function ImageTextEx()raysan5
2018-02-18Support UTF8 basic characters on ImageTextEx()raysan5
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-16CMake: Remove _RAYLIB suffix from -D{SHARED,STATIC}_RAYLIBAhmad Fatoum
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-12BREAKING CHANGE: Renamed function for consistencyRay
Rename: GetHexValue() renamed to ColorToInt() Added: ColorToHSV()
2018-02-12Avoid rendering SPACE character!Ray
2018-02-12Update MakefileRDR8
2018-02-12Update MakefileRDR8
2018-02-11Update Makefiles for Linux installation. See prior commit.RDR8
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-11Update Makefiles for Linux installation.RDR8
2018-02-11pkg-config: Empty Requires.private on shared-only buildAhmad Fatoum
If user doesn't build the static library, `pkg-config --static --libs raylib` should be equivalent to `pkg-config --libs raylib`.
2018-02-11mini_al: Support {Net,Open}BSD OSSAhmad Fatoum
Fixes this build failure: http://www.cpantesters.org/cpan/report/a069fade-0e1f-11e8-a1cf-bb670eaac09d
2018-02-11Some reviews for Android compilationRay
2018-02-11Corrected masteVolume settingRay
2018-02-11Reviewed mini_al implementationRay
- Some functions renamed - Comments reviewed - Functions reorganized
2018-02-09Early-exit InitWindow if InitGraphicsDevice failsAhmad Fatoum
Otherwise we may run into LoadDefaultFont and crash in rlLoadTexture Also moves InitTimer() before InitGraphicsDevice(), to allow it to be tested even if InitWindow ultimately fails.
2018-02-09Updated external librariesRay
2018-02-08InitWindow: return false if no monitor foundAhmad Fatoum
Otherwise we run into an assertion failure inside GLFW's glfwGetVideoMode. Example: http://www.cpantesters.org/cpan/report/b4ba5894-0bdb-11e8-841e-2c60b04e1d2d This is related to #456.
2018-02-05Added function LoadShaderCode()Ray
Allows loading of shader from text code string directly
2018-02-04Merge branch 'develop' of https://github.com/raysan5/raylib into developraysan5
2018-02-04Incremeted version to align with CMakeraysan5
2018-02-04Bump version to 1.9.4Ahmad Fatoum
2018-02-04Updated raylib versionraysan5
Note that this version is under development and could be buggy on some platforms...
2018-02-04Security check in case window initialization failsraysan5
2018-02-04Reviewed window initializationraysan5
In case graphic device could not be created it returns false instead of failing with an error tracelog (and consequently closing the program). Window initialization success could be checked with new function IsWindowReady()
2018-02-03Return false from InitWindow if glfwInit or glfwCreateWindow failsAhmad Fatoum
You can't do much with raylib if glfwInit or glfwCreateWindow fails, currently it just exits by means of TraceLog(LOG_ERROR. User code, however, might want to fall back to a text-only UI or display a warning if raylib can't be used.
2018-02-03exit(3), don't crash, when glfwCreateWindow failsAhmad Fatoum
glfwSetWindowPos was called on a NULL window, triggering an assert inside GLFW. Check for failure and exit cleanly by means of TraceLog(LOG_ERROR instead.
2018-02-03CMake: Add tristate option for using system GLFW (#455)Ahmad Fatoum
-DWITH_SYSTEM_GLFW=ON: Link against system glfw and fail otherwise -DWITH_SYSTEM_GLFW=OFF: Use embedded rglfw.c -DWITH_SYSTEM_GLFW=IF_POSSIBLE: Probe for system glfw but fallback to rglfw if unavailable Also change Linux 64-bit CI build to install system glfw and use it, so this doesn't bitrot. Addresses #453.
2018-02-03CMake: Fix typo in MACOS_FATLIBAhmad Fatoum
2018-02-02Added function DrawRectangleLinesEx()Ray San
2018-01-31Corrected typoRay
2018-01-31Added missing keys definitionsRay