Commit Graph

561 Commits

Author SHA1 Message Date
Ray
e67ebabb02 Support custom memory management macros
Users can define their custom memory management macros.

NOTE: Most external libraries support custom macros in the same way, raylib should redefine those macros to raylib ones, to unify custom memory loading. That redefinition is only implemented as example for stb_image.h in [textures] module.
2019-04-23 14:55:35 +02:00
Ray
2d4c2ff351 Review rnet errors 2019-04-22 20:54:50 +02:00
Ray
f7d978e726 Reviewed rnet inclusion
Move to own header for a more deep review of the module
2019-04-22 20:27:54 +02:00
Jak
4b8d06f501 [rnet] module WIP (#809)
Added experimental network module
2019-04-22 20:03:00 +02:00
Demizdor
f3a5a6871d Initial unicode implementation for UTF8 encoded text 2019-04-21 12:27:46 +03:00
Björn Wahlstrand
7cc8faf7da Use typedef rather than #define in order to avoid issues in application code 2019-04-12 21:41:30 +02:00
Ray
4e58d4102c Corrected typo 2019-04-12 13:29:37 +02:00
Ray
30d51ec26c Reorganize struct 2019-04-12 11:29:01 +02:00
Ray
5bfa675350 Review VR simulator mechanism
- No default VR device parameteres inside raylib
- VR device parameter should be provided by user
- VR distortion shader should be provided by user
2019-04-11 13:53:01 +02:00
Ray
1934f2a2f4 Some tweaks 2019-04-11 00:11:11 +02:00
Ray
6168a4ca37 Comments review 2019-04-10 23:50:48 +02:00
ChillerDragon
f21761fbbb Happy new year 2019 2019-04-07 17:49:12 +02:00
Ray
9282b8ba83 ADDED: SetShaderValueTexture()
Some tweaks
2019-04-05 17:08:46 +02:00
Ray
92733d6695 BIG UPDATE: New models functions for animations!
Multiple functions added and some reviewed to adapt to the new multi-mesh, multi-material and animated models.
2019-04-05 13:15:56 +02:00
Ray
a103086443 Removed trail spaces 2019-04-04 13:50:52 +02:00
Ray
6ecd8249bc
Merge pull request #787 from Demizdor/master
Added `DrawRoundedRect()` and `DrawRoundedRectLines()`
2019-04-04 13:42:20 +02:00
Ray
d89d24c5e8 BIG UPDATE: Support model animations! 2019-04-04 13:33:54 +02:00
Vlad Adrian
1415d514ba
Update raylib.h 2019-03-31 13:20:45 +03:00
Demizdor
a28023b58f Added DrawRoundedRect() 2019-03-30 22:18:29 +02:00
Ray
afab8b36ab
Merge pull request #786 from Demizdor/draw_ring
Added DrawRing(), DrawRingLines() and DrawCircleSectorLines()
2019-03-29 17:28:37 +01:00
Ray
a643dc4ca0 WARNING: Redesigned model struct for multi-meshes
This is quite a big change, Model struct has been redesigned to support multiple meshes and multiple materials, most 3d fileformats contain multiple meshes and reference multiple materials.

Consequently, multiple functions have been reviewed.

LoadOBJ(), LoadIQM(), LoadGLFT() now return a Model.

Current LoadOBJ() is not valid anymore, actually, tinyobj_loader_c library is considered for replacement.
2019-03-29 16:48:23 +01:00
Demizdor
ab9c6da26f Added DrawRing(), DrawRingLines() and DrawCircleSectorLines() 2019-03-29 16:22:09 +02:00
Ray
88dfd2ab23 REDESIGNED: DrawCircleSector() 2019-03-28 18:53:41 +01:00
raysan5
f02a0334d8 ADDED: GetScreenData() 2019-03-17 11:58:02 +01:00
Rafael Sachetto
9f54a69cec Adding DrawCubeWiresV for convenience 2019-03-08 15:06:17 -03:00
Ray
2f97a3f835 Proposed Model struct review 2019-03-05 16:46:48 +01:00
Ray
2e99c6cefb ADDED: IsWindowResized() 2019-03-04 22:58:20 +01:00
Ray
297dd641e8 ADDED: DrawCircleSector() 2019-02-13 00:06:06 +01:00
Ray
e996fe2ff5 ADDED: GetClipboardText(), SetClipboardText() 2019-02-11 18:03:06 +01:00
Ray
d356b1d1cc Reviewed fbo creation and VR system 2019-02-06 14:21:44 +01:00
Ray
fce48e85f4 ADDED: LoadTextureCubemap()
Probably uncomplete, not tested yet...
2019-02-04 13:27:36 +01:00
Ray
5755c5e310 Review DrawTextRecEx() formatting 2019-02-04 09:57:02 +01:00
Demizdor
6f66425946 Added DrawTextRecEx() 2019-01-23 21:36:54 +02:00
Ray
4467292a2d Review last PR formatting 2019-01-21 10:32:14 +01:00
Ray
9b97cf6972
Merge pull request #731 from MarcoLizza/reorganizing-logging
Reorganizing logging
2019-01-21 10:09:51 +01:00
Marco Lizza
343fef4aa4 Changing enums, now referenced as int. 2019-01-21 10:05:40 +01:00
Marco Lizza
f1d13aa469 Adding function to control the "exit-on-error" behaviour. 2019-01-20 22:24:41 +01:00
Marco Lizza
932e9dbd09 Fixing logging level configuration API. 2019-01-20 22:24:09 +01:00
Marco Lizza
c1c801e5c3 Reworking log level as incremental. 2019-01-20 22:22:21 +01:00
raysan5
d41e50f866 Allow ShowWindow usage ;) 2019-01-19 12:34:04 +01:00
Ray
3703430f57 Renamed ShowWindow() to UnhideWindow() -WIP-
Function provisional renaming... that's not the end of this issue...
2019-01-17 16:29:36 +01:00
Ray
a43f87e391 Crazy test 2019-01-16 17:25:48 +01:00
Ray
e811279a75 Review code formatting on ColorFromHSV()
Following raylib notation rules
2019-01-14 13:49:17 +01:00
Demizdor
da1714f411 Added ColorFromHSV() 2019-01-14 12:49:00 +02:00
Ray
25205b5113 Reverted flag value (but kept order)
This specific change could be very annoying for people already using FLAG_MSAA_4X_HINT, their programs will compile correctly but window won't be shown...
2019-01-11 12:21:02 +01:00
Ray
7132ba44db Reviewed latest PR 2019-01-10 17:06:26 +01:00
Ray
56173d7cf4
Merge branch 'master' into window-visibility 2019-01-10 16:57:15 +01:00
Marco Lizza
6056a2a5cf Reworking API upon suggestion. 2019-01-10 16:43:21 +01:00
Marco Lizza
a15251bcdb Adding window visibility functions. 2019-01-10 14:55:19 +01:00
Marco Lizza
5adcc30a2e Adding window visibility configuration flag. 2019-01-10 14:54:55 +01:00
Ray
64fd131ed5 Some improvements on SetShaderValue()
- Unsigned int not supported on OpenGL ES 2.0 -> Removed
- Reorganized enum -> Removed BOOL (not uniformType)
- Support sample2D uniform type
2019-01-10 12:28:23 +01:00
Ray
55f8dbc755 WARNING: Redesigned SetShaderValue() 2019-01-10 11:25:26 +01:00
Ray
35bcbd1b60
Merge pull request #718 from MarcoLizza/shaders-uniforms-array
Shaders uniforms array
2019-01-09 17:01:59 +01:00
Marco Lizza
73597332b6 Adding uniform array support for shaders. 2019-01-09 16:18:00 +01:00
raysan5
5c614f6975 Some code tweaks 2019-01-05 19:24:42 +01:00
raysan5
644eddda11 REMOVED: ShowLogo()
Same functionality could be achieved using FLAGS... but also considering removing raylib logo animation...
2019-01-03 13:55:59 +01:00
raysan5
d427f17210 REVIEWED some functions parameters
Decided to allow user to provide values directly instead of requiring a Vector2 struct, probably more confortable to use.

 - SetMousePosition()
 - SetMouseOffset()
 - SetMouseScale()
2019-01-03 13:53:20 +01:00
ChrisDill
f9c43dc379 Mouse functions changed
- SetMouseScale changed to take in a Vector2.
- Added mouseOffset global which is used in mouse read functions.
2019-01-02 19:09:34 +00:00
ChrisDill
8933298864 Added SetMouseOffset
- Changed mouseScale to Vector2.
- Added SetMouseOffset to change XY of mouseScale.
2019-01-02 10:14:55 +00:00
raysan5
0619571149 ADDED: DrawTextRec() and example 2018-12-29 14:44:28 +01:00
raysan5
414c3ee1f9 ADDED: DrawTextureQuad()
Useful for tiling and offset parameters definition.
2018-12-26 23:44:16 +01:00
raysan5
91a7b0e5ef Corrected typo 2018-12-26 13:57:10 +01:00
raysan5
01338b0a14 WARNING: BREAKING CHANGE
Added a bunch of useful text management functions.
Consequently, some already available functions like `FormatText()` and `SubText()` has been renamed for consistency. Created temporal fallbacks for old names.
raylib version bumped to 2.3.
2018-12-26 13:26:34 +01:00
raysan5
9a8320c52b REVIEWED: DrawRectanglePro() 2018-12-26 10:51:13 +01:00
raysan5
96207a8a02 REVIEWED: LoadFontEx()
Changed parameters order for consistency with LoadFontData() and other functions when an array is passed by parameter and array size is the following parameter.
2018-12-25 15:17:42 +01:00
raysan5
92f68ac6be Review DrawPolyEx()
Also reviewed rlCheckBufferLimit()
2018-12-24 14:09:51 +01:00
Ray
87ad244ee0 Exposed LoadFontFromImage() 2018-12-20 12:58:27 +01:00
Ray
4008a075a8 Added scissor functionality
To draw only in defined area of the screen
ADDED: BeginScissorMode(), EndScissorMode()
2018-12-15 23:30:55 +01:00
Ray
8b75a1a990 Improved textures wrap support 2018-12-03 12:00:05 +01:00
Ray
f552d43547 Reviewed some comments 2018-12-03 11:24:11 +01:00
Ray
5086c60e2f Replaced #defines by enums 2018-12-03 11:04:32 +01:00
Ray
5167f78d5f ADDED: OpenURL()
Corrected bug on ImageDrawRectangleLines()
2018-11-09 23:09:02 +01:00
Ray
b356ef5564 Modifies some Image functions
REVIEWED: ImageDrawRectangle()
ADDED: ImageDrawRectangleLines()
2018-11-07 17:58:26 +01:00
Ray
065994219e Review parameter issue with MSVC 2018-11-06 16:11:11 +01:00
Ray
fc1c9505ba Remove end-line spaces 2018-11-06 15:10:50 +01:00
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.
2018-11-06 15:06:01 +01:00
Ray
298203a41a ADDED: Some functions...
text:     IsEqualText() -WIP-
audio:  SaveWAV()
audio:  ExportWaveAsCode()
textures:  ExportImageAsCode()
2018-10-29 16:18:06 +01:00
Ray
550dd40cb3 ADDED: SplitText() function 2018-10-23 15:43:19 +02:00
Berni8k
e07ec6a2e8 Overhaul mouse and touch for RaspberryPi \n\nNow all '/dev/input/event*' devices are now used for input. No longer uses '/dev/input/mouse*', keyboard and gamepad continue to use existing method\nMultitouch is now supported on RPi with 10 point multitouch\nFixed bugs with IsMouseButtonPressed(Used to constantly fire when holding button) and GetMouseWheelMove(Did not work)\n Fixed exesive CPU usage of GamepadThread 2018-10-21 00:09:17 +01:00
Ray
764766bfb2 Some formatting tweaks 2018-10-18 16:00:11 +02:00
Ray
b8b8936cd7 Review defines 2018-10-16 10:53:01 +02:00
Michael Vetter
d8331bde3a Add FileExists() function 2018-10-14 14:21:02 +02:00
raysan5
68d2b0c071 Corrected description 2018-10-13 16:30:44 +02:00
raysan5
c7b601b624 Renamed new PR function
RENAME: GetLastWriteTime() to GetFileModTime()
2018-10-13 15:59:17 +02:00
ChrisDill
c2b36af60f Added GetLastWriteTime to allow for file reloading
- Added a function to get the last write time of a file. I used this so I can reload files or resources if the time since they were last loaded changes.
2018-10-12 13:53:36 +01:00
noshbar
ccaf462cbf GenImageFontAtlas prototype in raylib.h is incorrect.
The prototype of GenImageFontAtlas() in the main raylib.h header has a set of swapped parameter names.
Going through the usage of the function within raylib itself, it appears as if the correct order is:
1) charsCount
2) fontSize

However, it's exposed to the world as the other way around, which may cause some major confusion.
2018-10-10 22:28:17 +02:00
Ray
a511337ce8 ADDED: GetFileNameWithoutExt 2018-10-10 12:01:59 +02:00
Ray
2320c2febf ADDED: ImageExtractPalette() 2018-10-08 18:57:33 +02:00
Ray
2feea87b61 Multiple changes, check description
REVIEW: Reorganized global variables for consistency
ADDED: GetWindowHandle() to get native window handle
ADDED: GetDirectoryFiles() to get files list for a DIR
2018-10-08 12:29:02 +02:00
Ahmad Fatoum
6572d5ff8c
raylib.h: include <stdbool.h> if available
Previously, if <raylib.h> was #included prior to another header that
defined bool, the compilation would fail.
This is e.g. the case for <perl.h> and <objc/objc.h> which both fall
back to the <stdbool.h> if C99 is available.

The following commit includes <objc/objc.h> in src/core.c, which causes
the same problem.

Avoid this by checking for C99 bool like we already do for C++'s.
2018-10-07 00:39:51 +02:00
ChrisDill
67dc50ef00 Changed monitor functions to use a index
- Using same idea as SetWindowMonitor to take in a index with 0 being the primary monitor.
2018-09-30 15:20:02 +01:00
ChrisDill
ed79d53e1a Changed tabs to spaces
- Fixed tabs used instead of 4 spaces
2018-09-27 16:23:11 +01:00
ChrisDill
1836e02c1e Added monitor functions
- Get number of monitors
- Get size, physical size and name of primary monitor. Could pass monitor id instead not sure.
2018-09-27 15:52:56 +01:00
Ray
27c3afd91c enjoy! 2018-09-18 21:30:52 +02:00
Ray
ec5c9686b3 Improved data export capabilities!
REVIEWED: ExportImage()
REVIEWED: ExportMesh()
ADDED: ExportWave()
REMOVED: Internal funcs: SavePNG(), SaveBMP()

NOTE: These changes break the API (parameters order)
2018-09-17 16:56:02 +02:00
Ray
dfb8837c46 Support aliased font texture generation
Useful for bitmaps pixelated fonts where anti-aliasing is not desired!
Change also enables additional font generation mechanisms in a future (cleartype, hinting...).
2018-09-06 16:56:21 +02:00
Ray
1fcb3c0317 Started working on IQM/glTF loaders 2018-09-05 10:59:05 +02:00
Justin Clift
699cadcf98 Add the remaining numeric keypad keys, and a few other missing ones 2018-08-19 18:00:16 +01:00
Justin Clift
6a5dbeace8 Add the plus and minus keys on both the main keyboard and keypad 2018-08-19 14:40:30 +01:00
Jorge A. Gomes
5f89e35d1c
Update raylib.h 2018-08-08 16:39:10 -03:00