summaryrefslogtreecommitdiffhomepage
path: root/src/shapes.c
AgeCommit message (Collapse)Author
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
2020-01-05Update year to 2020raysan5
2019-10-29Review formatting for PR #1004Ray
2019-10-29fix various problems, thanks CppCheck :) (#1005)João Coelho
* explained a bit more the core_window_letterbox example * fixed a few 'ups' moments that could lead to mild head pain and time loss
2019-09-24Improve code readability (#976)AlexHCC
2019-09-22Fixed regular polygon shape rendering (#972)AlexHCC
2019-08-19Update shapes.c for smoother collision detection (#946)Colday96
By removing the equal sign, if the 2 rects a right next to each other and not overlapping, there will be no collision detection. This is what a majority of other game libraries do and would make it easier to implement collisions for tile based games.
2019-08-11Added notes about vertex orderraysan5
2019-07-24BREAKING CHANGE: Read descriptionRay
Changes: - Font structure has been redesigned, CharInfo structure contained character rectangle within font texture, it has not much sense, considering that it was an information relative to the font atlas generated and not the character itself, so character rectangles have been moved out from CharInfo to Font. - CharInfo included a data parameters to contain character pixel data (usually grayscale), generated on TTF font generation. It was inconsistent with other fonts types, so, now CharInfo includes directly an Image of the glyph. - REDESIGNED: GenImageFontAtlas(), additional recs parameter added, loaded and filled inside the function to export atlas characters rectangles, instead of silently modify the input CharInfo data. - REVIEWED: ImageTextEx(), funtion retrieved the font atlas image from the GPU, that was slow and problematic in several platforms. Now it uses directly the CharInfo image. Support for unicode codepoints has also been added. - REDESIGNED: ImageDraw(), now it includes an additional parameter, the color tint, not only it could be useful for several situations but also function signature is more consistent with similar functions. - ADDED: ImageFromImage() to generate a new image from a piece of another image. - REVIEWED: GetNextCodepoint(), renamed parameters to be more clear. Also all examples and games that were affected by those changes have been reviewed.
2019-06-17ADDED: DrawTriangleStrip()Ray