summaryrefslogtreecommitdiffhomepage
path: root/src/shapes.c
AgeCommit message (Collapse)Author
2021-09-22WARNING: MODULES RENAMING!!!Ray
raylib modules have been slightly renamed to add some identity and note that they are independent modules that can be used as standalone separate parts of raylib if required. The renamed modules are: - `core` -> `rcore` - `shapes` -> `rshapes` - `textures` -> `rtextures` - `text` -> `rtext` - `models` -> `rmodels` - `camera` -> `rcamera` - `gestures` -> `rgestures` - `core` -> `rcore` All the build systems has been adapted to this change.
2021-09-01REVIEWED: <name>Count for consistencyRay
Following english rules, it should be singular name before Count.
2021-07-29WARNING: BREAKING CHANGE: rlgl complete decoupling from raylib -WIP-raysan5
rlgl has been redesigned to avoid any dependency to `raylib` or `raymath`, all functions using some of those libs have been reviewed. - REMOVED: `Texture2D`, `Shader` structs dependency - REMOVED: `Vector3`, `Matrix` structs dependency - REMOVED: raymath functions dependency, all required math is implemented in rlgl - ADDED: `rlMatrix` custom rlgl type - ADDED: `utils.c`: `rlMatrixFromMatrix()` and `rlMatrixToMatrix()` for a safe conversion between raylib<->rlgl matrix types - ADDED: `rl` prefix to all `rlgl` structs - Other small tweaks here and there
2021-07-09Minor tweaks and commentsraysan5
2021-06-22Formatting reviewRay
2021-06-13Remove trail spacesRay
2021-06-10Review code formattingRay
2021-05-14Review some VS warnings and messagesRay
2021-05-10Add RenderPolyLinesEx routine (#1758)Lambert Wang
Co-authored-by: Lambert Wang <[email protected]>
2021-04-06Minimum number of segments in circle sector functions changed from ↵frithrah
hard-coded to based on degree range. (#1707) Co-authored-by: Simon <[email protected]>
2021-04-04REDESIGNED: Shapes texture/rec moved to shapes moduleraysan5
2021-04-02Remove old flagraysan5
2021-04-01Remove trailing spacesraysan5
2021-04-01Review commentsraysan5
2021-03-31Review formattingraysan5
2021-03-31REVIEWED: CheckCollisionPointLine()raysan5
Use fabsf() instead of abs()
2021-03-31[shapes] CheckCollisionPointTriangle (fix), CheckCollisionPointLine (new ↵mkupiec1
routine) (#1695) * CheckCollisionPointTriangle * New feature proposal to existing collision detection routines. It checks if point [point] belongs to line created between two points [p1] and [p2] with defined margin in pixels[threshold]. 1693
2021-03-26Preserve floating point values in DrawRectangleLinesEx (#1683)Dan Bechard
2021-03-25WARNING: BREAKING: rlgl redesign -WIP-Ray
rlgl module has been completely redesigned to move Mesh/Material structures to [models] module. Still some work to do, broken elements: - [models] OpenGL 1.1 mesh rendering: DrawMesh() - [models] Mesh Instancing: DrawMeshInstanced() - [models] Stereo rendering: DrawMesh() - [models] GL_FLOAT, GL_UNSIGNED_INT exposed - [models] GenMeshCustom() - [rlgl] GenTexture*() functions removal?
2021-03-24REVIEWED: DrawRectangleRounded() performance #1523Ray
Function analyzed using RenderDoc. It's a complex function and could require many triangles for the corners but it seems overall it's quite optimized!
2021-03-23Fix 90 degree bug with DrawTexturePro and DrawRectanglePro (#1673)Chris
- The vertices did not map to where I expected causing rotation to be off by 90 degrees. I reorganized the vertices making it easier to reason about which fixes this. - The order for drawing is now topLeft, bottomLeft, bottomRight, topRight.
2021-03-21WARNING: BREAKING: rlgl module redesign -WIP-Ray
- Some rlgl functions have been moved to core - Some functions have been made internal to rlgl - rlgl functions prefixed with rl*()
2021-03-19Updated example assetsRay
2021-03-19Removed trailing spacesRay
2021-03-19Reviewed latest PR: formatting and some commentsRay
2021-03-19Optimize DrawTexturePro and DrawRectanglePro transformations (#1632)Chris
* Optimize DrawTexturePro and DrawRectanglePro transformations - Add check so rotation is only applied if rotation != 0.0f. - Replace matrix usage by calculating the vertex data directly. * Fix error with windows build and trim whitespace
2021-03-19Changed DrawRing and DrawCircleSector angle params from int to float to ↵frithrah
allow greater accuracy. (#1656) Co-authored-by: Simon <[email protected]>
2021-03-01REVIEWED: CheckCollisionLines()Ray
2021-02-20Fixed DrawLineEx (#1598)Paul Jurczak
* Fixed DrawLineEx Corrected the issue https://github.com/raysan5/raylib/issues/1596 * Removed raymath dependency for DrawLineEx
2021-01-02Update year to 2021raysan5
2020-12-26Review DrawLineBezierQuad(), formating and aprameters orderraysan5
2020-12-26Add Quadratic Bezier drawing (#1468)Violet White
* Add quadratic bezier to shapes.c * Add DrawLineBezierQuad to header
2020-12-23Remove trailing spacesraysan5
2020-12-23Corrected typoraysan5
2020-12-23Corrected small issueraysan5
2020-12-23ADDED: CheckCollisionLines()raysan5
Removed function from raymath
2020-12-19Avoid *Rec suffix in some variablesRay
Pefixing/Suffixing some data type identifier in the variables is not a convention used in raylib, just reviewed it for consistency... Still, I kept the *Rec suffix in some functions.
2020-11-03Remove trailing spacesRay
2020-07-22DrawTriangleFan(): Add a comment about vertex order #1316Ray
2020-05-21Review buffer limits on rectangle drawingraysan5
2020-05-06Avoid all MSVC compile warningsraysan5
Most warning were related to types conversion (casting required) and unsigned/signed types comparisons. Added preprocessor directives (_CRT_SECURE_NO_DEPRECATE; _CRT_NONSTDC_NO_DEPRECATE) to avoid warnings about unsafe functions, those functions are safe while used properly and recommended alternatives are MS only. Some external libraries still generate warnings.
2020-05-01Review exposed #defines and allow user re-definingraysan5
There are multiple #define values around raylib, usually not exposed for redefinition, just reviewed all of them to allow users redefining them on compile time if required. Also, multiple #define have been renamed and commented.
2020-04-27Review issue with vertex batch overflow #1223raysan5
2020-02-28Replaced fabs() by fabsf() when requiredRay
2020-02-04Review libc dependencies and remove when possibleRay
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions: - stdlib.h: primary dependency is for malloc() and free() - stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI? - string.h: just around 8 functions required - math.h: just around 8 functions required - others: 1-2 functions required for some other headers
2020-02-03Remove all trail spacesRay
2020-02-03Develop branch integration (#1091)Ray
* [core] REDESIGNED: Implement global context * [rlgl] REDESIGNED: Implement global context * Reviewed globals for Android * Review Android globals usage * Update Android globals * Bump raylib version to 3.0 !!! * [raudio] REDESIGNED: Implement global context * [raudio] Reorder functions * [core] Tweaks on descriptions * Issues with SUPPORT_MOUSE_GESTURES * [camera] Use global context * REDESIGN: Move shapes drawing texture/rec to RLGL context * Review some issues on standalone mode * Update to use global context * [GAME] Upload RE-PAIR game from GGJ2020 -WIP- * Update game: RE-PAIR * [utils] TRACELOG macros proposal * Update config.h
2020-01-27ADDED: DrawEllipse() and DrawEllipseLines() #1047Ray
2020-01-09ADDED: DrawPolyLines()Ray
2020-01-08Reviewed some commentsRay