Ray
e340517a73
Support custom texture on shapes drawing
By default, internal white texture was used to draw most of the shapes; some time ago, support for white font character from default internal font was added. That way, all basic drawing (shapes, text) could be performed without a texture change and in a single drawing pass.
Now, we move a step further and we allow configuring the texture (and rectangle) used to do the shapes drawing.
vor 6 Jahren
Ray
b88bfa7267
Review PR formatting
vor 6 Jahren
Joseph-Eugene Winzer
1cef8ea1bf
Shapes: Simplifies CheckCollisionRecs
By comparing the edges of the rectangles relative to each other we can
determine if they intersect or not.
vor 6 Jahren
Ray
b042fe12e6
Reviewed spacings on latest PR
vor 6 Jahren
Kim Kulling
f5f7ed79b8
Fix compiler warnings of lib
vor 6 Jahren
Kim Kulling
b2cac82fa0
Fix compiler warings in texture.c and more.
vor 6 Jahren
raysan5
103bc7dfc6
Corrected issue with GetFontDefault()
Note for me: Replace All is NOT your friend...
vor 6 Jahren
raysan5
d881c73257
Renamed GetDefaultFont() to GetFontDefault()
Library consistency rename... yes, I know, it breaks the API...
vor 6 Jahren
Ray
0148432588
fabsf() not working with TCC
Replaced by fabs() that seem to work ok
vor 6 Jahren
raysan5
ca69068814
Added function: rlCheckBufferLimit()
vor 6 Jahren
Sherjil Ozair
8e9ff75f1c
Use fabsf for floats, and avoid implicit type casting
vor 7 Jahren
Ray San
6324697ffd
Rectangle parameters changed to float
- Some examples tweaks
- Reviewed ImageFormat()
- Use float for text fontSize
vor 7 Jahren
raysan5
8d81b6e4e4
Support shapes drawing using only QUADS
Also added new compilation FLAGS for that pourpose
vor 7 Jahren
Ahmad Fatoum
1841afad11
Refactor all #define SUPPORT_* into a config.h
That way, a user needs only to touch a single file to configure what
features raylib is built with.
Include guards are left out intentionally, because config.h should only
be included in source files, not headers.
Later on, config.h can also define the raylib version (#461 ).
vor 7 Jahren
Ray San
d1ef6869a9
Added function DrawRectangleLinesEx()
vor 7 Jahren
raysan5
0e48396369
Corrected issue with new functionality
Using default font texture as base white texture for rectangles reduces
draw calls considerably, actually, raygui can be drawn with a single
pass!
vor 7 Jahren
raysan5
e1baae0249
Removed function DrawRectangleT()
Functionality integrated in DrawRectangle() and selectable with config
flag USE_DEFAULT_FONT_TEXTURE
vor 7 Jahren
Ray San
00c34a035c
Updated copyright year
vor 7 Jahren
Ahmad Fatoum
107294f3e6
Fix bug, add some whitespace
vor 7 Jahren
Ahmad Fatoum
cd6d752217
Fix warning about unsequenced modification of variable
Variable t was read and modified without interleaving sequence points,
technically undefined behavior. Report by Clang's -Wunsequenced
vor 7 Jahren
Ray
4f9de9527f
Review gradient rectangle drawing
Added: DrawRectangleGradientV()
Added: DrawRectangleGradientH()
vor 7 Jahren
raysan5
12cb3afd9e
Added function DrawRectangleGradientEx()
Moved function DrawRectangleT() from text module to shapes
Added some comments
vor 7 Jahren
raysan5
eeca607506
Review transforms to match OpenGL 1.1
vor 7 Jahren
Ray
6546474fa4
Manual integration of material-pbr into develop
vor 7 Jahren
Ray
59652c75b4
Review some comments
vor 8 Jahren
raysan5
3813722f17
Added function: DrawLineBezier()
vor 8 Jahren
raysan5
59038bae96
Added function: DrawLineEx()
Supports line thickness
vor 8 Jahren
Ray
05cff44d0a
Improved modules description -IN PROGRESS-
Working in modules configuration flags...
vor 8 Jahren
Ray
177af272f0
Added function DrawRectanglePro()
vor 8 Jahren
raysan5
658c280669
Lattest PR review
Function names, code formatting...
vor 8 Jahren
Joel Davis
d5d391faaf
Added RaycastMesh function and example test case
vor 8 Jahren
Joel Davis
037da8879a
Added RaycastGround and ray picking example
vor 8 Jahren
Ray
377dcb025f
Corrected some warnings
vor 8 Jahren
raysan5
6d1b712a96
Reviewed modules comments
vor 8 Jahren
raysan5
673dcf9436
Comments tweaks
vor 8 Jahren
Ray
8f60996b64
Corrected some warnings
vor 8 Jahren
Ray
4c791100cc
Tweak int to float
vor 8 Jahren
Ray
2ae9ce29eb
Corrected issue on DrawPolyEx()
vor 8 Jahren
raysan5
7f0880a735
Review spacing formatting
raylib uses spaces between '+' and '-' signs but not between '*' and '/'
signs, it's a chosen convention
vor 8 Jahren
raysan5
a36cc7075a
Corrected issue on drawing order
vor 8 Jahren
Ray
9fdf4420d5
Corrected bugs on OpenGL 2.1
vor 8 Jahren
raysan5
68a02e567d
Avoid external variable whiteTexture
To get it, use GetDefaultTexture()
vor 8 Jahren
raysan5
d17a0cee1a
Review text formatting (spacing, tabs...)
vor 8 Jahren
raysan5
03cc031d00
Remove TODO comments (already done)
vor 9 Jahren
Ray
e2ba22ec59
Improved 2D-3D drawing
Depth test disabled for 2D and only used on 3D; consequently LINES vs
TRIANGLES vs QUADS buffers drawing order maters... but blending also
works ok.
vor 9 Jahren
Ray
95c1bf9544
Removed previous change that introduced a bug
vor 9 Jahren
Ray
ee52b13ae6
Corrected bug on GetCollisionRec()
vor 9 Jahren
raysan5
1674465bdc
Adjust buffers usage
- Removed DrawQuad() function
- DrawBillboard() uses DrawBillboardRec()
- DrawPlane() uses RL_TRIANGLES
- DrawRectangleV() uses RL_TRIANGLES, that way, [shapes] module uses
only TRIANGLES buffers.
vor 9 Jahren
raysan5
9cbfcbb820
Add a note about an issue
vor 9 Jahren
raysan5
08da91047e
Some code tweaks
vor 9 Jahren