Commit graph

634 commits

Author SHA1 Message Date
Ray
f12db180cd Reviewed PR #1407 2020-10-21 11:08:37 +02:00
Chance Snow
9833fe45eb
Added desktop cursor getter and setter functions (#1407)
* [core] Added desktop cursor getter and setter functions

* Example: Set mouse cursor in text input box

* Setup standard cursors _after_ GLFW window initialization

* Remove old `int GetMouseWheelMove` declaration
2020-10-21 10:55:52 +02:00
Doyle
b29311c7ca
mouse: Return float movement for precise scrolling where possible (#1397) 2020-10-05 20:16:23 +02:00
Ray
a850246030 Review Texture type
Texture type also maps to Texture2D and TextureCubemap
2020-09-28 00:40:32 +02:00
seanpringle
4bcddc3b15
[wip] rlDrawMeshInstanced (#1318)
* rlDrawMeshInstanced first attempt

* rlDrawMeshInstanced OpenGL 3.3 and VAO checks

* rlDrawMeshInstanced GetShaderAttribLocation; comments

* example instanced shader

* RLGL_STANDALONE RAYMATH_STANDALONE Vector4

* apply suggested naming changes; add instanced mesh example

* remove orphan variables
2020-09-27 10:29:05 +02:00
kernelkinetic
e90b4d8915
Platform DRM (#1388)
* updated README.md

* fixed CMakeLists.txt to allow building and debugging with Visual Studio Code and CMAKE Tools extension

* added PLATFORM_DRM
contains mouse pointer code from https://github.com/chriscamacho

* removed redundant cleanup in InitGraphicsDevice

* fixed DRM connector mode selection

* added choosen DRM connected mode to log output

* added respecting TargetFPS on DRM mode selection, default to 60

* added support for GetMonitorRefreshRate

* changed SUPPORT_MOUSE_CURSOR_RPI to SUPPORT_MOUSE_CURSOR_NATIVE

* changed avoidProgressive to allowInterlaced

* cleanup, function extraction and improved mode selection

* README reverted to original for PR

* line endings fixed for core.c

* removed old code

* mouse pointer reverted to small square

* replaced SetGraphicDeviceName() by DEFAULT_GRAPHIC_DEVICE_DRM

Co-authored-by: kernelkinetic <kernelkinetic@outlook.com>
2020-09-27 10:18:43 +02:00
raysan5
032b2db398 REVIEWED: GenTextureCubemap()
Added some tracelog messages
2020-09-21 13:18:53 +02:00
raysan5
152665ff48 REDESIGNED: GenTexture*() #721
Functions have been redesigned to use rlgl and allow to externalize them (aka removing them from rlgl because they use custom shaders...).
2020-09-18 13:50:51 +02:00
raysan5
fa2c114636 WARNING: struct RenderTexture2D: Removed depthTexture
Not required anymore, attachment type is queried when required
2020-09-17 13:44:03 +02:00
Ray
8cf0be4b6c Review memory loading functions signesness 2020-09-14 19:20:38 +02:00
raysan5
43b9113c0c Reverted some previous changes... 2020-09-14 15:55:31 +02:00
raysan5
d7853127db Reviewed some structs to reduce size and padding
Also updated raylib Wiki about struct sizes in 32bit and 64bit
2020-09-14 15:36:50 +02:00
Ray
c196b09d33 Remove function declaration added by error 2020-09-13 16:43:19 +02:00
Ray
db652daf42 ADDED: LoadFontFromMemory() (TTF only) #1327 2020-09-13 16:42:31 +02:00
Ray
88c5deac87 WARNING: REDESIGNED: LoadFontData() 2020-09-13 16:41:52 +02:00
Ray
5b60a743bd ADDED: LoadWaveFromMemory() #1327 2020-09-13 15:38:57 +02:00
Ray
768b29dd74 ADDED: LoadImageFromMemory() #1327 2020-09-13 15:37:15 +02:00
Ray
cb8cbb038b WARNING: RENAMED: GetExtension() to GetFileExtension() 2020-09-13 14:07:08 +02:00
raysan5
f1ed8be5d7 REDESIGNED: ColorFromHSV()
Replaced Vector3 by direct values, easier to use and understand
2020-09-07 19:33:06 +02:00
raysan5
a1422ba1c1 Review custom blend modes mechanism
rlBlendMode() has been added to rlgl to be used on BLEND_CUSTOM. This functionality is exposed to advance users.

In any case, new blending modes could be added if required.
2020-09-01 21:02:19 +02:00
cedemax
bfafb80cde
Multiple blendmodes (#1324)
Co-authored-by: max <max.cedercreutz@cetopo.com>
2020-09-01 20:33:49 +02:00
Juan Medina
dcbe481a28
adding new windows functions (#1357) 2020-09-01 20:29:13 +02:00
seanpringle
cebcdea80f
[wip] MeshNormalsSmooth() (#1317)
* MeshSmoothNormals() by average

* wrong comment

* spelling

* use correct function naming convention
2020-07-20 11:05:18 +02:00
raysan5
0db0e6acd8 WARNING: REMOVED: LoadImageEx()
Reason for removal: This function forces a specific Image data format, it copies data internally (it could be confusing and lead to memory leaks), it's redundant, there is a simpler alternative and raylib promotes using structures directly
2020-07-10 19:18:29 +02:00
raysan5
c57323f29c ADDED: LoadImageAnim() to load animated sequence of images 2020-07-10 13:59:01 +02:00
Vlad Adrian
4d71e9b44f
Added new function DrawTextureTiled() (#1291)
* Implemented DrawTextureTiled()

* Example added
2020-06-27 23:59:14 +02:00
Ray
ba39a1b304 ADDED: UpdateTextureRec() 2020-06-25 16:26:59 +02:00
Shylie
25fb24ba7d
[add] GetMonitorRefreshRate(int monitor); (#1289) 2020-06-24 18:28:57 +02:00
raysan5
c078640fa5 Commented Fade() macro 2020-06-16 10:37:31 +02:00
raysan5
afcc584fb6 RE-ADDED: Fade() function to avoid multiple breaking changes
Probably there is a better way to do this but this is a temporary solution for backward compatibility
2020-06-16 10:36:05 +02:00
raysan5
ad954dc7ab WARNING: BIG CHANGE: Move Color functions to texture module
WARNING: Some functions ADDED and some RENAMED:
- RENAMED: Fade() -> ColorAlpha() [Added #define for compatibility]
- ADDED: ColorAlphaBlend()
- ADDED: GetPixelColor()
- ADDED: SetPixelColor()
2020-06-15 12:02:50 +02:00
raysan5
d0e9228660 REDESIGNED: ImageResizeCanvas(), optimized #1218 2020-06-07 18:33:30 +02:00
raysan5
a9fb0aa207 ImageToPOT() renamed parameter 2020-06-07 18:32:20 +02:00
ChrisDill
aff47d1564
Added bool IsCursorOnScreen(void). (#1262)
- The Mouse struct already stores cursorOnScreen. This function simply exposes it to the usage code.
2020-05-26 11:59:25 +02:00
Random
d9a96c4ca0
added BLEND_SET (#1251)
* added BLEND_SET

* renamed BLEND_SET to BLEND_ADD_COLORS
2020-05-16 13:39:38 +02:00
raysan5
257f232d41 WARNING: BREAKING CHANGE: Review audio looping system
Current looping system was broken, `loopCount` has been converted to `bool looping` and user can enable/disable with `music.looping = false`. `SetMusicLoopCount()` has been removed.
2020-05-14 14:00:37 +02:00
Mickaël Malécot
0bd64b7975
Gamepad axis bug fixes and improvement (#1228)
* Fix gamepad axis count

* Fix Xbox axis drawing

* Ignore low axis values

* Revert "Fix gamepad axis count"

This reverts commit f08ae4bf

* Fix GamepadAxis API

* Fix conflict with master

* Revert Gamepad MAX definitions

* Revert MAX_GAMEPAD_AXIS update
2020-05-09 12:39:41 +02:00
raysan5
7a1d3d807f WARNING: RENAMED: ImageExtractPalette() -> GetImagePalette() 2020-05-09 12:07:18 +02:00
raysan5
959447d8ed Reorganized texture functions
Removed ImageAlphaMask() dependency on [text] LoadBMFont()
2020-05-09 12:05:00 +02:00
raysan5
f6ca045735 ADDED: DrawTriangle3D() and DrawTriangleStrip3D()
Those functions could be very useful for custom triangle data drawing, using internal batch system.
2020-05-07 12:46:45 +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
6e2d39c51b ADDED: IsWindowFocused() 2020-04-27 17:41:29 +02:00
raysan5
8e59ecb50c ADDED: GetWindowScaleDPI() 2020-04-24 23:17:32 +02:00
raysan5
cc816345bf WARNING: API BREAK: Removed LoadImagePro()
Actually this function is useless and potentially dangerous, internally, a shallow copy of data was done. Same could be accomplished accesing image.data directly.
2020-04-10 19:26:36 +02:00
raysan5
b132da0ac2 WARNING: API BREAK: Reviewed ImageDrawText*() params order
To unify with DrawText*() equivalent functions
2020-04-10 19:10:15 +02:00
raysan5
adb20569be Review shared library building 2020-04-01 11:06:05 +02:00
raysan5
fc7ec5e907 Update raylib.h 2020-03-30 17:11:35 +02:00
Dani Martin
62cdb2299b
[cppcheck] Improvements in SaveStorageValue() in core.c (#1160)
* [cppcheck] Improvements in SaveStorageValue() in core.c

in file core.c cppcheck shows errors only in function SaveStorageValue():

* Common realloc mistake: 'fileData' nulled but not freed upon failure
* Memory pointed to by 'fileData' is freed twice.

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for this function
* Rerun CPPCHECK afer fix

* [cppcheck] Change functions header to accept only positive position in files

Changes:
* Functions SaveStorageValue(), LoadStorageValue() (core.c)
* Functions LoadFileData(), SaveFileData() (utils.c)
* Headers in raylib.h

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for these functions
* Rerun CPPCHECK afer fix
2020-03-30 13:51:36 +02:00
raysan5
733ed972f7 Reorganize image functions 2020-03-29 13:37:33 +02:00
raysan5
5d7050bdf9 Reorganize image/texture functions for consistency 2020-03-29 13:31:12 +02:00