Commit graph

150 commits

Author SHA1 Message Date
Ray
4b93feb172 Remove trail spaces 2021-06-13 17:08:30 +02:00
Ray
b188008a1c Review code formatting 2021-06-10 18:00:44 +02:00
Ray
3baba7ffe8 Review some VS warnings and messages 2021-05-14 14:01:42 +02:00
Lambert Wang
e39e45824d
Add RenderPolyLinesEx routine (#1758)
Co-authored-by: Lambert Wang <lambert.ww@gmail.com>
2021-05-10 20:08:58 +02:00
frithrah
b2545e053a
Minimum number of segments in circle sector functions changed from hard-coded to based on degree range. (#1707)
Co-authored-by: Simon <simon@frithrah.com>
2021-04-06 14:29:58 +02:00
raysan5
66f3434571 REDESIGNED: Shapes texture/rec moved to shapes module 2021-04-04 14:59:17 +02:00
raysan5
d64f27bad1 Remove old flag 2021-04-02 13:42:07 +02:00
raysan5
aed0fee2ca Remove trailing spaces 2021-04-01 20:24:33 +02:00
raysan5
b4975619ed Review comments 2021-04-01 20:23:05 +02:00
raysan5
2488d361b6 Review formatting 2021-03-31 20:15:04 +02:00
raysan5
8e51e6d1df REVIEWED: CheckCollisionPointLine()
Use fabsf() instead of abs()
2021-03-31 18:40:33 +02:00
mkupiec1
3d1a05d588
[shapes] CheckCollisionPointTriangle (fix), CheckCollisionPointLine (new 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-31 16:50:05 +02:00
Dan Bechard
b6ca524bdd
Preserve floating point values in DrawRectangleLinesEx (#1683) 2021-03-26 20:15:19 +01:00
Ray
cba412cc31 WARNING: BREAKING: rlgl redesign -WIP-
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-25 14:28:12 +01:00
Ray
c2bc3d22a1 REVIEWED: DrawRectangleRounded() performance #1523
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-24 00:25:53 +01:00
Chris
2532c396ed
Fix 90 degree bug with DrawTexturePro and DrawRectanglePro (#1673)
- 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-23 14:40:26 +01:00
Ray
ed4ca6a7f3 WARNING: BREAKING: rlgl module redesign -WIP-
- Some rlgl functions have been moved to core
 - Some functions have been made internal to rlgl
 - rlgl functions prefixed with rl*()
2021-03-21 01:29:31 +01:00
Ray
442abaab72 Updated example assets 2021-03-19 22:39:39 +01:00
Ray
9909068714 Removed trailing spaces 2021-03-19 19:43:44 +01:00
Ray
e28f754fbe Reviewed latest PR: formatting and some comments 2021-03-19 19:42:36 +01:00
Chris
45670fbf2d
Optimize DrawTexturePro and DrawRectanglePro transformations (#1632)
* 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-19 19:19:10 +01:00
frithrah
2f367a905e
Changed DrawRing and DrawCircleSector angle params from int to float to allow greater accuracy. (#1656)
Co-authored-by: Simon <simon@frithrah.com>
2021-03-19 19:13:55 +01:00
Ray
3f6a08535f REVIEWED: CheckCollisionLines() 2021-03-01 23:39:08 +01:00
Paul Jurczak
82cdd88ffe
Fixed DrawLineEx (#1598)
* Fixed DrawLineEx

Corrected the issue https://github.com/raysan5/raylib/issues/1596

* Removed raymath dependency for DrawLineEx
2021-02-20 23:35:43 +01:00
raysan5
d7b4b9e485 Update year to 2021 2021-01-02 18:15:13 +01:00
raysan5
521ed1cef0 Review DrawLineBezierQuad(), formating and aprameters order 2020-12-26 13:09:34 +01:00
Violet White
de13fca3b1
Add Quadratic Bezier drawing (#1468)
* Add quadratic bezier to shapes.c

* Add DrawLineBezierQuad to header
2020-12-26 13:04:38 +01:00
raysan5
0a9e080998 Remove trailing spaces 2020-12-23 15:03:26 +01:00
raysan5
9216e96315 Corrected typo 2020-12-23 13:02:40 +01:00
raysan5
0da827d754 Corrected small issue 2020-12-23 12:54:57 +01:00
raysan5
b78ee13791 ADDED: CheckCollisionLines()
Removed function from raymath
2020-12-23 12:45:53 +01:00
Ray
2374281204 Avoid *Rec suffix in some variables
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-12-19 19:27:31 +01:00
Ray
3e1cd487df Remove trailing spaces 2020-11-03 23:47:33 +01:00
Ray
14d37464ad DrawTriangleFan(): Add a comment about vertex order #1316 2020-07-22 11:12:04 +02:00
raysan5
cdbe1b6190 Review buffer limits on rectangle drawing 2020-05-21 18:57:45 +02:00
raysan5
fdad1f023b Avoid all MSVC compile warnings
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-06 19:12:09 +02:00
raysan5
51c3bef497 Review exposed #defines and allow user re-defining
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-05-01 17:31:44 +02:00
raysan5
94ab5e2aab Review issue with vertex batch overflow #1223 2020-04-27 18:02:54 +02:00
Ray
1ee6290fcf Replaced fabs() by fabsf() when required 2020-02-28 12:54:39 +01:00
Ray
b5fe41f41a Review libc dependencies and remove when possible
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-04 16:55:24 +01:00
Ray
c3f06b7470 Remove all trail spaces 2020-02-03 19:26:28 +01:00
Ray
40b73a8a91
Develop branch integration (#1091)
* [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-02-03 18:31:30 +01:00
Ray
4f7d090fb2 ADDED: DrawEllipse() and DrawEllipseLines() #1047 2020-01-27 16:21:37 +01:00
Ray
e0d4cc3143 ADDED: DrawPolyLines() 2020-01-09 18:34:20 +01:00
Ray
4211056354 Reviewed some comments 2020-01-08 18:21:08 +01:00
raysan5
21c30f43d4 Update year to 2020 2020-01-05 20:01:54 +01:00
Ray
dc6136e820 Review formatting for PR #1004 2019-10-29 16:03:21 +01:00
João Coelho
75b0264f35 fix various problems, thanks CppCheck :) (#1005)
* 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-10-29 15:57:19 +01:00
AlexHCC
8adcec185e Improve code readability (#976) 2019-09-24 23:08:07 +02:00
AlexHCC
acedf4a0d5 Fixed regular polygon shape rendering (#972) 2019-09-22 21:25:39 +02:00